diff --git a/docs/index.html b/docs/index.html index 34321f4..7a6041f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,6 +31,6 @@ - + \ No newline at end of file diff --git a/docs/main.8703da188731491b.js b/docs/main.a6ba4ebe3385876a.js similarity index 71% rename from docs/main.8703da188731491b.js rename to docs/main.a6ba4ebe3385876a.js index d55eca9..fdd4aab 100644 --- a/docs/main.8703da188731491b.js +++ b/docs/main.a6ba4ebe3385876a.js @@ -1 +1 @@ -(self.webpackChunksct_implementation_demonstrator=self.webpackChunksct_implementation_demonstrator||[]).push([[179],{52:(Tr,fh,Qr)=>{"use strict";function sn(n){return"function"==typeof n}function hc(n){const e=n(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const ml=hc(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function ea(n,t){if(n){const e=n.indexOf(t);0<=e&&n.splice(e,1)}}class lt{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const o of e)o.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(sn(i))try{i()}catch(o){t=o instanceof ml?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{Xm(o)}catch(s){t=t??[],s instanceof ml?t=[...t,...s.errors]:t.push(s)}}if(t)throw new ml(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Xm(t);else{if(t instanceof lt){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&ea(e,t)}remove(t){const{_finalizers:e}=this;e&&ea(e,t),t instanceof lt&&t._removeParent(this)}}lt.EMPTY=(()=>{const n=new lt;return n.closed=!0,n})();const ur=lt.EMPTY;function Eo(n){return n instanceof lt||n&&"closed"in n&&sn(n.remove)&&sn(n.add)&&sn(n.unsubscribe)}function Xm(n){sn(n)?n():n.unsubscribe()}const Ss={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},kn={setTimeout(n,t,...e){const{delegate:i}=kn;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){const{delegate:t}=kn;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Pn(n){kn.setTimeout(()=>{const{onUnhandledError:t}=Ss;if(!t)throw n;t(n)})}function To(){}const ti=mh("C",void 0,void 0);function mh(n,t,e){return{kind:n,value:t,error:e}}let ta=null;function Rd(n){if(Ss.useDeprecatedSynchronousErrorHandling){const t=!ta;if(t&&(ta={errorThrown:!1,error:null}),n(),t){const{errorThrown:e,error:i}=ta;if(ta=null,e)throw i}}else n()}class fc extends lt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Eo(t)&&t.add(this)):this.destination=yq}static create(t,e,i){return new ph(t,e,i)}next(t){this.isStopped?Hw(function Vw(n){return mh("N",n,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Hw(function So(n){return mh("E",void 0,n)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Hw(ti,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()}}}const _q=Function.prototype.bind;function Uw(n,t){return _q.call(n,t)}class bq{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){j0(i)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){j0(i)}else j0(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){j0(e)}}}class ph extends fc{constructor(t,e,i){let r;if(super(),sn(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&Ss.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Uw(t.next,o),error:t.error&&Uw(t.error,o),complete:t.complete&&Uw(t.complete,o)}):r=t}this.destination=new bq(r)}}function j0(n){Ss.useDeprecatedSynchronousErrorHandling?function Ym(n){Ss.useDeprecatedSynchronousErrorHandling&&ta&&(ta.errorThrown=!0,ta.error=n)}(n):Pn(n)}function Hw(n,t){const{onStoppedNotification:e}=Ss;e&&kn.setTimeout(()=>e(n,t))}const yq={closed:!0,next:To,error:function vq(n){throw n},complete:To},zw="function"==typeof Symbol&&Symbol.observable||"@@observable";function pl(n){return n}function yR(n){return 0===n.length?pl:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}let Dn=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const o=function Cq(n){return n&&n instanceof fc||function wq(n){return n&&sn(n.next)&&sn(n.error)&&sn(n.complete)}(n)&&Eo(n)}(e)?e:new ph(e,i,r);return Rd(()=>{const{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 new(i=xR(i))((r,o)=>{const s=new ph({next:a=>{try{e(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[zw](){return this}pipe(...e){return yR(e)(this)}toPromise(e){return new(e=xR(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function xR(n){var t;return null!==(t=n??Ss.Promise)&&void 0!==t?t:Promise}const kq=hc(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Me=(()=>{class n extends Dn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new wR(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new kq}next(e){Rd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(e)}})}error(e){Rd(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){Rd(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{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(null===(e=this.observers)||void 0===e?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){const{hasError:i,isStopped:r,observers:o}=this;return i||r?ur:(this.currentObservers=null,o.push(e),new lt(()=>{this.currentObservers=null,ea(o,e)}))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){const e=new Dn;return e.source=this,e}}return n.create=(t,e)=>new wR(t,e),n})();class wR extends Me{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:ur}}function CR(n){return sn(n?.lift)}function Ci(n){return t=>{if(CR(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 ui(n,t,e,i,r){return new Eq(n,t,e,i,r)}class Eq extends fc{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(c){t.error(c)}}:super._next,this._error=r?function(a){try{r(a)}catch(c){t.error(c)}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()){const{closed:e}=this;super.unsubscribe(),!e&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function ct(n,t){return Ci((e,i)=>{let r=0;e.subscribe(ui(i,o=>{i.next(n.call(t,o,r++))}))})}function Fd(n){return this instanceof Fd?(this.v=n,this):new Fd(n)}function Aq(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=n[Symbol.asyncIterator];return t?t.call(n):(n=function TR(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)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.")}(n),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,c){!function r(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}(a,c,(s=n[o](s)).done,s.value)})}}}const $w=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function SR(n){return sn(n?.then)}function DR(n){return sn(n[zw])}function AR(n){return Symbol.asyncIterator&&sn(n?.[Symbol.asyncIterator])}function IR(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const MR=function Mq(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function RR(n){return sn(n?.[MR])}function FR(n){return function Dq(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(n,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(h){i[h]&&(r[h]=function(f){return new Promise(function(m,g){o.push([h,f,m,g])>1||a(h,f)})})}function a(h,f){try{!function c(h){h.value instanceof Fd?Promise.resolve(h.value.v).then(l,d):u(o[0][2],h)}(i[h](f))}catch(m){u(o[0][3],m)}}function l(h){a("next",h)}function d(h){a("throw",h)}function u(h,f){h(f),o.shift(),o.length&&a(o[0][0],o[0][1])}}(this,arguments,function*(){const e=n.getReader();try{for(;;){const{value:i,done:r}=yield Fd(e.read());if(r)return yield Fd(void 0);yield yield Fd(i)}}finally{e.releaseLock()}})}function PR(n){return sn(n?.getReader)}function Kr(n){if(n instanceof Dn)return n;if(null!=n){if(DR(n))return function Rq(n){return new Dn(t=>{const e=n[zw]();if(sn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if($w(n))return function Fq(n){return new Dn(t=>{for(let e=0;e{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Pn)})}(n);if(AR(n))return OR(n);if(RR(n))return function Oq(n){return new Dn(t=>{for(const e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(PR(n))return function Nq(n){return OR(FR(n))}(n)}throw IR(n)}function OR(n){return new Dn(t=>{(function Lq(n,t){var e,i,r,o;return function Tq(n,t,e,i){return new(e||(e=Promise))(function(o,s){function a(d){try{l(i.next(d))}catch(u){s(u)}}function c(d){try{l(i.throw(d))}catch(u){s(u)}}function l(d){d.done?o(d.value):function r(o){return o instanceof e?o:new e(function(s){s(o)})}(d.value).then(a,c)}l((i=i.apply(n,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Aq(n);!(i=yield e.next()).done;)if(t.next(i.value),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()})})(n,t).catch(e=>t.error(e))})}function mc(n,t,e,i=0,r=!1){const o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function hr(n,t,e=1/0){return sn(t)?hr((i,r)=>ct((o,s)=>t(i,o,r,s))(Kr(n(i,r))),e):("number"==typeof t&&(e=t),Ci((i,r)=>function Bq(n,t,e,i,r,o,s,a){const c=[];let l=0,d=0,u=!1;const h=()=>{u&&!c.length&&!l&&t.complete()},f=g=>l{o&&t.next(g),l++;let p=!1;Kr(e(g,d++)).subscribe(ui(t,b=>{r?.(b),o?f(b):t.next(b)},()=>{p=!0},void 0,()=>{if(p)try{for(l--;c.length&&lm(b)):m(b)}h()}catch(b){t.error(b)}}))};return n.subscribe(ui(t,f,()=>{u=!0,h()})),()=>{a?.()}}(i,r,n,e)))}function gh(n=1/0){return hr(pl,n)}const ns=new Dn(n=>n.complete());function NR(n){return n&&sn(n.schedule)}function Gw(n){return n[n.length-1]}function LR(n){return sn(Gw(n))?n.pop():void 0}function Zm(n){return NR(Gw(n))?n.pop():void 0}function BR(n,t=0){return Ci((e,i)=>{e.subscribe(ui(i,r=>mc(i,n,()=>i.next(r),t),()=>mc(i,n,()=>i.complete(),t),r=>mc(i,n,()=>i.error(r),t)))})}function VR(n,t=0){return Ci((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function UR(n,t){if(!n)throw new Error("Iterable cannot be null");return new Dn(e=>{mc(e,t,()=>{const i=n[Symbol.asyncIterator]();mc(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Pi(n,t){return t?function Wq(n,t){if(null!=n){if(DR(n))return function Hq(n,t){return Kr(n).pipe(VR(t),BR(t))}(n,t);if($w(n))return function jq(n,t){return new Dn(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(SR(n))return function zq(n,t){return Kr(n).pipe(VR(t),BR(t))}(n,t);if(AR(n))return UR(n,t);if(RR(n))return function $q(n,t){return new Dn(e=>{let i;return mc(e,t,()=>{i=n[MR](),mc(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void e.error(s)}o?e.complete():e.next(r)},0,!0)}),()=>sn(i?.return)&&i.return()})}(n,t);if(PR(n))return function Gq(n,t){return UR(FR(n),t)}(n,t)}throw IR(n)}(n,t):Kr(n)}function oi(...n){const t=Zm(n),e=function Uq(n,t){return"number"==typeof Gw(n)?n.pop():t}(n,1/0),i=n;return i.length?1===i.length?Kr(i[0]):gh(e)(Pi(i,t)):ns}function HR(n={}){const{connector:t=(()=>new Me),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,c,l=0,d=!1,u=!1;const h=()=>{a?.unsubscribe(),a=void 0},f=()=>{h(),s=c=void 0,d=u=!1},m=()=>{const g=s;f(),g?.unsubscribe()};return Ci((g,p)=>{l++,!u&&!d&&h();const b=c=c??t();p.add(()=>{l--,0===l&&!u&&!d&&(a=Ww(m,r))}),b.subscribe(p),!s&&l>0&&(s=new ph({next:C=>b.next(C),error:C=>{u=!0,h(),a=Ww(f,e,C),b.error(C)},complete:()=>{d=!0,h(),a=Ww(f,i),b.complete()}}),Kr(g).subscribe(s))})(o)}}function Ww(n,t,...e){if(!0===t)return void n();if(!1===t)return;const i=new ph({next:()=>{i.unsubscribe(),n()}});return Kr(t(...e)).subscribe(i)}function ni(n){for(let t in n)if(n[t]===ni)return t;throw Error("Could not find renamed property on target object.")}function qw(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function si(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(si).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function Qw(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const qq=ni({__forward_ref__:ni});function hn(n){return n.__forward_ref__=hn,n.toString=function(){return si(this())},n}function At(n){return Kw(n)?n():n}function Kw(n){return"function"==typeof n&&n.hasOwnProperty(qq)&&n.__forward_ref__===hn}function Xw(n){return n&&!!n.\u0275providers}const $0="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(G0(t,e)),this.code=t}}function G0(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}function Bt(n){return"string"==typeof n?n:null==n?"":String(n)}function W0(n,t){throw new pe(-201,!1)}function Ds(n,t){null==n&&function Bn(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function ke(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function yt(n){return{providers:n.providers||[],imports:n.imports||[]}}function q0(n){return zR(n,Q0)||zR(n,$R)}function zR(n,t){return n.hasOwnProperty(t)?n[t]:null}function jR(n){return n&&(n.hasOwnProperty(Yw)||n.hasOwnProperty(tQ))?n[Yw]:null}const Q0=ni({\u0275prov:ni}),Yw=ni({\u0275inj:ni}),$R=ni({ngInjectableDef:ni}),tQ=ni({ngInjectorDef:ni});var It=(()=>((It=It||{})[It.Default=0]="Default",It[It.Host=1]="Host",It[It.Self=2]="Self",It[It.SkipSelf=4]="SkipSelf",It[It.Optional=8]="Optional",It))();let Zw;function As(n){const t=Zw;return Zw=n,t}function GR(n,t,e){const i=q0(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&It.Optional?null:void 0!==t?t:void W0(si(n))}const hi=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Jm={},Jw="__NG_DI_FLAG__",K0="ngTempTokenPath",iQ="ngTokenPath",rQ=/\n/gm,oQ="\u0275",WR="__source";let ep;function _h(n){const t=ep;return ep=n,t}function sQ(n,t=It.Default){if(void 0===ep)throw new pe(-203,!1);return null===ep?GR(n,void 0,t):ep.get(n,t&It.Optional?null:void 0,t)}function Q(n,t=It.Default){return(function nQ(){return Zw}()||sQ)(At(n),t)}function Et(n,t=It.Default){return Q(n,X0(t))}function X0(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function eC(n){const t=[];for(let e=0;e((Ta=Ta||{})[Ta.OnPush=0]="OnPush",Ta[Ta.Default=1]="Default",Ta))(),na=(()=>{return(n=na||(na={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",na;var n})();const gc={},On=[],Y0=ni({\u0275cmp:ni}),tC=ni({\u0275dir:ni}),nC=ni({\u0275pipe:ni}),QR=ni({\u0275mod:ni}),_c=ni({\u0275fac:ni}),np=ni({__NG_ELEMENT_ID__:ni});let dQ=0;function Ve(n){return pc(()=>{const t=XR(n),e={...t,decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===Ta.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:null,data:n.data||{},encapsulation:n.encapsulation||na.Emulated,id:"c"+dQ++,styles:n.styles||On,_:null,schemas:n.schemas||null,tView:null};YR(e);const i=n.dependencies;return e.directiveDefs=Z0(i,!1),e.pipeDefs=Z0(i,!0),e})}function hQ(n){return Vn(n)||Yr(n)}function fQ(n){return null!==n}function xt(n){return pc(()=>({type:n.type,bootstrap:n.bootstrap||On,declarations:n.declarations||On,imports:n.imports||On,exports:n.exports||On,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function KR(n,t){if(null==n)return gc;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}function X(n){return pc(()=>{const t=XR(n);return YR(t),t})}function Xr(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Vn(n){return n[Y0]||null}function Yr(n){return n[tC]||null}function zo(n){return n[nC]||null}function rs(n,t){const e=n[QR]||null;if(!e&&!0===t)throw new Error(`Type ${si(n)} does not have '\u0275mod' property.`);return e}function XR(n){const 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,exportAs:n.exportAs||null,standalone:!0===n.standalone,selectors:n.selectors||On,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:KR(n.inputs,t),outputs:KR(n.outputs)}}function YR(n){n.features?.forEach(t=>t(n))}function Z0(n,t){if(!n)return null;const e=t?zo:hQ;return()=>("function"==typeof n?n():n).map(i=>e(i)).filter(fQ)}const bc=0,rt=1,Yt=2,Di=3,ia=4,Pd=5,Zr=6,vh=7,Oi=8,J0=9,eb=10,nn=11,iC=12,ip=13,ZR=14,yh=15,Jr=16,rp=17,xh=18,Sa=19,op=20,JR=21,fi=22,rC=1,eF=2,tb=7,nb=8,wh=9,Do=10;function os(n){return Array.isArray(n)&&"object"==typeof n[rC]}function ra(n){return Array.isArray(n)&&!0===n[rC]}function oC(n){return 0!=(4&n.flags)}function sp(n){return n.componentOffset>-1}function ib(n){return 1==(1&n.flags)}function oa(n){return!!n.template}function pQ(n){return 0!=(256&n[Yt])}function Od(n,t){return n.hasOwnProperty(_c)?n[_c]:null}class bQ{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function jn(){return iF}function iF(n){return n.type.prototype.ngOnChanges&&(n.setInput=yQ),vQ}function vQ(){const n=oF(this),t=n?.current;if(t){const e=n.previous;if(e===gc)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function yQ(n,t,e,i){const r=this.declaredInputs[e],o=oF(n)||function xQ(n,t){return n[rF]=t}(n,{previous:gc,current:null}),s=o.current||(o.current={}),a=o.previous,c=a[r];s[r]=new bQ(c&&c.currentValue,t,a===gc),n[i]=t}jn.ngInherit=!0;const rF="__ngSimpleChanges__";function oF(n){return n[rF]||null}const Is=function(n,t,e){},sF="svg";function Nr(n){for(;Array.isArray(n);)n=n[bc];return n}function rb(n,t){return Nr(t[n])}function ss(n,t){return Nr(t[n.index])}function cF(n,t){return n.data[t]}function Ch(n,t){return n[t]}function jo(n,t){const e=t[n];return os(e)?e:e[bc]}function ob(n){return 64==(64&n[Yt])}function _l(n,t){return null==t?null:n[t]}function lF(n){n[xh]=0}function aC(n,t){n[Pd]+=t;let e=n,i=n[Di];for(;null!==i&&(1===t&&1===e[Pd]||-1===t&&0===e[Pd]);)i[Pd]+=t,e=i,i=i[Di]}const Vt={lFrame:vF(null),bindingsEnabled:!0};function uF(){return Vt.bindingsEnabled}function we(){return Vt.lFrame.lView}function Tn(){return Vt.lFrame.tView}function he(n){return Vt.lFrame.contextLView=n,n[Oi]}function fe(n){return Vt.lFrame.contextLView=null,n}function Lr(){let n=hF();for(;null!==n&&64===n.type;)n=n.parent;return n}function hF(){return Vt.lFrame.currentTNode}function Da(n,t){const e=Vt.lFrame;e.currentTNode=n,e.isParent=t}function cC(){return Vt.lFrame.isParent}function lC(){Vt.lFrame.isParent=!1}function Ao(){const n=Vt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function vc(){return Vt.lFrame.bindingIndex}function kh(){return Vt.lFrame.bindingIndex++}function yc(n){const t=Vt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function PQ(n,t){const e=Vt.lFrame;e.bindingIndex=e.bindingRootIndex=n,dC(t)}function dC(n){Vt.lFrame.currentDirectiveIndex=n}function uC(n){const t=Vt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function gF(){return Vt.lFrame.currentQueryIndex}function hC(n){Vt.lFrame.currentQueryIndex=n}function NQ(n){const t=n[rt];return 2===t.type?t.declTNode:1===t.type?n[Zr]:null}function _F(n,t,e){if(e&It.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&It.Host||(r=NQ(o),null===r||(o=o[yh],10&r.type))););if(null===r)return!1;t=r,n=o}const i=Vt.lFrame=bF();return i.currentTNode=t,i.lView=n,!0}function fC(n){const t=bF(),e=n[rt];Vt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function bF(){const n=Vt.lFrame,t=null===n?null:n.child;return null===t?vF(n):t}function vF(n){const 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 null!==n&&(n.child=t),t}function yF(){const n=Vt.lFrame;return Vt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const xF=yF;function mC(){const n=yF();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 Io(){return Vt.lFrame.selectedIndex}function Nd(n){Vt.lFrame.selectedIndex=n}function ki(){const n=Vt.lFrame;return cF(n.tView,n.selectedIndex)}function xc(){Vt.lFrame.currentNamespace=sF}function Eh(){!function UQ(){Vt.lFrame.currentNamespace=null}()}function sb(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[c]<0&&(n[xh]+=65536),(a>11>16&&(3&n[Yt])===t){n[Yt]+=2048,Is(4,a,o);try{o.call(a)}finally{Is(5,a,o)}}}else{Is(4,a,o);try{o.call(a)}finally{Is(5,a,o)}}}const Th=-1;class cp{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function _C(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[yh],e--;return i}let bC=!0;function ub(n){const t=bC;return bC=n,t}const SF=255,DF=5;let QQ=0;const Aa={};function hb(n,t){const e=AF(n,t);if(-1!==e)return e;const i=t[rt];i.firstCreatePass&&(n.injectorIndex=t.length,vC(i.data,n),vC(t,null),vC(i.blueprint,null));const r=yC(n,t),o=n.injectorIndex;if(TF(r)){const s=lb(r),a=db(r,t),c=a[rt].data;for(let l=0;l<8;l++)t[o+l]=a[s+l]|c[s+l]}return t[o+8]=r,o}function vC(n,t){n.push(0,0,0,0,0,0,0,0,t)}function AF(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function yC(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=NF(r),null===i)return Th;if(e++,r=r[yh],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Th}function xC(n,t,e){!function KQ(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(np)&&(i=e[np]),null==i&&(i=e[np]=QQ++);const r=i&SF;t.data[n+(r>>DF)]|=1<=0?t&SF:JQ:t}(e);if("function"==typeof o){if(!_F(t,n,i))return i&It.Host?IF(r,0,i):MF(t,e,i,r);try{const s=o(i);if(null!=s||i&It.Optional)return s;W0()}finally{xF()}}else if("number"==typeof o){let s=null,a=AF(n,t),c=Th,l=i&It.Host?t[Jr][Zr]:null;for((-1===a||i&It.SkipSelf)&&(c=-1===a?yC(n,t):t[a+8],c!==Th&&OF(i,!1)?(s=t[rt],a=lb(c),t=db(c,t)):a=-1);-1!==a;){const d=t[rt];if(PF(o,a,d.data)){const u=YQ(a,t,e,s,i,l);if(u!==Aa)return u}c=t[a+8],c!==Th&&OF(i,t[rt].data[a+8]===l)&&PF(o,a,t)?(s=d,a=lb(c),t=db(c,t)):a=-1}}return r}function YQ(n,t,e,i,r,o){const s=t[rt],a=s.data[n+8],d=fb(a,s,e,null==i?sp(a)&&bC:i!=s&&0!=(3&a.type),r&It.Host&&o===a);return null!==d?Ld(t,s,d,a):Aa}function fb(n,t,e,i,r){const o=n.providerIndexes,s=t.data,a=1048575&o,c=n.directiveStart,d=o>>20,h=r?a+d:n.directiveEnd;for(let f=i?a:a+d;f=c&&m.type===e)return f}if(r){const f=s[c];if(f&&oa(f)&&f.type===e)return c}return null}function Ld(n,t,e,i){let r=n[e];const o=t.data;if(function $Q(n){return n instanceof cp}(r)){const s=r;s.resolving&&function Qq(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new pe(-200,`Circular dependency in DI detected for ${n}${e}`)}(function Ln(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Bt(n)}(o[e]));const a=ub(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?As(s.injectImpl):null;_F(n,i,It.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function zQ(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=iF(t);(e.preOrderHooks??(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==c&&As(c),ub(a),s.resolving=!1,xF()}}return r}function PF(n,t,e){return!!(e[t+(n>>DF)]&1<{const t=n.prototype.constructor,e=t[_c]||wC(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[_c]||wC(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function wC(n){return Kw(n)?()=>{const t=wC(At(n));return t&&t()}:Od(n)}function NF(n){const t=n[rt],e=t.type;return 2===e?t.declTNode:1===e?n[Zr]:null}function Ms(n){return function XQ(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;const e=n.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function CC(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(c,l,d){const u=c.hasOwnProperty(Ah)?c[Ah]:Object.defineProperty(c,Ah,{value:[]})[Ah];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),c}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class ae{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Bd(n,t){n.forEach(e=>Array.isArray(e)?Bd(e,t):t(e))}function BF(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function mb(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function hp(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function rK(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function EC(n,t){const e=Rh(n,t);if(e>=0)return n[1|e]}function Rh(n,t){return function VF(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),Ia=tp(Mh("Optional"),8),Vd=tp(Mh("SkipSelf"),4);var $o=(()=>(($o=$o||{})[$o.Important=1]="Important",$o[$o.DashCase=2]="DashCase",$o))();const IC=new Map;let TK=0;const RC="__ngContext__";function eo(n,t){os(t)?(n[RC]=t[op],function DK(n){IC.set(n[op],n)}(t)):n[RC]=t}let FC;function PC(n,t){return FC(n,t)}function gp(n){const t=n[Di];return ra(t)?t[Di]:t}function OC(n){return oP(n[ip])}function NC(n){return oP(n[ia])}function oP(n){for(;null!==n&&!ra(n);)n=n[ia];return n}function Ph(n,t,e,i,r){if(null!=i){let o,s=!1;ra(i)?o=i:os(i)&&(s=!0,i=i[bc]);const a=Nr(i);0===n&&null!==e?null==r?uP(t,e,a):Ud(t,e,a,r||null,!0):1===n&&null!==e?Ud(t,e,a,r||null,!0):2===n?function jC(n,t,e){const i=vb(n,t);i&&function QK(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function YK(n,t,e,i,r){const o=e[tb];o!==Nr(e)&&Ph(t,n,i,o,r);for(let a=Do;a0&&(n[e-1][ia]=i[ia]);const o=mb(n,Do+t);!function UK(n,t){_p(n,t,t[nn],2,null,null),t[bc]=null,t[Zr]=null}(i[rt],i);const s=o[Sa];null!==s&&s.detachView(o[rt]),i[Di]=null,i[ia]=null,i[Yt]&=-65}return i}function cP(n,t){if(!(128&t[Yt])){const e=t[nn];e.destroyNode&&_p(n,t,e,3,null,null),function jK(n){let t=n[ip];if(!t)return UC(n[rt],n);for(;t;){let e=null;if(os(t))e=t[ip];else{const i=t[Do];i&&(e=i)}if(!e){for(;t&&!t[ia]&&t!==n;)os(t)&&UC(t[rt],t),t=t[Di];null===t&&(t=n),os(t)&&UC(t[rt],t),e=t&&t[ia]}t=e}}(t)}}function UC(n,t){if(!(128&t[Yt])){t[Yt]&=-65,t[Yt]|=128,function qK(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===na.None||o===na.Emulated)return null}return ss(i,e)}}(n,t.parent,e)}function Ud(n,t,e,i,r){n.insertBefore(t,e,i,r)}function uP(n,t,e){n.appendChild(t,e)}function hP(n,t,e,i,r){null!==i?Ud(n,t,e,i,r):uP(n,t,e)}function vb(n,t){return n.parentNode(t)}function fP(n,t,e){return pP(n,t,e)}let HC,wb,WC,Cb,pP=function mP(n,t,e){return 40&n.type?ss(n,e):null};function yb(n,t,e,i){const r=lP(n,i,t),o=t[nn],a=fP(i.parent||t[Zr],i,t);if(null!=r)if(Array.isArray(e))for(let c=0;cn,createScript:n=>n,createScriptURL:n=>n})}catch{}return wb}()?.createHTML(n)||n}function wP(n){return function qC(){if(void 0===Cb&&(Cb=null,hi.trustedTypes))try{Cb=hi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Cb}()?.createHTML(n)||n}class Hd{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${$0})`}}class rX extends Hd{getTypeName(){return"HTML"}}class oX extends Hd{getTypeName(){return"Style"}}class sX extends Hd{getTypeName(){return"Script"}}class aX extends Hd{getTypeName(){return"URL"}}class cX extends Hd{getTypeName(){return"ResourceURL"}}function cs(n){return n instanceof Hd?n.changingThisBreaksApplicationSecurity:n}function Ma(n,t){const e=function lX(n){return n instanceof Hd&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${$0})`)}return e===t}class pX{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Oh(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class gX{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Oh(t),e}}const bX=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function kb(n){return(n=String(n)).match(bX)?n:"unsafe:"+n}function wc(n){const t={};for(const e of n.split(","))t[e]=!0;return t}function bp(...n){const t={};for(const e of n)for(const i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}const TP=wc("area,br,col,hr,img,wbr"),SP=wc("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),DP=wc("rp,rt"),QC=bp(TP,bp(SP,wc("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")),bp(DP,wc("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")),bp(DP,SP)),KC=wc("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),AP=bp(KC,wc("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"),wc("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")),vX=wc("script,style,template");class yX{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;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)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!QC.hasOwnProperty(e))return this.sanitizedSomething=!0,!vX.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=t.attributes;for(let r=0;r"),!0}endElement(t){const e=t.nodeName.toLowerCase();QC.hasOwnProperty(e)&&!TP.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(IP(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const xX=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wX=/([^\#-~ |!])/g;function IP(n){return n.replace(/&/g,"&").replace(xX,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(wX,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Eb;function MP(n,t){let e=null;try{Eb=Eb||function EP(n){const t=new gX(n);return function _X(){try{return!!(new window.DOMParser).parseFromString(Oh(""),"text/html")}catch{return!1}}()?new pX(t):t}(n);let i=t?String(t):"";e=Eb.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Eb.getInertBodyElement(i)}while(i!==o);return Oh((new yX).sanitizeChildren(XC(e)||e))}finally{if(e){const i=XC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function XC(n){return"content"in n&&function CX(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Nn=(()=>((Nn=Nn||{})[Nn.NONE=0]="NONE",Nn[Nn.HTML=1]="HTML",Nn[Nn.STYLE=2]="STYLE",Nn[Nn.SCRIPT=3]="SCRIPT",Nn[Nn.URL=4]="URL",Nn[Nn.RESOURCE_URL=5]="RESOURCE_URL",Nn))();function zd(n){const t=vp();return t?wP(t.sanitize(Nn.HTML,n)||""):Ma(n,"HTML")?wP(cs(n)):MP(function xP(){return void 0!==WC?WC:typeof document<"u"?document:void 0}(),Bt(n))}function Tb(n){const t=vp();return t?t.sanitize(Nn.URL,n)||"":Ma(n,"URL")?cs(n):kb(Bt(n))}function vp(){const n=we();return n&&n[iC]}const Sb=new ae("ENVIRONMENT_INITIALIZER"),PP=new ae("INJECTOR",-1),OP=new ae("INJECTOR_DEF_TYPES");class NP{get(t,e=Jm){if(e===Jm){const i=new Error(`NullInjectorError: No provider for ${si(t)}!`);throw i.name="NullInjectorError",i}return e}}function IX(...n){return{\u0275providers:LP(0,n),\u0275fromNgModule:!0}}function LP(n,...t){const e=[],i=new Set;let r;return Bd(t,o=>{const s=o;YC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&BP(r,e),e}function BP(n,t){for(let e=0;e{t.push(o)})}}function YC(n,t,e,i){if(!(n=At(n)))return!1;let r=null,o=jR(n);const s=!o&&Vn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const c=n.ngModule;if(o=jR(c),!o)return!1;r=c}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const c="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const l of c)YC(l,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let l;i.add(r);try{Bd(o.imports,d=>{YC(d,t,e,i)&&(l||(l=[]),l.push(d))})}finally{}void 0!==l&&BP(l,t)}if(!a){const l=Od(r)||(()=>new r);t.push({provide:r,useFactory:l,deps:On},{provide:OP,useValue:r,multi:!0},{provide:Sb,useValue:()=>Q(r),multi:!0})}const c=o.providers;null==c||a||ZC(c,d=>{t.push(d)})}}return r!==n&&void 0!==n.providers}function ZC(n,t){for(let e of n)Xw(e)&&(e=e.\u0275providers),Array.isArray(e)?ZC(e,t):t(e)}const MX=ni({provide:String,useValue:ni});function JC(n){return null!==n&&"object"==typeof n&&MX in n}function jd(n){return"function"==typeof n}const ek=new ae("Set Injector scope."),Db={},FX={};let tk;function Ab(){return void 0===tk&&(tk=new NP),tk}class Ra{}class HP extends Ra{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,ik(t,s=>this.processProvider(s)),this.records.set(PP,Nh(void 0,this)),r.has("environment")&&this.records.set(Ra,Nh(void 0,this));const o=this.records.get(ek);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(OP.multi,On,It.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=_h(this),i=As(void 0);try{return t()}finally{_h(e),As(i)}}get(t,e=Jm,i=It.Default){this.assertNotDestroyed(),i=X0(i);const r=_h(this),o=As(void 0);try{if(!(i&It.SkipSelf)){let a=this.records.get(t);if(void 0===a){const c=function BX(n){return"function"==typeof n||"object"==typeof n&&n instanceof ae}(t)&&q0(t);a=c&&this.injectableDefInScope(c)?Nh(nk(t),Db):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&It.Self?Ab():this.parent).get(t,e=i&It.Optional&&e===Jm?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[K0]=s[K0]||[]).unshift(si(t)),r)throw s;return function cQ(n,t,e,i){const r=n[K0];throw t[WR]&&r.unshift(t[WR]),n.message=function lQ(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&n.charAt(1)==oQ?n.slice(2):n;let r=si(t);if(Array.isArray(t))r=t.map(si).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):si(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(rQ,"\n ")}`}("\n"+n.message,r,e,i),n[iQ]=r,n[K0]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{As(o),_h(r)}}resolveInjectorInitializers(){const t=_h(this),e=As(void 0);try{const i=this.get(Sb.multi,On,It.Self);for(const r of i)r()}finally{_h(t),As(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(si(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=jd(t=At(t))?t:At(t&&t.provide);const i=function OX(n){return JC(n)?Nh(void 0,n.useValue):Nh(zP(n),Db)}(t);if(jd(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Nh(void 0,Db,!0),r.factory=()=>eC(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===Db&&(e.value=FX,e.value=e.factory()),"object"==typeof e.value&&e.value&&function LX(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=At(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function nk(n){const t=q0(n),e=null!==t?t.factory:Od(n);if(null!==e)return e;if(n instanceof ae)throw new pe(204,!1);if(n instanceof Function)return function PX(n){const t=n.length;if(t>0)throw hp(t,"?"),new pe(204,!1);const e=function eQ(n){return n&&(n[Q0]||n[$R])||null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new pe(204,!1)}function zP(n,t,e){let i;if(jd(n)){const r=At(n);return Od(r)||nk(r)}if(JC(n))i=()=>At(n.useValue);else if(function UP(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...eC(n.deps||[]));else if(function VP(n){return!(!n||!n.useExisting)}(n))i=()=>Q(At(n.useExisting));else{const r=At(n&&(n.useClass||n.provide));if(!function NX(n){return!!n.deps}(n))return Od(r)||nk(r);i=()=>new r(...eC(n.deps))}return i}function Nh(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function ik(n,t){for(const e of n)Array.isArray(e)?ik(e,t):e&&Xw(e)?ik(e.\u0275providers,t):t(e)}class VX{}class jP{}class HX{resolveComponentFactory(t){throw function UX(n){const t=Error(`No component factory found for ${si(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let bl=(()=>{class n{}return n.NULL=new HX,n})();function zX(){return Lh(Lr(),we())}function Lh(n,t){return new Ne(ss(n,t))}let Ne=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=zX,n})();function jX(n){return n instanceof Ne?n.nativeElement:n}class yp{}let Cc=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function $X(){const n=we(),e=jo(Lr().index,n);return(os(e)?e:n)[nn]}(),n})(),GX=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>null}),n})();class $d{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const WX=new $d("15.2.8"),rk={},ok="ngOriginalError";function sk(n){return n[ok]}class kc{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&sk(t);for(;e&&sk(e);)e=sk(e);return e||null}}function Ec(n){return n instanceof Function?n():n}function WP(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const qP="ng-template";function iY(n,t,e){let i=0,r=!0;for(;io?"":r[u+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==WP(f,l,0)||2&i&&l!==h){if(sa(i))return!1;s=!0}}}}else{if(!s&&!sa(i)&&!sa(c))return!1;if(s&&sa(c))continue;s=!1,i=c|1&i}}return sa(i)||s}function sa(n){return 0==(1&n)}function sY(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!sa(s)&&(t+=XP(o,r),r=""),i=s,o=o||!sa(i);e++}return""!==r&&(t+=XP(o,r)),t}const Ut={};function w(n){YP(Tn(),we(),Io()+n,!1)}function YP(n,t,e,i){if(!i)if(3==(3&t[Yt])){const o=n.preOrderCheckHooks;null!==o&&ab(t,o,e)}else{const o=n.preOrderHooks;null!==o&&cb(t,o,0,e)}Nd(e)}function tO(n,t=null,e=null,i){const r=nO(n,t,e,i);return r.resolveInjectorInitializers(),r}function nO(n,t=null,e=null,i,r=new Set){const o=[e||On,IX(n)];return i=i||("object"==typeof n?void 0:si(n)),new HP(o,t||Ab(),i||null,r)}let Ni=(()=>{class n{static create(e,i){if(Array.isArray(e))return tO({name:""},i,e,"");{const r=e.name??"";return tO({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=Jm,n.NULL=new NP,n.\u0275prov=ke({token:n,providedIn:"any",factory:()=>Q(PP)}),n.__NG_ELEMENT_ID__=-1,n})();function y(n,t=It.Default){const e=we();return null===e?Q(n,t):RF(Lr(),e,At(n),t)}function Fa(){throw new Error("invalid")}function lO(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;ifi&&YP(n,t,fi,!1),Is(s?2:0,r),e(i,r)}finally{Nd(o),Is(s?3:1,r)}}function fk(n,t,e){if(oC(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,xp(n,e,r.hostVars,Ut),r)}function Pa(n,t,e,i,r,o){const s=ss(n,t);!function vk(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?Bt(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[nn],s,o,n.value,e,i,r)}function ZY(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let c=0;c0&&yk(e)}}function yk(n){for(let i=OC(n);null!==i;i=NC(i))for(let r=Do;r0&&yk(o)}const e=n[rt].components;if(null!==e)for(let i=0;i0&&yk(r)}}function iZ(n,t){const e=jo(t,n),i=e[rt];(function rZ(n,t){for(let e=t.length;e-1&&(VC(t,i),mb(e,i))}this._attachedToViewContainer=!1}cP(this._lView[rt],this._lView)}onDestroy(t){hO(this._lView[rt],this._lView,null,t)}markForCheck(){Pb(this._cdRefInjectingView||this._lView)}detach(){this._lView[Yt]&=-65}reattach(){this._lView[Yt]|=64}detectChanges(){Ob(this._lView[rt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function zK(n,t){_p(n,t,t[nn],2,null,null)}(this._lView[rt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class oZ extends wp{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Ob(t[rt],t,t[Oi],!1)}checkNoChanges(){}get context(){return null}}class wO extends bl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Vn(t);return new Cp(e,this.ngModule)}}function CO(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class aZ{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=X0(i);const r=this.injector.get(t,rk,i);return r!==rk||e===rk?r:this.parentInjector.get(t,e,i)}}class Cp extends jP{get inputs(){return CO(this.componentDef.inputs)}get outputs(){return CO(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function hY(n){return n.map(uY).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Ra?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new aZ(t,o):t,a=s.get(yp,null);if(null===a)throw new pe(407,!1);const c=s.get(GX,null),l=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",u=i?function NY(n,t,e){return n.selectRootElement(t,e===na.ShadowDom)}(l,i,this.componentDef.encapsulation):BC(l,d,function sZ(n){const t=n.toLowerCase();return"svg"===t?sF:"math"===t?"math":null}(d)),h=this.componentDef.onPush?288:272,f=gk(0,null,null,1,0,null,null,null,null,null),m=Mb(null,f,null,h,null,null,a,l,c,s,null);let g,p;fC(m);try{const b=this.componentDef;let C,x=null;b.findHostDirectiveDefs?(C=[],x=new Map,b.findHostDirectiveDefs(b,C,x),C.push(b)):C=[b];const D=function lZ(n,t){const e=n[rt],i=fi;return n[i]=t,Uh(e,i,2,"#host",null)}(m,u),j=function dZ(n,t,e,i,r,o,s,a){const c=r[rt];!function uZ(n,t,e,i){for(const r of n)t.mergedAttrs=lp(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Nb(t,t.mergedAttrs,!0),null!==e&&yP(i,e,t))}(i,n,t,s);const l=o.createRenderer(t,e),d=Mb(r,uO(e),null,e.onPush?32:16,r[n.index],n,o,l,a||null,null,null);return c.firstCreatePass&&bk(c,n,i.length-1),Fb(r,d),r[n.index]=d}(D,u,b,C,m,a,l);p=cF(f,fi),u&&function fZ(n,t,e,i){if(i)_C(n,e,["ng-version",WX.full]);else{const{attrs:r,classes:o}=function fY(n){const t=[],e=[];let i=1,r=2;for(;i0&&vP(n,e,o.join(" "))}}(l,b,u,i),void 0!==e&&function mZ(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=lp(r.hostAttrs,e=lp(e,r.hostAttrs))}}(i)}function Ck(n){return n===gc?{}:n===On?[]:n}function _Z(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function bZ(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function vZ(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}function Bb(n){return!!kk(n)&&(Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n)}function kk(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Oa(n,t,e){return n[t]=e}function to(n,t,e){return!Object.is(n[t],e)&&(n[t]=e,!0)}function Gd(n,t,e,i){const r=to(n,t,e);return to(n,t+1,i)||r}function vt(n,t,e,i){const r=we();return to(r,kh(),t)&&(Tn(),Pa(ki(),r,n,t,e,i)),vt}function zh(n,t,e,i){return to(n,kh(),e)?t+Bt(e)+i:Ut}function $h(n,t,e,i,r,o,s,a){const l=function Vb(n,t,e,i,r){const o=Gd(n,t,e,i);return to(n,t+2,r)||o}(n,vc(),e,r,s);return yc(3),l?t+Bt(e)+i+Bt(r)+o+Bt(s)+a:Ut}function A(n,t,e,i,r,o,s,a){const c=we(),l=Tn(),d=n+fi,u=l.firstCreatePass?function AZ(n,t,e,i,r,o,s,a,c){const l=t.consts,d=Uh(t,n,4,s||null,_l(l,a));_k(t,e,d,_l(l,c)),sb(t,d);const u=d.tView=gk(2,d,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,l);return null!==t.queries&&(t.queries.template(t,d),u.queries=t.queries.embeddedTView(d)),d}(d,l,c,t,e,i,r,o,s):l.data[d];Da(u,!1);const h=c[nn].createComment("");yb(l,c,h,u),eo(h,c),Fb(c,c[d]=_O(h,c,h,u)),ib(u)&&mk(l,c,u),null!=s&&pk(c,u,a)}function Pt(n){return Ch(function RQ(){return Vt.lFrame.contextLView}(),fi+n)}function E(n,t,e){const i=we();return to(i,kh(),t)&&ls(Tn(),ki(),i,n,t,i[nn],e,!1),E}function Ek(n,t,e,i,r){const s=r?"class":"style";wk(n,e,t.inputs[s],s,i)}function _(n,t,e,i){const r=we(),o=Tn(),s=fi+n,a=r[nn],c=o.firstCreatePass?function MZ(n,t,e,i,r,o){const s=t.consts,c=Uh(t,n,2,i,_l(s,r));return _k(t,e,c,_l(s,o)),null!==c.attrs&&Nb(c,c.attrs,!1),null!==c.mergedAttrs&&Nb(c,c.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,c),c}(s,o,r,t,e,i):o.data[s],l=r[s]=BC(a,t,function HQ(){return Vt.lFrame.currentNamespace}()),d=ib(c);return Da(c,!0),yP(a,l,c),32!=(32&c.flags)&&yb(o,r,l,c),0===function SQ(){return Vt.lFrame.elementDepthCount}()&&eo(l,r),function DQ(){Vt.lFrame.elementDepthCount++}(),d&&(mk(o,r,c),fk(o,c,r)),null!==i&&pk(r,c),_}function v(){let n=Lr();cC()?lC():(n=n.parent,Da(n,!1));const t=n;!function AQ(){Vt.lFrame.elementDepthCount--}();const e=Tn();return e.firstCreatePass&&(sb(e,n),oC(n)&&e.queries.elementEnd(n)),null!=t.classesWithoutHost&&function GQ(n){return 0!=(8&n.flags)}(t)&&Ek(e,t,we(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function WQ(n){return 0!=(16&n.flags)}(t)&&Ek(e,t,we(),t.stylesWithoutHost,!1),v}function _e(n,t,e,i){return _(n,t,e,i),v(),_e}function zt(n,t,e){const i=we(),r=Tn(),o=n+fi,s=r.firstCreatePass?function RZ(n,t,e,i,r){const o=t.consts,s=_l(o,i),a=Uh(t,n,8,"ng-container",s);return null!==s&&Nb(a,s,!0),_k(t,e,a,_l(o,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(o,r,i,t,e):r.data[o];Da(s,!0);const a=i[o]=i[nn].createComment("");return yb(r,i,a,s),eo(a,i),ib(s)&&(mk(r,i,s),fk(r,s,i)),null!=e&&pk(i,s),zt}function jt(){let n=Lr();const t=Tn();return cC()?lC():(n=n.parent,Da(n,!1)),t.firstCreatePass&&(sb(t,n),oC(n)&&t.queries.elementEnd(n)),jt}function ds(n,t,e){return zt(n,t,e),jt(),ds}function Le(){return we()}function Ep(n){return!!n&&"function"==typeof n.then}function LO(n){return!!n&&"function"==typeof n.subscribe}const Tk=LO;function z(n,t,e,i){const r=we(),o=Tn(),s=Lr();return BO(o,r,r[nn],s,n,t,i),z}function Ub(n,t){const e=Lr(),i=we(),r=Tn();return BO(r,i,yO(uC(r.data),e,i),e,n,t),Ub}function BO(n,t,e,i,r,o,s){const a=ib(i),l=n.firstCreatePass&&vO(n),d=t[Oi],u=bO(t);let h=!0;if(3&i.type||s){const g=ss(i,t),p=s?s(g):g,b=u.length,C=s?D=>s(Nr(D[i.index])):i.index;let x=null;if(!s&&a&&(x=function FZ(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;oc?a[c]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==x)(x.__ngLastListenerFn__||x).__ngNextListenerFn__=o,x.__ngLastListenerFn__=o,h=!1;else{o=UO(i,t,d,o,!1);const D=e.listen(p,r,o);u.push(o,D),l&&l.push(r,C,b,b+1)}}else o=UO(i,t,d,o,!1);const f=i.outputs;let m;if(h&&null!==f&&(m=f[r])){const g=m.length;if(g)for(let p=0;p-1?jo(n.index,t):t);let c=VO(t,e,i,s),l=o.__ngNextListenerFn__;for(;l;)c=VO(t,e,l,s)&&c,l=l.__ngNextListenerFn__;return r&&!1===c&&(s.preventDefault(),s.returnValue=!1),c}}function O(n=1){return function LQ(n){return(Vt.lFrame.contextLView=function BQ(n,t){for(;n>0;)t=t[yh],n--;return t}(n,Vt.lFrame.contextLView))[Oi]}(n)}function PZ(n,t){let e=null;const i=function aY(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function Sk(n){return 2|n}function Wd(n){return(131068&n)>>2}function Dk(n,t){return-131069&n|t<<2}function Ak(n){return 1|n}function KO(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?vl(o):Wd(o),c=!1;for(;0!==a&&(!1===c||s);){const d=n[a+1];UZ(n[a],t)&&(c=!0,n[a+1]=i?Ak(d):Sk(d)),a=i?vl(d):Wd(d)}c&&(n[e+1]=i?Sk(o):Ak(o))}function UZ(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&Rh(n,t)>=0}const mr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function XO(n){return n.substring(mr.key,mr.keyEnd)}function YO(n,t){const e=mr.textEnd;return e===t?-1:(t=mr.keyEnd=function $Z(n,t,e){for(;t32;)t++;return t}(n,mr.key=t,e),Yh(n,t,e))}function Yh(n,t,e){for(;t=0;e=YO(t,e))as(n,XO(t),!0)}function aa(n,t,e,i){const r=we(),o=Tn(),s=yc(2);o.firstUpdatePass&&o4(o,n,s,i),t!==Ut&&to(r,s,t)&&a4(o,o.data[Io()],r,r[nn],n,r[s+1]=function tJ(n,t){return null==n||""===n||("string"==typeof t?n+=t:"object"==typeof n&&(n=si(cs(n)))),n}(t,e),i,s)}function ca(n,t,e,i){const r=Tn(),o=yc(2);r.firstUpdatePass&&o4(r,null,o,i);const s=we();if(e!==Ut&&to(s,o,e)){const a=r.data[Io()];if(l4(a,i)&&!r4(r,o)){let c=i?a.classesWithoutHost:a.stylesWithoutHost;null!==c&&(e=Qw(c,e||"")),Ek(r,a,s,e,i)}else!function eJ(n,t,e,i,r,o,s,a){r===Ut&&(r=On);let c=0,l=0,d=0=n.expandoStartIndex}function o4(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[Io()],s=r4(n,e);l4(o,i)&&null===t&&!s&&(t=!1),t=function QZ(n,t,e,i){const r=uC(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Tp(e=Ik(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=Ik(r,n,t,e,i),null===o){let c=function KZ(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Wd(i))return n[vl(i)]}(n,t,i);void 0!==c&&Array.isArray(c)&&(c=Ik(null,n,t,c[1],i),c=Tp(c,t.attrs,i),function XZ(n,t,e,i){n[vl(e?t.classBindings:t.styleBindings)]=i}(n,t,i,c))}else o=function YZ(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(l=!0)):d=e,r)if(0!==c){const h=vl(n[a+1]);n[i+1]=zb(h,a),0!==h&&(n[h+1]=Dk(n[h+1],i)),n[a+1]=function NZ(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=zb(a,0),0!==a&&(n[a+1]=Dk(n[a+1],i)),a=i;else n[i+1]=zb(c,0),0===a?a=i:n[c+1]=Dk(n[c+1],i),c=i;l&&(n[i+1]=Sk(n[i+1])),KO(n,d,i,!0),KO(n,d,i,!1),function VZ(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&Rh(o,t)>=0&&(e[i+1]=Ak(e[i+1]))}(t,d,n,i,o),s=zb(a,c),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function Ik(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const c=n[r],l=Array.isArray(c),d=l?c[1]:c,u=null===d;let h=e[r+1];h===Ut&&(h=u?On:void 0);let f=u?EC(h,i):d===i?h:void 0;if(l&&!jb(f)&&(f=EC(c,i)),jb(f)&&(a=f,s))return a;const m=n[r+1];r=s?vl(m):Wd(m)}if(null!==t){let c=o?t.residualClasses:t.residualStyles;null!=c&&(a=EC(c,i))}return a}function jb(n){return void 0!==n}function l4(n,t){return 0!=(n.flags&(t?8:16))}function k(n,t=""){const e=we(),i=Tn(),r=n+fi,o=i.firstCreatePass?Uh(i,r,1,t,null):i.data[r],s=e[r]=function LC(n,t){return n.createText(t)}(e[nn],t);yb(i,e,s,o),Da(o,!1)}function Ze(n){return it("",n,""),Ze}function it(n,t,e){const i=we(),r=zh(i,n,t,e);return r!==Ut&&Tc(i,Io(),r),it}function qd(n,t,e,i,r){const o=we(),s=function jh(n,t,e,i,r,o){const a=Gd(n,vc(),e,r);return yc(2),a?t+Bt(e)+i+Bt(r)+o:Ut}(o,n,t,e,i,r);return s!==Ut&&Tc(o,Io(),s),qd}function Zh(n,t,e,i,r,o,s){const a=we(),c=$h(a,n,t,e,i,r,o,s);return c!==Ut&&Tc(a,Io(),c),Zh}function Ba(n,t,e){const i=we();return to(i,kh(),t)&&ls(Tn(),ki(),i,n,t,i[nn],e,!0),Ba}function $b(n,t,e){const i=we();if(to(i,kh(),t)){const o=Tn(),s=ki();ls(o,s,i,n,t,yO(uC(o.data),s,i),e,!0)}return $b}const Qd=void 0;var yJ=["en",[["a","p"],["AM","PM"],Qd],[["AM","PM"],Qd,Qd],[["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"]],Qd,[["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"]],Qd,[["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}",Qd,"{1} 'at' {0}",Qd],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function vJ(n){const e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let Jh={};function Mo(n){const t=function xJ(n){return n.toLowerCase().replace(/_/g,"-")}(n);let e=S4(t);if(e)return e;const i=t.split("-")[0];if(e=S4(i),e)return e;if("en"===i)return yJ;throw new pe(701,!1)}function S4(n){return n in Jh||(Jh[n]=hi.ng&&hi.ng.common&&hi.ng.common.locales&&hi.ng.common.locales[n]),Jh[n]}var et=(()=>((et=et||{})[et.LocaleId=0]="LocaleId",et[et.DayPeriodsFormat=1]="DayPeriodsFormat",et[et.DayPeriodsStandalone=2]="DayPeriodsStandalone",et[et.DaysFormat=3]="DaysFormat",et[et.DaysStandalone=4]="DaysStandalone",et[et.MonthsFormat=5]="MonthsFormat",et[et.MonthsStandalone=6]="MonthsStandalone",et[et.Eras=7]="Eras",et[et.FirstDayOfWeek=8]="FirstDayOfWeek",et[et.WeekendRange=9]="WeekendRange",et[et.DateFormat=10]="DateFormat",et[et.TimeFormat=11]="TimeFormat",et[et.DateTimeFormat=12]="DateTimeFormat",et[et.NumberSymbols=13]="NumberSymbols",et[et.NumberFormats=14]="NumberFormats",et[et.CurrencyCode=15]="CurrencyCode",et[et.CurrencySymbol=16]="CurrencySymbol",et[et.CurrencyName=17]="CurrencyName",et[et.Currencies=18]="Currencies",et[et.Directionality=19]="Directionality",et[et.PluralCase=20]="PluralCase",et[et.ExtraData=21]="ExtraData",et))();const ef="en-US";let D4=ef;function Fk(n,t,e,i,r){if(n=At(n),Array.isArray(n))for(let o=0;o>20;if(jd(n)||!n.multi){const f=new cp(c,r,y),m=Ok(a,t,r?d:d+h,u);-1===m?(xC(hb(l,s),o,a),Pk(o,n,t.length),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),e.push(f),s.push(f)):(e[m]=f,s[m]=f)}else{const f=Ok(a,t,d+h,u),m=Ok(a,t,d,d+h),p=m>=0&&e[m];if(r&&!p||!r&&!(f>=0&&e[f])){xC(hb(l,s),o,a);const b=function bee(n,t,e,i,r){const o=new cp(n,e,y);return o.multi=[],o.index=t,o.componentProviders=0,J4(o,r,i&&!e),o}(r?_ee:gee,e.length,r,i,c);!r&&p&&(e[m].providerFactory=b),Pk(o,n,t.length,0),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),e.push(b),s.push(b)}else Pk(o,n,f>-1?f:m,J4(e[r?m:f],c,!r&&i));!r&&i&&p&&e[m].componentProviders++}}}function Pk(n,t,e,i){const r=jd(t),o=function RX(n){return!!n.useClass}(t);if(r||o){const c=(o?At(t.useClass):t).prototype.ngOnDestroy;if(c){const l=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const d=l.indexOf(e);-1===d?l.push(e,[i,c]):l[d+1].push(i,c)}else l.push(e,c)}}}function J4(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Ok(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function pee(n,t,e){const i=Tn();if(i.firstCreatePass){const r=oa(n);Fk(e,i.data,i.blueprint,r,!0),Fk(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class tf{}class eN{}class tN extends tf{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new wO(this);const i=rs(t);this._bootstrapComponents=Ec(i.bootstrap),this._r3Injector=nO(t,e,[{provide:tf,useValue:this},{provide:bl,useValue:this.componentFactoryResolver}],si(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Lk extends eN{constructor(t){super(),this.moduleType=t}create(t){return new tN(this.moduleType,t)}}class yee extends tf{constructor(t,e,i){super(),this.componentFactoryResolver=new wO(this),this.instance=null;const r=new HP([...t,{provide:tf,useValue:this},{provide:bl,useValue:this.componentFactoryResolver}],e||Ab(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Kb(n,t,e=null){return new yee(n,t,e).injector}let xee=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=LP(0,e.type),r=i.length>0?Kb([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=ke({token:n,providedIn:"environment",factory:()=>new n(Q(Ra))}),n})();function Bk(n){n.getStandaloneInjector=t=>t.get(xee).getOrCreateStandaloneInjector(n)}function us(n,t,e){const i=Ao()+n,r=we();return r[i]===Ut?Oa(r,i,e?t.call(e):t()):function kp(n,t){return n[t]}(r,i)}function la(n,t,e,i){return cN(we(),Ao(),n,t,e,i)}function Uk(n,t,e,i,r){return lN(we(),Ao(),n,t,e,i,r)}function Rp(n,t){const e=n[t];return e===Ut?void 0:e}function cN(n,t,e,i,r,o){const s=t+e;return to(n,s,r)?Oa(n,s+1,o?i.call(o,r):i(r)):Rp(n,s+1)}function lN(n,t,e,i,r,o,s){const a=t+e;return Gd(n,a,r,o)?Oa(n,a+2,s?i.call(s,r,o):i(r,o)):Rp(n,a+2)}function no(n,t){const e=Tn();let i;const r=n+fi;e.firstCreatePass?(i=function Lee(n,t){if(t)for(let e=t.length-1;e>=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Od(i.type)),s=As(y);try{const a=ub(!1),c=o();return ub(a),function IZ(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,we(),r,c),c}finally{As(s)}}function Va(n,t,e){const i=n+fi,r=we(),o=Ch(r,i);return Fp(r,i)?cN(r,Ao(),t,o.transform,e,o):o.transform(e)}function Kd(n,t,e,i){const r=n+fi,o=we(),s=Ch(o,r);return Fp(o,r)?lN(o,Ao(),t,s.transform,e,i,s):s.transform(e,i)}function Fp(n,t){return n[rt].data[t].pure}function Hk(n){return t=>{setTimeout(n,void 0,t)}}const De=class Hee extends Me{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const c=t;r=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=Hk(o),r&&(r=Hk(r)),s&&(s=Hk(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof lt&&t.add(a),a}};function zee(){return this._results[Symbol.iterator]()}class yl{get changes(){return this._changes||(this._changes=new De)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=yl.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=zee)}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){const i=this;i.dirty=!1;const r=function Rs(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function nK(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=Gee,n})();const jee=Un,$ee=class extends jee{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tView,r=Mb(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[rp]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Sa];return null!==s&&(r[Sa]=s.createEmbeddedView(i)),hk(i,r,t),new wp(r)}};function Gee(){return Xb(Lr(),we())}function Xb(n,t){return 4&n.type?new $ee(t,n,Lh(n,t)):null}let ii=(()=>{class n{}return n.__NG_ELEMENT_ID__=Wee,n})();function Wee(){return pN(Lr(),we())}const qee=ii,fN=class extends qee{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return Lh(this._hostTNode,this._hostLView)}get injector(){return new Sh(this._hostTNode,this._hostLView)}get parentInjector(){const t=yC(this._hostTNode,this._hostLView);if(TF(t)){const e=db(t,this._hostLView),i=lb(t);return new Sh(e[rt].data[i+8],e)}return new Sh(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=mN(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Do}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function up(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const u=e||{};a=u.index,i=u.injector,r=u.projectableNodes,o=u.environmentInjector||u.ngModuleRef}const c=s?t:new Cp(Vn(t)),l=i||this.parentInjector;if(!o&&null==c.ngModule){const h=(s?l:this.parentInjector).get(Ra,null);h&&(o=h)}const d=c.create(l,r,void 0,o);return this.insert(d.hostView,a),d}insert(t,e){const i=t._lView,r=i[rt];if(function TQ(n){return ra(n[Di])}(i)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const u=i[Di],h=new fN(u,u[Zr],u[Di]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function $K(n,t,e,i){const r=Do+i,o=e.length;i>0&&(e[r-1][ia]=t),i0)i.push(s[a/2]);else{const l=o[a+1],d=t[-c];for(let u=Do;u{class n{constructor(e){this.appInits=e,this.resolve=Zb,this.reject=Zb,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:c})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(Q(Jb,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const sf=new ae("AppId",{providedIn:"root",factory:function BN(){return`${Jk()}${Jk()}${Jk()}`}});function Jk(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const VN=new ae("Platform Initializer"),tv=new ae("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Jn=new ae("AnimationModuleType");let vte=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ua=new ae("LocaleId",{providedIn:"root",factory:()=>Et(Ua,It.Optional|It.SkipSelf)||function yte(){return typeof $localize<"u"&&$localize.locale||ef}()});class wte{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let UN=(()=>{class n{compileModuleSync(e){return new Lk(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ec(rs(e).declarations).reduce((s,a)=>{const c=Vn(a);return c&&s.push(new Cp(c)),s},[]);return new wte(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ete=(()=>Promise.resolve(0))();function eE(n){typeof Zone>"u"?Ete.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Xe{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new De(!1),this.onMicrotaskEmpty=new De(!1),this.onStable=new De(!1),this.onError=new De(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Tte(){let n=hi.requestAnimationFrame,t=hi.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function Ate(n){const t=()=>{!function Dte(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(hi,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,nE(n),n.isCheckStableRunning=!0,tE(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),nE(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return jN(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),$N(n)}},onInvoke:(e,i,r,o,s,a,c)=>{try{return jN(n),e.invoke(r,o,s,a,c)}finally{n.shouldCoalesceRunChangeDetection&&t(),$N(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,nE(n),tE(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Xe.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(Xe.isInAngularZone())throw new pe(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,Ste,Zb,Zb);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)}}const Ste={};function tE(n){if(0==n._nesting&&!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 nE(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function jN(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function $N(n){n._nesting--,tE(n)}class Ite{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new De,this.onMicrotaskEmpty=new De,this.onStable=new De,this.onError=new De}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)}}const GN=new ae(""),nv=new ae("");let oE,iE=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,oE||(function Mte(n){oE=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Xe.assertNotInAngularZone(),eE(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())eE(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(Q(Xe),Q(rE),Q(nv))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),rE=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return oE?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Sc=!1;let xl=null;const WN=new ae("AllowMultipleToken"),sE=new ae("PlatformDestroyListeners"),qN=new ae("appBootstrapListener");class QN{constructor(t,e){this.name=t,this.token=e}}function XN(n,t,e=[]){const i=`Platform: ${t}`,r=new ae(i);return(o=[])=>{let s=aE();if(!s||s.injector.get(WN,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function Pte(n){if(xl&&!xl.get(WN,!1))throw new pe(400,!1);xl=n;const t=n.get(ZN);(function KN(n){const t=n.get(VN,null);t&&t.forEach(e=>e())})(n)}(function YN(n=[],t){return Ni.create({name:t,providers:[{provide:ek,useValue:"platform"},{provide:sE,useValue:new Set([()=>xl=null])},...n]})}(a,i))}return function Nte(n){const t=aE();if(!t)throw new pe(401,!1);return t}()}}function aE(){return xl?.get(ZN)??null}let ZN=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function eL(n,t){let e;return e="noop"===n?new Ite:("zone.js"===n?void 0:n)||new Xe(t),e}(i?.ngZone,function JN(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Xe,useValue:r}];return r.run(()=>{const s=Ni.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),c=a.injector.get(kc,null);if(!c)throw new pe(402,!1);return r.runOutsideAngular(()=>{const l=r.onError.subscribe({next:d=>{c.handleError(d)}});a.onDestroy(()=>{iv(this._modules,a),l.unsubscribe()})}),function tL(n,t,e){try{const i=e();return Ep(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(c,r,()=>{const l=a.injector.get(ev);return l.runInitializers(),l.donePromise.then(()=>(function A4(n){Ds(n,"Expected localeId to be defined"),"string"==typeof n&&(D4=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ua,ef)||ef),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=nL({},i);return function Rte(n,t,e){const i=new Lk(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(af);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new pe(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(sE,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(Q(Ni))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function nL(n,t){return Array.isArray(t)?t.reduce(nL,n):{...n,...t}}let af=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Dn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new Dn(a=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{Xe.assertNotInAngularZone(),eE(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const l=this._zone.onUnstable.subscribe(()=>{Xe.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{c.unsubscribe(),l.unsubscribe()}});this.isStable=oi(o,s.pipe(HR()))}bootstrap(e,i){const r=e instanceof jP;if(!this._injector.get(ev).done){!r&&function bh(n){const t=Vn(n)||Yr(n)||zo(n);return null!==t&&t.standalone}(e);throw new pe(405,Sc)}let s;s=r?e:this._injector.get(bl).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function Fte(n){return n.isBoundToModule}(s)?void 0:this._injector.get(tf),l=s.create(Ni.NULL,[],i||s.selector,a),d=l.location.nativeElement,u=l.injector.get(GN,null);return u?.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),iv(this.components,l),u?.unregisterApplication(d)}),this._loadComponent(l),l}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;iv(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(qN,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>iv(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(Q(Xe),Q(Ra),Q(kc))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function iv(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let an=(()=>{class n{}return n.__NG_ELEMENT_ID__=Bte,n})();function Bte(n){return function Vte(n,t,e){if(sp(n)&&!e){const i=jo(n.index,t);return new wp(i,i)}return 47&n.type?new wp(t[Jr],t):null}(Lr(),we(),16==(16&n))}class aL{constructor(){}supports(t){return Bb(t)}create(t){return new Gte(t)}}const $te=(n,t)=>t;class Gte{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||$te}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;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 null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new Wte(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?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._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new cL),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new cL),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(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._nextIdentityChange=t,t}}class Wte{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class qte{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(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;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class cL{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new qte,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function lL(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Kte(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class Kte{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function uL(){return new Dc([new aL])}let Dc=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||uL()),deps:[[n,new Vd,new Ia]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new pe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:uL}),n})();function hL(){return new Op([new dL])}let Op=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||hL()),deps:[[n,new Vd,new Ia]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new pe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:hL}),n})();const Zte=XN(null,"core",[]);let Jte=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(Q(af))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();function cf(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}let hE=null;function Ac(){return hE}class nne{}const gt=new ae("DocumentToken");let fE=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return function ine(){return Q(fL)}()},providedIn:"platform"}),n})();const rne=new ae("Location Initialized");let fL=(()=>{class n extends fE{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ac().getBaseHref(this._doc)}onPopState(e){const i=Ac().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Ac().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){mL()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){mL()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:function(){return function one(){return new fL(Q(gt))}()},providedIn:"platform"}),n})();function mL(){return!!window.history.pushState}function mE(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function pL(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function Ic(n){return n&&"?"!==n[0]?"?"+n:n}let Zd=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(_L)},providedIn:"root"}),n})();const gL=new ae("appBaseHref");let _L=(()=>{class n extends Zd{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Et(gt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return mE(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ic(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ic(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ic(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(fE),Q(gL,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sne=(()=>{class n extends Zd{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=mE(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ic(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ic(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(fE),Q(gL,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Np=(()=>{class n{constructor(e){this._subject=new De,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function lne(n){if(new RegExp("^(https?:)?//").test(n)){const[,e]=n.split(/\/\/[^\/]+/);return e}return n}(pL(bL(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ic(i))}normalize(e){return n.stripTrailingSlash(function cne(n,t){if(!n||!t.startsWith(n))return t;const e=t.substring(n.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,bL(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ic(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ic(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=Ic,n.joinWithSlash=mE,n.stripTrailingSlash=pL,n.\u0275fac=function(e){return new(e||n)(Q(Zd))},n.\u0275prov=ke({token:n,factory:function(){return function ane(){return new Np(Q(Zd))}()},providedIn:"root"}),n})();function bL(n){return n.replace(/\/index.html$/,"")}var Li=(()=>((Li=Li||{})[Li.Format=0]="Format",Li[Li.Standalone=1]="Standalone",Li))(),fn=(()=>((fn=fn||{})[fn.Narrow=0]="Narrow",fn[fn.Abbreviated=1]="Abbreviated",fn[fn.Wide=2]="Wide",fn[fn.Short=3]="Short",fn))(),Ei=(()=>((Ei=Ei||{})[Ei.Short=0]="Short",Ei[Ei.Medium=1]="Medium",Ei[Ei.Long=2]="Long",Ei[Ei.Full=3]="Full",Ei))(),Tt=(()=>((Tt=Tt||{})[Tt.Decimal=0]="Decimal",Tt[Tt.Group=1]="Group",Tt[Tt.List=2]="List",Tt[Tt.PercentSign=3]="PercentSign",Tt[Tt.PlusSign=4]="PlusSign",Tt[Tt.MinusSign=5]="MinusSign",Tt[Tt.Exponential=6]="Exponential",Tt[Tt.SuperscriptingExponent=7]="SuperscriptingExponent",Tt[Tt.PerMille=8]="PerMille",Tt[Tt.Infinity=9]="Infinity",Tt[Tt.NaN=10]="NaN",Tt[Tt.TimeSeparator=11]="TimeSeparator",Tt[Tt.CurrencyDecimal=12]="CurrencyDecimal",Tt[Tt.CurrencyGroup=13]="CurrencyGroup",Tt))();function sv(n,t){return Os(Mo(n)[et.DateFormat],t)}function av(n,t){return Os(Mo(n)[et.TimeFormat],t)}function cv(n,t){return Os(Mo(n)[et.DateTimeFormat],t)}function Ps(n,t){const e=Mo(n),i=e[et.NumberSymbols][t];if(typeof i>"u"){if(t===Tt.CurrencyDecimal)return e[et.NumberSymbols][Tt.Decimal];if(t===Tt.CurrencyGroup)return e[et.NumberSymbols][Tt.Group]}return i}function yL(n){if(!n[et.ExtraData])throw new Error(`Missing extra locale data for the locale "${n[et.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Os(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new Error("Locale data API: locale data undefined")}function gE(n){const[t,e]=n.split(":");return{hours:+t,minutes:+e}}const wne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Lp={},Cne=/((?:[^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]*)/;var pr=(()=>((pr=pr||{})[pr.Short=0]="Short",pr[pr.ShortGMT=1]="ShortGMT",pr[pr.Long=2]="Long",pr[pr.Extended=3]="Extended",pr))(),Mt=(()=>((Mt=Mt||{})[Mt.FullYear=0]="FullYear",Mt[Mt.Month=1]="Month",Mt[Mt.Date=2]="Date",Mt[Mt.Hours=3]="Hours",Mt[Mt.Minutes=4]="Minutes",Mt[Mt.Seconds=5]="Seconds",Mt[Mt.FractionalSeconds=6]="FractionalSeconds",Mt[Mt.Day=7]="Day",Mt))(),Zt=(()=>((Zt=Zt||{})[Zt.DayPeriods=0]="DayPeriods",Zt[Zt.Days=1]="Days",Zt[Zt.Months=2]="Months",Zt[Zt.Eras=3]="Eras",Zt))();function kne(n,t,e,i){let r=function Fne(n){if(CL(n))return n;if("number"==typeof n&&!isNaN(n))return new Date(n);if("string"==typeof n){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){const[r,o=1,s=1]=n.split("-").map(a=>+a);return lv(r,o-1,s)}const e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(wne))return function Pne(n){const t=new Date(0);let e=0,i=0;const 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]));const s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,c=Number(n[6]||0),l=Math.floor(1e3*parseFloat("0."+(n[7]||0)));return o.call(t,s,a,c,l),t}(i)}const t=new Date(n);if(!CL(t))throw new Error(`Unable to convert "${n}" into a date`);return t}(n);t=Mc(e,t)||t;let a,s=[];for(;t;){if(a=Cne.exec(t),!a){s.push(t);break}{s=s.concat(a.slice(1));const d=s.pop();if(!d)break;t=d}}let c=r.getTimezoneOffset();i&&(c=wL(i,c),r=function Rne(n,t,e){const i=e?-1:1,r=n.getTimezoneOffset();return function Mne(n,t){return(n=new Date(n.getTime())).setMinutes(n.getMinutes()+t),n}(n,i*(wL(t,r)-r))}(r,i,!0));let l="";return s.forEach(d=>{const u=function Ine(n){if(bE[n])return bE[n];let t;switch(n){case"G":case"GG":case"GGG":t=ai(Zt.Eras,fn.Abbreviated);break;case"GGGG":t=ai(Zt.Eras,fn.Wide);break;case"GGGGG":t=ai(Zt.Eras,fn.Narrow);break;case"y":t=Zi(Mt.FullYear,1,0,!1,!0);break;case"yy":t=Zi(Mt.FullYear,2,0,!0,!0);break;case"yyy":t=Zi(Mt.FullYear,3,0,!1,!0);break;case"yyyy":t=Zi(Mt.FullYear,4,0,!1,!0);break;case"Y":t=fv(1);break;case"YY":t=fv(2,!0);break;case"YYY":t=fv(3);break;case"YYYY":t=fv(4);break;case"M":case"L":t=Zi(Mt.Month,1,1);break;case"MM":case"LL":t=Zi(Mt.Month,2,1);break;case"MMM":t=ai(Zt.Months,fn.Abbreviated);break;case"MMMM":t=ai(Zt.Months,fn.Wide);break;case"MMMMM":t=ai(Zt.Months,fn.Narrow);break;case"LLL":t=ai(Zt.Months,fn.Abbreviated,Li.Standalone);break;case"LLLL":t=ai(Zt.Months,fn.Wide,Li.Standalone);break;case"LLLLL":t=ai(Zt.Months,fn.Narrow,Li.Standalone);break;case"w":t=_E(1);break;case"ww":t=_E(2);break;case"W":t=_E(1,!0);break;case"d":t=Zi(Mt.Date,1);break;case"dd":t=Zi(Mt.Date,2);break;case"c":case"cc":t=Zi(Mt.Day,1);break;case"ccc":t=ai(Zt.Days,fn.Abbreviated,Li.Standalone);break;case"cccc":t=ai(Zt.Days,fn.Wide,Li.Standalone);break;case"ccccc":t=ai(Zt.Days,fn.Narrow,Li.Standalone);break;case"cccccc":t=ai(Zt.Days,fn.Short,Li.Standalone);break;case"E":case"EE":case"EEE":t=ai(Zt.Days,fn.Abbreviated);break;case"EEEE":t=ai(Zt.Days,fn.Wide);break;case"EEEEE":t=ai(Zt.Days,fn.Narrow);break;case"EEEEEE":t=ai(Zt.Days,fn.Short);break;case"a":case"aa":case"aaa":t=ai(Zt.DayPeriods,fn.Abbreviated);break;case"aaaa":t=ai(Zt.DayPeriods,fn.Wide);break;case"aaaaa":t=ai(Zt.DayPeriods,fn.Narrow);break;case"b":case"bb":case"bbb":t=ai(Zt.DayPeriods,fn.Abbreviated,Li.Standalone,!0);break;case"bbbb":t=ai(Zt.DayPeriods,fn.Wide,Li.Standalone,!0);break;case"bbbbb":t=ai(Zt.DayPeriods,fn.Narrow,Li.Standalone,!0);break;case"B":case"BB":case"BBB":t=ai(Zt.DayPeriods,fn.Abbreviated,Li.Format,!0);break;case"BBBB":t=ai(Zt.DayPeriods,fn.Wide,Li.Format,!0);break;case"BBBBB":t=ai(Zt.DayPeriods,fn.Narrow,Li.Format,!0);break;case"h":t=Zi(Mt.Hours,1,-12);break;case"hh":t=Zi(Mt.Hours,2,-12);break;case"H":t=Zi(Mt.Hours,1);break;case"HH":t=Zi(Mt.Hours,2);break;case"m":t=Zi(Mt.Minutes,1);break;case"mm":t=Zi(Mt.Minutes,2);break;case"s":t=Zi(Mt.Seconds,1);break;case"ss":t=Zi(Mt.Seconds,2);break;case"S":t=Zi(Mt.FractionalSeconds,1);break;case"SS":t=Zi(Mt.FractionalSeconds,2);break;case"SSS":t=Zi(Mt.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=uv(pr.Short);break;case"ZZZZZ":t=uv(pr.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=uv(pr.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=uv(pr.Long);break;default:return null}return bE[n]=t,t}(d);l+=u?u(r,e,c):"''"===d?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function lv(n,t,e){const i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function Mc(n,t){const e=function dne(n){return Mo(n)[et.LocaleId]}(n);if(Lp[e]=Lp[e]||{},Lp[e][t])return Lp[e][t];let i="";switch(t){case"shortDate":i=sv(n,Ei.Short);break;case"mediumDate":i=sv(n,Ei.Medium);break;case"longDate":i=sv(n,Ei.Long);break;case"fullDate":i=sv(n,Ei.Full);break;case"shortTime":i=av(n,Ei.Short);break;case"mediumTime":i=av(n,Ei.Medium);break;case"longTime":i=av(n,Ei.Long);break;case"fullTime":i=av(n,Ei.Full);break;case"short":const r=Mc(n,"shortTime"),o=Mc(n,"shortDate");i=dv(cv(n,Ei.Short),[r,o]);break;case"medium":const s=Mc(n,"mediumTime"),a=Mc(n,"mediumDate");i=dv(cv(n,Ei.Medium),[s,a]);break;case"long":const c=Mc(n,"longTime"),l=Mc(n,"longDate");i=dv(cv(n,Ei.Long),[c,l]);break;case"full":const d=Mc(n,"fullTime"),u=Mc(n,"fullDate");i=dv(cv(n,Ei.Full),[d,u])}return i&&(Lp[e][t]=i),i}function dv(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return null!=t&&i in t?t[i]:e})),n}function ua(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=1-n:(n=-n,o=e));let s=String(n);for(;s.length0||a>-e)&&(a+=e),n===Mt.Hours)0===a&&-12===e&&(a=12);else if(n===Mt.FractionalSeconds)return function Ene(n,t){return ua(n,3).substring(0,t)}(a,t);const c=Ps(s,Tt.MinusSign);return ua(a,t,c,i,r)}}function ai(n,t,e=Li.Format,i=!1){return function(r,o){return function Sne(n,t,e,i,r,o){switch(e){case Zt.Months:return function fne(n,t,e){const i=Mo(n),o=Os([i[et.MonthsFormat],i[et.MonthsStandalone]],t);return Os(o,e)}(t,r,i)[n.getMonth()];case Zt.Days:return function hne(n,t,e){const i=Mo(n),o=Os([i[et.DaysFormat],i[et.DaysStandalone]],t);return Os(o,e)}(t,r,i)[n.getDay()];case Zt.DayPeriods:const s=n.getHours(),a=n.getMinutes();if(o){const l=function _ne(n){const t=Mo(n);return yL(t),(t[et.ExtraData][2]||[]).map(i=>"string"==typeof i?gE(i):[gE(i[0]),gE(i[1])])}(t),d=function bne(n,t,e){const i=Mo(n);yL(i);const o=Os([i[et.ExtraData][0],i[et.ExtraData][1]],t)||[];return Os(o,e)||[]}(t,r,i),u=l.findIndex(h=>{if(Array.isArray(h)){const[f,m]=h,g=s>=f.hours&&a>=f.minutes,p=s0?Math.floor(r/60):Math.ceil(r/60);switch(n){case pr.Short:return(r>=0?"+":"")+ua(s,2,o)+ua(Math.abs(r%60),2,o);case pr.ShortGMT:return"GMT"+(r>=0?"+":"")+ua(s,1,o);case pr.Long:return"GMT"+(r>=0?"+":"")+ua(s,2,o)+":"+ua(Math.abs(r%60),2,o);case pr.Extended:return 0===i?"Z":(r>=0?"+":"")+ua(s,2,o)+":"+ua(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${n}"`)}}}const Dne=0,hv=4;function xL(n){return lv(n.getFullYear(),n.getMonth(),n.getDate()+(hv-n.getDay()))}function _E(n,t=!1){return function(e,i){let r;if(t){const o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{const o=xL(e),s=function Ane(n){const t=lv(n,Dne,1).getDay();return lv(n,0,1+(t<=hv?hv:hv+7)-t)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return ua(r,n,Ps(i,Tt.MinusSign))}}function fv(n,t=!1){return function(e,i){return ua(xL(e).getFullYear(),n,Ps(i,Tt.MinusSign),t)}}const bE={};function wL(n,t){n=n.replace(/:/g,"");const e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function CL(n){return n instanceof Date&&!isNaN(n.valueOf())}function SL(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const kE=/\s+/,DL=[];let ha=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=DL,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(kE):DL}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(kE):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(kE).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(y(Dc),y(Op),y(Ne),y(Cc))},n.\u0275dir=X({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class qne{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let io=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new qne(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),ML(a,r)}});for(let r=0,o=i.length;r{ML(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un),y(Dc))},n.\u0275dir=X({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function ML(n,t){n.context.$implicit=t.item}let ri=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new Kne,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){RL("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){RL("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un))},n.\u0275dir=X({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class Kne{constructor(){this.$implicit=null,this.ngIf=null}}function RL(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${si(t)}'.`)}class EE{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Vp=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),TE=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new EE(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un),y(Vp,9))},n.\u0275dir=X({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),FL=(()=>{class n{constructor(e,i,r){r._addDefault(new EE(e,i))}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un),y(Vp,9))},n.\u0275dir=X({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),pv=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(y(ii))},n.\u0275dir=X({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[jn]}),n})();function fa(n,t){return new pe(2100,!1)}class Zne{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class Jne{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const eie=new Jne,tie=new Zne;let SE=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(Ep(e))return eie;if(LO(e))return tie;throw fa()}_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._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(y(an,16))},n.\u0275pipe=Xr({name:"async",type:n,pure:!1,standalone:!0}),n})(),DE=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fa();return e.toUpperCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=Xr({name:"uppercase",type:n,pure:!0,standalone:!0}),n})();const sie=new ae("DATE_PIPE_DEFAULT_TIMEZONE"),aie=new ae("DATE_PIPE_DEFAULT_OPTIONS");let Jd=(()=>{class n{constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(null==e||""===e||e!=e)return null;try{return kne(e,i??this.defaultOptions?.dateFormat??"mediumDate",o||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(s){throw fa()}}}return n.\u0275fac=function(e){return new(e||n)(y(Ua,16),y(sie,24),y(aie,24))},n.\u0275pipe=Xr({name:"date",type:n,pure:!0,standalone:!0}),n})(),Br=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const NL="browser";let xie=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>new wie(Q(gt),window)}),n})();class wie{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function Cie(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=LL(this.window.history)||LL(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function LL(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class BL{}class Xie extends nne{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class FE extends Xie{static makeCurrent(){!function tne(n){hE||(hE=n)}(new FE)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).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"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function Yie(){return Hp=Hp||document.querySelector("base"),Hp?Hp.getAttribute("href"):null}();return null==e?null:function Zie(n){bv=bv||document.createElement("a"),bv.setAttribute("href",n);const t=bv.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Hp=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return SL(document.cookie,t)}}let bv,Hp=null;const jL=new ae("TRANSITION_ID"),ere=[{provide:Jb,useFactory:function Jie(n,t,e){return()=>{e.get(ev).donePromise.then(()=>{const i=Ac(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const vv=new ae("EventManagerPlugins");let yv=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),zp=(()=>{class n extends GL{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const PE={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/MathML/"},OE=/%COMP%/g,QL=new ae("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function KL(n,t){return t.flat(100).map(e=>e.replace(OE,n))}function XL(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let xv=(()=>{class n{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new NE(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof JL?r.applyToHost(e):r instanceof LE&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,c=this.removeStylesOnCompDestory;switch(i.encapsulation){case na.Emulated:o=new JL(s,a,i,this.appId,c);break;case na.ShadowDom:return new lre(s,a,e,i);default:o=new LE(s,a,i,c)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(Q(yv),Q(zp),Q(sf),Q(QL))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class NE{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(PE[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(ZL(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(ZL(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);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;const o=PE[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=PE[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&($o.DashCase|$o.Important)?t.style.setProperty(e,i,r&$o.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&$o.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,XL(i)):this.eventManager.addEventListener(t,e,XL(i))}}function ZL(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class lre extends NE{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=KL(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}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(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class LE extends NE{constructor(t,e,i,r,o=i.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=KL(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class JL extends LE{constructor(t,e,i,r,o){const s=r+"-"+i.id;super(t,e,i,o,s),this.contentAttr=function sre(n){return"_ngcontent-%COMP%".replace(OE,n)}(s),this.hostAttr=function are(n){return"_nghost-%COMP%".replace(OE,n)}(s)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}let dre=(()=>{class n extends $L{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const e3=["alt","control","meta","shift"],ure={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hre={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let fre=(()=>{class n extends $L{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ac().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),e3.forEach(l=>{const d=i.indexOf(l);d>-1&&(i.splice(d,1),s+=l+".")}),s+=o,0!=i.length||0===o.length)return null;const c={};return c.domEventName=r,c.fullKey=s,c}static matchEventFullKeyCode(e,i){let r=ure[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),e3.forEach(s=>{s!==r&&(0,hre[s])(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"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const n3=[{provide:tv,useValue:NL},{provide:VN,useValue:function mre(){FE.makeCurrent()},multi:!0},{provide:gt,useFactory:function gre(){return function iX(n){WC=n}(document),document},deps:[]}],_re=XN(Zte,"browser",n3),r3=new ae(""),o3=[{provide:nv,useClass:class tre{addToWindow(t){hi.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},hi.getAllAngularTestabilities=()=>t.getAllTestabilities(),hi.getAllAngularRootElements=()=>t.getAllRootElements(),hi.frameworkStabilizers||(hi.frameworkStabilizers=[]),hi.frameworkStabilizers.push(i=>{const r=hi.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(c){s=s||c,o--,0==o&&i(s)};r.forEach(function(c){c.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Ac().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:GN,useClass:iE,deps:[Xe,rE,nv]},{provide:iE,useClass:iE,deps:[Xe,rE,nv]}],s3=[{provide:ek,useValue:"root"},{provide:kc,useFactory:function pre(){return new kc},deps:[]},{provide:vv,useClass:dre,multi:!0,deps:[gt,Xe,tv]},{provide:vv,useClass:fre,multi:!0,deps:[gt]},{provide:xv,useClass:xv,deps:[yv,zp,sf,QL]},{provide:yp,useExisting:xv},{provide:GL,useExisting:zp},{provide:zp,useClass:zp,deps:[gt]},{provide:yv,useClass:yv,deps:[vv,Xe]},{provide:BL,useClass:nre,deps:[]},[]];let a3=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:sf,useValue:e.appId},{provide:jL,useExisting:sf},ere]}}}return n.\u0275fac=function(e){return new(e||n)(Q(r3,12))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[...s3,...o3],imports:[Br,Jte]}),n})(),c3=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:function(e){let i=null;return i=e?new e:function vre(){return new c3(Q(gt))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let UE=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(e){let i=null;return i=e?new(e||n):Q(u3),i},providedIn:"root"}),n})(),u3=(()=>{class n extends UE{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Nn.NONE:return i;case Nn.HTML:return Ma(i,"HTML")?cs(i):MP(this._doc,String(i)).toString();case Nn.STYLE:return Ma(i,"Style")?cs(i):i;case Nn.SCRIPT:if(Ma(i,"Script"))return cs(i);throw new Error("unsafe value used in a script context");case Nn.URL:return Ma(i,"URL")?cs(i):kb(String(i));case Nn.RESOURCE_URL:if(Ma(i,"ResourceURL"))return cs(i);throw new Error(`unsafe value used in a resource URL context (see ${$0})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${$0})`)}}bypassSecurityTrustHtml(e){return function dX(n){return new rX(n)}(e)}bypassSecurityTrustStyle(e){return function uX(n){return new oX(n)}(e)}bypassSecurityTrustScript(e){return function hX(n){return new sX(n)}(e)}bypassSecurityTrustUrl(e){return function fX(n){return new aX(n)}(e)}bypassSecurityTrustResourceUrl(e){return function mX(n){return new cX(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:function(e){let i=null;return i=e?new e:function kre(n){return new u3(n.get(gt))}(Q(Ni)),i},providedIn:"root"}),n})();function nt(...n){return Pi(n,Zm(n))}class Ti extends Me{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){const{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}const lf=hc(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:Ere}=Array,{getPrototypeOf:Tre,prototype:Sre,keys:Dre}=Object;function h3(n){if(1===n.length){const t=n[0];if(Ere(t))return{args:t,keys:null};if(function Are(n){return n&&"object"==typeof n&&Tre(n)===Sre}(t)){const e=Dre(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}const{isArray:Ire}=Array;function HE(n){return ct(t=>function Mre(n,t){return Ire(t)?n(...t):n(t)}(n,t))}function f3(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Cl(...n){const t=Zm(n),e=LR(n),{args:i,keys:r}=h3(n);if(0===i.length)return Pi([],t);const o=new Dn(function Rre(n,t,e=pl){return i=>{m3(t,()=>{const{length:r}=n,o=new Array(r);let s=r,a=r;for(let c=0;c{const l=Pi(n[c],t);let d=!1;l.subscribe(ui(i,u=>{o[c]=u,d||(d=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}(i,t,r?s=>f3(r,s):pl));return e?o.pipe(HE(e)):o}function m3(n,t,e){n?mc(e,n,t):t()}function jp(...n){return function Fre(){return gh(1)}()(Pi(n,Zm(n)))}function df(n){return new Dn(t=>{Kr(n()).subscribe(t)})}function eu(n,t){const e=sn(n)?n:()=>n,i=r=>r.error(e());return new Dn(t?r=>t.schedule(i,0,r):i)}function zE(){return Ci((n,t)=>{let e=null;n._refCount++;const i=ui(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(e=null);const r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}class jE extends Dn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,CR(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new lt;const e=this.getSubject();t.add(this.source.subscribe(ui(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=lt.EMPTY)}return t}refCount(){return zE()(this)}}function Ji(n,t){return Ci((e,i)=>{let r=null,o=0,s=!1;const a=()=>s&&!r&&i.complete();e.subscribe(ui(i,c=>{r?.unsubscribe();let l=0;const d=o++;Kr(n(c,d)).subscribe(r=ui(i,u=>i.next(t?t(c,u,d,l++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function An(n){return n<=0?()=>ns:Ci((t,e)=>{let i=0;t.subscribe(ui(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function er(...n){const t=Zm(n);return Ci((e,i)=>{(t?jp(n,e,t):jp(n,e)).subscribe(i)})}function mn(n,t){return Ci((e,i)=>{let r=0;e.subscribe(ui(i,o=>n.call(t,o,r++)&&i.next(o)))})}function wv(n){return Ci((t,e)=>{let i=!1;t.subscribe(ui(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}function p3(n=Pre){return Ci((t,e)=>{let i=!1;t.subscribe(ui(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function Pre(){return new lf}function Ns(n,t){const e=arguments.length>=2;return i=>i.pipe(n?mn((r,o)=>n(r,o,i)):pl,An(1),e?wv(t):p3(()=>new lf))}function kl(n,t){return sn(t)?hr(n,t,1):hr(n,1)}function gi(n,t,e){const i=sn(n)||t||e?{next:n,error:t,complete:e}:n;return i?Ci((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(ui(o,c=>{var l;null===(l=i.next)||void 0===l||l.call(i,c),o.next(c)},()=>{var c;a=!1,null===(c=i.complete)||void 0===c||c.call(i),o.complete()},c=>{var l;a=!1,null===(l=i.error)||void 0===l||l.call(i,c),o.error(c)},()=>{var c,l;a&&(null===(c=i.unsubscribe)||void 0===c||c.call(i)),null===(l=i.finalize)||void 0===l||l.call(i)}))}):pl}function Vi(n){return Ci((t,e)=>{let o,i=null,r=!1;i=t.subscribe(ui(e,void 0,void 0,s=>{o=Kr(n(s,Vi(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function g3(n,t){return Ci(function Ore(n,t,e,i,r){return(o,s)=>{let a=e,c=t,l=0;o.subscribe(ui(s,d=>{const u=l++;c=a?n(c,d,u):(a=!0,d),i&&s.next(c)},r&&(()=>{a&&s.next(c),s.complete()})))}}(n,t,arguments.length>=2,!0))}function $E(n){return n<=0?()=>ns:Ci((t,e)=>{let i=[];t.subscribe(ui(e,r=>{i.push(r),n{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function _3(n,t){const e=arguments.length>=2;return i=>i.pipe(n?mn((r,o)=>n(r,o,i)):pl,$E(1),e?wv(t):p3(()=>new lf))}function GE(n,t=!1){return Ci((e,i)=>{let r=0;e.subscribe(ui(i,o=>{const s=n(o,r++);(s||t)&&i.next(o),!s&&i.complete()}))})}function Cv(n){return ct(()=>n)}function kv(n){return Ci((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}const $t="primary",$p=Symbol("RouteTitle");class Nre{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function uf(n){return new Nre(n)}function Lre(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return n===t}function v3(n){return Array.prototype.concat.apply([],n)}function y3(n){return n.length>0?n[n.length-1]:null}function Vr(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function El(n){return Tk(n)?n:Ep(n)?Pi(Promise.resolve(n)):nt(n)}const Ev=!1,Vre={exact:function C3(n,t,e){if(!tu(n.segments,t.segments)||!Tv(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!C3(n.children[i],t.children[i],e))return!1;return!0},subset:k3},x3={exact:function Ure(n,t){return Ha(n,t)},subset:function Hre(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>b3(n[e],t[e]))},ignored:()=>!0};function w3(n,t,e){return Vre[e.paths](n.root,t.root,e.matrixParams)&&x3[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function k3(n,t,e){return E3(n,t,t.segments,e)}function E3(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!tu(r,e)||t.hasChildren()||!Tv(r,e,i))}if(n.segments.length===e.length){if(!tu(n.segments,e)||!Tv(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!k3(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!!(tu(n.segments,r)&&Tv(n.segments,r,i)&&n.children[$t])&&E3(n.children[$t],t,o,i)}}function Tv(n,t,e){return t.every((i,r)=>x3[e](n[r].parameters,i.parameters))}class Tl{constructor(t=new cn([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=uf(this.queryParams)),this._queryParamMap}toString(){return $re.serialize(this)}}class cn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Vr(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Sv(this)}}class Gp{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=uf(this.parameters)),this._parameterMap}toString(){return D3(this)}}function tu(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}let Wp=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return new WE},providedIn:"root"}),n})();class WE{parse(t){const e=new Jre(t);return new Tl(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${qp(t.root,!0)}`,i=function qre(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${Dv(e)}=${Dv(r)}`).join("&"):`${Dv(e)}=${Dv(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${i}${"string"==typeof t.fragment?`#${function Gre(n){return encodeURI(n)}(t.fragment)}`:""}`}}const $re=new WE;function Sv(n){return n.segments.map(t=>D3(t)).join("/")}function qp(n,t){if(!n.hasChildren())return Sv(n);if(t){const e=n.children[$t]?qp(n.children[$t],!1):"",i=[];return Vr(n.children,(r,o)=>{o!==$t&&i.push(`${o}:${qp(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function jre(n,t){let e=[];return Vr(n.children,(i,r)=>{r===$t&&(e=e.concat(t(i,r)))}),Vr(n.children,(i,r)=>{r!==$t&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===$t?[qp(n.children[$t],!1)]:[`${r}:${qp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[$t]?`${Sv(n)}/${e[0]}`:`${Sv(n)}/(${e.join("//")})`}}function T3(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Dv(n){return T3(n).replace(/%3B/gi,";")}function qE(n){return T3(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Av(n){return decodeURIComponent(n)}function S3(n){return Av(n.replace(/\+/g,"%20"))}function D3(n){return`${qE(n.path)}${function Wre(n){return Object.keys(n).map(t=>`;${qE(t)}=${qE(n[t])}`).join("")}(n.parameters)}`}const Qre=/^[^\/()?;=#]+/;function Iv(n){const t=n.match(Qre);return t?t[0]:""}const Kre=/^[^=?&#]+/,Yre=/^[^&#]+/;class Jre{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new cn([],{}):new cn([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[$t]=new cn(t,e)),i}parseSegment(){const t=Iv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,Ev);return this.capture(t),new Gp(Av(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Iv(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Iv(this.remaining);r&&(i=r,this.capture(i))}t[Av(e)]=Av(i)}parseQueryParam(t){const e=function Xre(n){const t=n.match(Kre);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function Zre(n){const t=n.match(Yre);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=S3(e),o=S3(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Iv(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,Ev);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=$t);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[$t]:new cn([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new pe(4011,Ev)}}function QE(n){return n.segments.length>0?new cn([],{[$t]:n}):n}function Mv(n){const t={};for(const i of Object.keys(n.children)){const o=Mv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function eoe(n){if(1===n.numberOfChildren&&n.children[$t]){const t=n.children[$t];return new cn(n.segments.concat(t.segments),t.children)}return n}(new cn(n.segments,t))}function nu(n){return n instanceof Tl}const KE=!1;function toe(n,t,e,i,r){if(0===e.length)return hf(t.root,t.root,t.root,i,r);const o=function F3(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new R3(!0,0,n);let t=0,e=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Vr(o.outlets,(c,l)=>{a[l]="string"==typeof c?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,c)=>{0==c&&"."===a||(0==c&&""===a?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new R3(e,t,i)}(e);return o.toRoot()?hf(t.root,t.root,new cn([],{}),i,r):function s(c){const l=function ioe(n,t,e,i){if(n.isAbsolute)return new ff(t.root,!0,0);if(-1===i)return new ff(e,e===t.root,0);return function P3(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new pe(4005,KE&&"Invalid number of '../'");r=i.segments.length}return new ff(i,!1,r-o)}(e,i+(Qp(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,t,n.snapshot?._urlSegment,c),d=l.processChildren?mf(l.segmentGroup,l.index,o.commands):XE(l.segmentGroup,l.index,o.commands);return hf(t.root,l.segmentGroup,d,i,r)}(n.snapshot?._lastPathIndex)}function Qp(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Kp(n){return"object"==typeof n&&null!=n&&n.outlets}function hf(n,t,e,i,r){let s,o={};i&&Vr(i,(c,l)=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`}),s=n===t?e:M3(n,t,e);const a=QE(Mv(s));return new Tl(a,o,r)}function M3(n,t,e){const i={};return Vr(n.children,(r,o)=>{i[o]=r===t?e:M3(r,t,e)}),new cn(n.segments,i)}class R3{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Qp(i[0]))throw new pe(4003,KE&&"Root segment cannot have matrix parameters");const r=i.find(Kp);if(r&&r!==y3(i))throw new pe(4004,KE&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ff{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function XE(n,t,e){if(n||(n=new cn([],{})),0===n.segments.length&&n.hasChildren())return mf(n,t,e);const i=function ooe(n,t,e){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=n.segments[r],a=e[i];if(Kp(a))break;const c=`${a}`,l=i0&&void 0===c)break;if(c&&l&&"object"==typeof l&&void 0===l.outlets){if(!N3(c,l,s))return o;i+=2}else{if(!N3(c,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=XE(n.children[s],t,o))}),Vr(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new cn(n.segments,r)}}function YE(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=YE(new cn([],{}),0,e))}),t}function O3(n){const t={};return Vr(n,(e,i)=>t[i]=`${e}`),t}function N3(n,t,e){return n==e.path&&Ha(t,e.parameters)}const Xp="imperative";class za{constructor(t,e){this.id=t,this.url=e}}class ZE extends za{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Sl extends za{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Rv extends za{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Fv extends za{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=16}}class JE extends za{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class aoe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class coe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class loe extends za{constructor(t,e,i,r,o){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class doe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class uoe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class hoe{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class foe{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class moe{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class poe{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class goe{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class _oe{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class L3{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let yoe=(()=>{class n{createUrlTree(e,i,r,o,s,a){return toe(e||i.root,r,o,s,a)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),woe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(t){return yoe.\u0275fac(t)},providedIn:"root"}),n})();class B3{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=eT(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=eT(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=tT(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return tT(t,this._root).map(e=>e.value)}}function eT(n,t){if(n===t.value)return t;for(const e of t.children){const i=eT(n,e);if(i)return i}return null}function tT(n,t){if(n===t.value)return[t];for(const e of t.children){const i=tT(n,e);if(i.length)return i.unshift(t),i}return[]}class Rc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function pf(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class V3 extends B3{constructor(t,e){super(t),this.snapshot=e,nT(this,t)}toString(){return this.snapshot.toString()}}function U3(n,t){const e=function Coe(n,t){const s=new Pv([],{},{},"",{},$t,t,null,n.root,-1,{});return new z3("",new Rc(s,[]))}(n,t),i=new Ti([new Gp("",{})]),r=new Ti({}),o=new Ti({}),s=new Ti({}),a=new Ti(""),c=new Dl(i,r,s,a,o,$t,t,e.root);return c.snapshot=e.root,new V3(new Rc(c,[]),e)}class Dl{constructor(t,e,i,r,o,s,a,c){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(ct(l=>l[$p]))??nt(void 0),this._futureSnapshot=c}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(ct(t=>uf(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(ct(t=>uf(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function H3(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function koe(n){return n.reduce((t,e)=>({params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Pv{get title(){return this.data?.[$p]}constructor(t,e,i,r,o,s,a,c,l,d,u){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._urlSegment=l,this._lastPathIndex=d,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=uf(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=uf(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class z3 extends B3{constructor(t,e){super(e),this.url=t,nT(this,e)}toString(){return j3(this._root)}}function nT(n,t){t.value._routerState=n,t.children.forEach(e=>nT(n,e))}function j3(n){const t=n.children.length>0?` { ${n.children.map(j3).join(", ")} } `:"";return`${n.value}${t}`}function iT(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Ha(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Ha(t.params,e.params)||n.params.next(e.params),function Bre(n,t){if(n.length!==t.length)return!1;for(let e=0;eHa(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||rT(n.parent,t.parent))}function Yp(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function Toe(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Yp(n,i,r);return Yp(n,i)})}(n,t,e);return new Rc(i,r)}{if(n.shouldAttach(t.value)){const o=n.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Yp(n,a)),s}}const i=function Soe(n){return new Dl(new Ti(n.url),new Ti(n.params),new Ti(n.queryParams),new Ti(n.fragment),new Ti(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(o=>Yp(n,o));return new Rc(i,r)}}const oT="ngNavigationCancelingError";function $3(n,t){const{redirectTo:e,navigationBehaviorOptions:i}=nu(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=G3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=i,r}function G3(n,t,e){const i=new Error("NavigationCancelingError: "+(n||""));return i[oT]=!0,i.cancellationCode=t,e&&(i.url=e),i}function W3(n){return q3(n)&&nu(n.url)}function q3(n){return n&&n[oT]}class Doe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Zp,this.attachRef=null}}let Zp=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Doe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ov=!1;let sT=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=$t,this.activateEvents=new De,this.deactivateEvents=new De,this.attachEvents=new De,this.detachEvents=new De,this.parentContexts=Et(Zp),this.location=Et(ii),this.changeDetector=Et(an),this.environmentInjector=Et(Ra)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new pe(4012,Ov);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,Ov);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,Ov);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new pe(4013,Ov);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Aoe(e,a,r.injector);if(i&&function Ioe(n){return!!n.resolveComponentFactory}(i)){const l=i.resolveComponentFactory(s);this.activated=r.createComponent(l,r.length,c)}else this.activated=r.createComponent(s,{index:r.length,injector:c,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[jn]}),n})();class Aoe{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===Dl?this.route:t===Zp?this.childContexts:this.parent.get(t,e)}}let aT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Ve({type:n,selectors:[["ng-component"]],standalone:!0,features:[Bk],decls:1,vars:0,template:function(e,i){1&e&&_e(0,"router-outlet")},dependencies:[sT],encapsulation:2}),n})();function Q3(n,t){return n.providers&&!n._injector&&(n._injector=Kb(n.providers,t,`Route: ${n.path}`)),n._injector??t}function lT(n){const t=n.children&&n.children.map(lT),e=t?{...n,children:t}:{...n};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==$t&&(e.component=aT),e}function Ls(n){return n.outlet||$t}function K3(n,t){const e=n.filter(i=>Ls(i)===t);return e.push(...n.filter(i=>Ls(i)!==t)),e}function Jp(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class Ooe{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),iT(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=pf(e);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Vr(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=pf(t);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=pf(t);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(t,e,i){const r=pf(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new _oe(o.value.snapshot))}),t.children.length&&this.forwardEvent(new poe(t.value.snapshot))}activateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(iT(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),iT(a.route.value),this.activateChildRoutes(t,null,s.children)}else{const a=Jp(r.snapshot),c=a?.get(bl)??null;s.attachRef=null,s.route=r,s.resolver=c,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,i)}}class X3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Nv{constructor(t,e){this.component=t,this.route=e}}function Noe(n,t,e){const i=n._root;return eg(i,t?t._root:null,e,[i.value])}function gf(n,t){const e=Symbol(),i=t.get(n,e);return i===e?"function"!=typeof n||function Jq(n){return null!==q0(n)}(n)?t.get(n):n:i}function eg(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=pf(t);return n.children.forEach(s=>{(function Boe(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const c=function Voe(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!tu(n.url,t.url);case"pathParamsOrQueryParamsChange":return!tu(n.url,t.url)||!Ha(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!rT(n,t)||!Ha(n.queryParams,t.queryParams);default:return!rT(n,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new X3(i)):(o.data=s.data,o._resolvedData=s._resolvedData),eg(n,t,o.component?a?a.children:null:e,i,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Nv(a.outlet.component,s))}else s&&tg(t,a,r),r.canActivateChecks.push(new X3(i)),eg(n,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Vr(o,(s,a)=>tg(s,e.getContext(a),r)),r}function tg(n,t,e){const i=pf(n),r=n.value;Vr(i,(o,s)=>{tg(o,r.component?t?t.children.getContext(s):null:t,e)}),e.canDeactivateChecks.push(new Nv(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function ng(n){return"function"==typeof n}function dT(n){return n instanceof lf||"EmptyError"===n?.name}const Lv=Symbol("INITIAL_VALUE");function _f(){return Ji(n=>Cl(n.map(t=>t.pipe(An(1),er(Lv)))).pipe(ct(t=>{for(const e of t)if(!0!==e){if(e===Lv)return Lv;if(!1===e||e instanceof Tl)return e}return!0}),mn(t=>t!==Lv),An(1)))}function Y3(n){return function xq(...n){return yR(n)}(gi(t=>{if(nu(t))throw $3(0,t)}),ct(t=>!0===t))}const uT={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Z3(n,t,e,i,r){const o=hT(n,t,e);return o.matched?function nse(n,t,e,i){const r=t.canMatch;return r&&0!==r.length?nt(r.map(s=>{const a=gf(s,n);return El(function Goe(n){return n&&ng(n.canMatch)}(a)?a.canMatch(t,e):n.runInContext(()=>a(t,e)))})).pipe(_f(),Y3()):nt(!0)}(i=Q3(t,i),t,e).pipe(ct(s=>!0===s?o:{...uT})):nt(o)}function hT(n,t,e){if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?{...uT}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||Lre)(e,n,t);if(!r)return{...uT};const o={};Vr(r.posParams,(a,c)=>{o[c]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Bv(n,t,e,i){if(e.length>0&&function ose(n,t,e){return e.some(i=>Vv(n,t,i)&&Ls(i)!==$t)}(n,e,i)){const o=new cn(t,function rse(n,t,e,i){const r={};r[$t]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const o of e)if(""===o.path&&Ls(o)!==$t){const s=new cn([],{});s._sourceSegment=n,s._segmentIndexShift=t.length,r[Ls(o)]=s}return r}(n,t,i,new cn(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function sse(n,t,e){return e.some(i=>Vv(n,t,i))}(n,e,i)){const o=new cn(n.segments,function ise(n,t,e,i,r){const o={};for(const s of i)if(Vv(n,e,s)&&!r[Ls(s)]){const a=new cn([],{});a._sourceSegment=n,a._segmentIndexShift=t.length,o[Ls(s)]=a}return{...r,...o}}(n,t,e,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const r=new cn(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function Vv(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function J3(n,t,e,i){return!!(Ls(n)===i||i!==$t&&Vv(t,e,n))&&("**"===n.path||hT(t,n,e).matched)}function eB(n,t,e){return 0===t.length&&!n.children[e]}const Uv=!1;class Hv{constructor(t){this.segmentGroup=t||null}}class tB{constructor(t){this.urlTree=t}}function ig(n){return eu(new Hv(n))}function nB(n){return eu(new tB(n))}class dse{constructor(t,e,i,r,o){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const t=Bv(this.urlTree.root,[],[],this.config).segmentGroup,e=new cn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,$t).pipe(ct(o=>this.createUrlTree(Mv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Vi(o=>{if(o instanceof tB)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Hv?this.noMatchError(o):o}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,$t).pipe(ct(r=>this.createUrlTree(Mv(r),t.queryParams,t.fragment))).pipe(Vi(r=>{throw r instanceof Hv?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,Uv)}createUrlTree(t,e,i){const r=QE(t);return new Tl(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(ct(o=>new cn([],o))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return Pi(r).pipe(kl(o=>{const s=i.children[o],a=K3(e,o);return this.expandSegmentGroup(t,a,s,o).pipe(ct(c=>({segment:c,outlet:o})))}),g3((o,s)=>(o[s.outlet]=s.segment,o),{}),_3())}expandSegment(t,e,i,r,o,s){return Pi(i).pipe(kl(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,o,s).pipe(Vi(l=>{if(l instanceof Hv)return nt(null);throw l}))),Ns(a=>!!a),Vi((a,c)=>{if(dT(a))return eB(e,r,o)?nt(new cn([],{})):ig(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,o,s,a){return J3(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s):ig(e):ig(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?nB(o):this.lineralizeSegments(i,o).pipe(hr(s=>{const a=new cn(s,{});return this.expandSegment(t,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){const{matched:a,consumedSegments:c,remainingSegments:l,positionalParamSegments:d}=hT(e,r,o);if(!a)return ig(e);const u=this.applyRedirectCommands(c,r.redirectTo,d);return r.redirectTo.startsWith("/")?nB(u):this.lineralizeSegments(r,u).pipe(hr(h=>this.expandSegment(t,e,i,h.concat(l),s,!1)))}matchSegmentAgainstRoute(t,e,i,r,o){return"**"===i.path?(t=Q3(i,t),i.loadChildren?(i._loadedRoutes?nt({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(ct(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new cn(r,{})))):nt(new cn(r,{}))):Z3(e,i,r,t).pipe(Ji(({matched:s,consumedSegments:a,remainingSegments:c})=>s?this.getChildConfig(t=i._injector??t,i,r).pipe(hr(d=>{const u=d.injector??t,h=d.routes,{segmentGroup:f,slicedSegments:m}=Bv(e,a,c,h),g=new cn(f.segments,f.children);if(0===m.length&&g.hasChildren())return this.expandChildren(u,h,g).pipe(ct(x=>new cn(a,x)));if(0===h.length&&0===m.length)return nt(new cn(a,{}));const p=Ls(i)===o;return this.expandSegment(u,g,h,m,p?$t:o,!0).pipe(ct(C=>new cn(a.concat(C.segments),C.children)))})):ig(e)))}getChildConfig(t,e,i){return e.children?nt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?nt({routes:e._loadedRoutes,injector:e._loadedInjector}):function tse(n,t,e,i){const r=t.canLoad;return void 0===r||0===r.length?nt(!0):nt(r.map(s=>{const a=gf(s,n);return El(function Hoe(n){return n&&ng(n.canLoad)}(a)?a.canLoad(t,e):n.runInContext(()=>a(t,e)))})).pipe(_f(),Y3())}(t,e,i).pipe(hr(r=>r?this.configLoader.loadChildren(t,e).pipe(gi(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function cse(n){return eu(G3(Uv,3))}())):nt({routes:[],injector:t})}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return nt(i);if(r.numberOfChildren>1||!r.children[$t])return t.redirectTo,eu(new pe(4e3,Uv));r=r.children[$t]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreateUrlTree(t,e,i,r){const o=this.createSegmentGroup(t,e.root,i,r);return new Tl(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Vr(t,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(t,e,i,r){const o=this.createSegments(t,e.segments,i,r);let s={};return Vr(e.children,(a,c)=>{s[c]=this.createSegmentGroup(t,a,i,r)}),new cn(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new pe(4001,Uv);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}class hse{}class pse{constructor(t,e,i,r,o,s,a){this.injector=t,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const t=Bv(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,$t).pipe(ct(e=>{if(null===e)return null;const i=new Pv([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},$t,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Rc(i,e),o=new z3(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(t){const e=t.value,i=H3(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,e,i):this.processSegment(t,e,i,i.segments,r)}processChildren(t,e,i){return Pi(Object.keys(i.children)).pipe(kl(r=>{const o=i.children[r],s=K3(e,r);return this.processSegmentGroup(t,s,o,r)}),g3((r,o)=>r&&o?(r.push(...o),r):null),GE(r=>null!==r),wv(null),_3(),ct(r=>{if(null===r)return null;const o=rB(r);return function gse(n){n.sort((t,e)=>t.value.outlet===$t?-1:e.value.outlet===$t?1:t.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(t,e,i,r,o){return Pi(e).pipe(kl(s=>this.processSegmentAgainstRoute(s._injector??t,s,i,r,o)),Ns(s=>!!s),Vi(s=>{if(dT(s))return eB(i,r,o)?nt([]):nt(null);throw s}))}processSegmentAgainstRoute(t,e,i,r,o){if(e.redirectTo||!J3(e,i,r,o))return nt(null);let s;if("**"===e.path){const a=r.length>0?y3(r).parameters:{},c=sB(i)+r.length;s=nt({snapshot:new Pv(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,aB(e),Ls(e),e.component??e._loadedComponent??null,e,oB(i),c,cB(e)),consumedSegments:[],remainingSegments:[]})}else s=Z3(i,e,r,t).pipe(ct(({matched:a,consumedSegments:c,remainingSegments:l,parameters:d})=>{if(!a)return null;const u=sB(i)+c.length;return{snapshot:new Pv(c,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,aB(e),Ls(e),e.component??e._loadedComponent??null,e,oB(i),u,cB(e)),consumedSegments:c,remainingSegments:l}}));return s.pipe(Ji(a=>{if(null===a)return nt(null);const{snapshot:c,consumedSegments:l,remainingSegments:d}=a;t=e._injector??t;const u=e._loadedInjector??t,h=function _se(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:m}=Bv(i,l,d,h.filter(p=>void 0===p.redirectTo));if(0===m.length&&f.hasChildren())return this.processChildren(u,h,f).pipe(ct(p=>null===p?null:[new Rc(c,p)]));if(0===h.length&&0===m.length)return nt([new Rc(c,[])]);const g=Ls(e)===o;return this.processSegment(u,h,f,m,g?$t:o).pipe(ct(p=>null===p?null:[new Rc(c,p)]))}))}}function bse(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function rB(n){const t=[],e=new Set;for(const i of n){if(!bse(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=rB(i.children);t.push(new Rc(i.value,r))}return t.filter(i=>!e.has(i))}function oB(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function sB(n){let t=n,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function aB(n){return n.data||{}}function cB(n){return n.resolve||{}}function lB(n){return"string"==typeof n.title||null===n.title}function fT(n){return Ji(t=>{const e=n(t);return e?Pi(e).pipe(ct(()=>t)):nt(t)})}const bf=new ae("ROUTES");let mT=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Et(UN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return nt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=El(e.loadComponent()).pipe(ct(uB),gi(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),kv(()=>{this.componentLoaders.delete(e)})),r=new jE(i,()=>new Me).pipe(zE());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return nt({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(ct(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let c,l,d=!1;Array.isArray(a)?l=a:(c=a.create(e).injector,l=v3(c.get(bf,[],It.Self|It.Optional)));return{routes:l.map(lT),injector:c}}),kv(()=>{this.childrenLoaders.delete(i)})),s=new jE(o,()=>new Me).pipe(zE());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return El(e()).pipe(ct(uB),hr(i=>i instanceof eN||Array.isArray(i)?nt(i):Pi(this.compiler.compileModuleAsync(i))))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function uB(n){return function Tse(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let jv=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Me,this.configLoader=Et(mT),this.environmentInjector=Et(Ra),this.urlSerializer=Et(Wp),this.rootContexts=Et(Zp),this.navigationId=0,this.afterPreactivation=()=>nt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new foe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new hoe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Ti({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Xp,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(mn(i=>0!==i.id),ct(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),Ji(i=>{let r=!1,o=!1;return nt(i).pipe(gi(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),Ji(s=>{const a=e.browserUrlTree.toString(),c=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!c&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const d="";return this.events.next(new Fv(s.id,e.serializeUrl(i.rawUrl),d,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),ns}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return hB(s.source)&&(e.browserUrlTree=s.extractedUrl),nt(s).pipe(Ji(d=>{const u=this.transitions?.getValue();return this.events.next(new ZE(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),u!==this.transitions?.getValue()?ns:Promise.resolve(d)}),function use(n,t,e,i){return Ji(r=>function lse(n,t,e,i,r){return new dse(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(ct(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),gi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},i.urlAfterRedirects=d.urlAfterRedirects}),function yse(n,t,e,i,r){return hr(o=>function mse(n,t,e,i,r,o,s="emptyOnly"){return new pse(n,t,e,i,r,s,o).recognize().pipe(Ji(a=>null===a?function fse(n){return new Dn(t=>t.error(n))}(new hse):nt(a)))}(n,t,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(ct(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),gi(d=>{if(i.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(h,d)}e.browserUrlTree=d.urlAfterRedirects}const u=new aoe(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}));if(c&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:u,source:h,restoredState:f,extras:m}=s,g=new ZE(d,this.urlSerializer.serialize(u),h,f);this.events.next(g);const p=U3(u,this.rootComponentType).snapshot;return nt(i={...s,targetSnapshot:p,urlAfterRedirects:u,extras:{...m,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new Fv(s.id,e.serializeUrl(i.extractedUrl),d,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),ns}}),gi(s=>{const a=new coe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),ct(s=>i={...s,guards:Noe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function qoe(n,t){return hr(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?nt({...e,guardsResult:!0}):function Qoe(n,t,e,i){return Pi(n).pipe(hr(r=>function ese(n,t,e,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?nt(o.map(a=>{const c=Jp(t)??r,l=gf(a,c);return El(function $oe(n){return n&&ng(n.canDeactivate)}(l)?l.canDeactivate(n,t,e,i):c.runInContext(()=>l(n,t,e,i))).pipe(Ns())})).pipe(_f()):nt(!0)}(r.component,r.route,e,t,i)),Ns(r=>!0!==r,!0))}(s,i,r,n).pipe(hr(a=>a&&function Uoe(n){return"boolean"==typeof n}(a)?function Koe(n,t,e,i){return Pi(t).pipe(kl(r=>jp(function Yoe(n,t){return null!==n&&t&&t(new moe(n)),nt(!0)}(r.route.parent,i),function Xoe(n,t){return null!==n&&t&&t(new goe(n)),nt(!0)}(r.route,i),function Joe(n,t,e){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function Loe(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(s)).filter(s=>null!==s).map(s=>df(()=>nt(s.guards.map(c=>{const l=Jp(s.node)??e,d=gf(c,l);return El(function joe(n){return n&&ng(n.canActivateChild)}(d)?d.canActivateChild(i,n):l.runInContext(()=>d(i,n))).pipe(Ns())})).pipe(_f())));return nt(o).pipe(_f())}(n,r.path,e),function Zoe(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return nt(!0);const r=i.map(o=>df(()=>{const s=Jp(t)??e,a=gf(o,s);return El(function zoe(n){return n&&ng(n.canActivate)}(a)?a.canActivate(t,n):s.runInContext(()=>a(t,n))).pipe(Ns())}));return nt(r).pipe(_f())}(n,r.route,e))),Ns(r=>!0!==r,!0))}(i,o,n,t):nt(a)),ct(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),gi(s=>{if(i.guardsResult=s.guardsResult,nu(s.guardsResult))throw $3(0,s.guardsResult);const a=new loe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),mn(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),fT(s=>{if(s.guards.canActivateChecks.length)return nt(s).pipe(gi(a=>{const c=new doe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}),Ji(a=>{let c=!1;return nt(a).pipe(function xse(n,t){return hr(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return nt(e);let o=0;return Pi(r).pipe(kl(s=>function wse(n,t,e,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!lB(r)&&(o[$p]=r.title),function Cse(n,t,e,i){const r=function kse(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return nt({});const o={};return Pi(r).pipe(hr(s=>function Ese(n,t,e,i){const r=Jp(t)??i,o=gf(n,r);return El(o.resolve?o.resolve(t,e):r.runInContext(()=>o(t,e)))}(n[s],t,e,i).pipe(Ns(),gi(a=>{o[s]=a}))),$E(1),Cv(o),Vi(s=>dT(s)?ns:eu(s)))}(o,n,t,i).pipe(ct(s=>(n._resolvedData=s,n.data=H3(n,e).resolve,r&&lB(r)&&(n.data[$p]=r.title),null)))}(s.route,i,n,t)),gi(()=>o++),$E(1),hr(s=>o===r.length?nt(e):ns))})}(e.paramsInheritanceStrategy,this.environmentInjector),gi({next:()=>c=!0,complete:()=>{c||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),gi(a=>{const c=new uoe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}))}),fT(s=>{const a=c=>{const l=[];c.routeConfig?.loadComponent&&!c.routeConfig._loadedComponent&&l.push(this.configLoader.loadComponent(c.routeConfig).pipe(gi(d=>{c.component=d}),ct(()=>{})));for(const d of c.children)l.push(...a(d));return l};return Cl(a(s.targetSnapshot.root)).pipe(wv(),An(1))}),fT(()=>this.afterPreactivation()),ct(s=>{const a=function Eoe(n,t,e){const i=Yp(n,t._root,e?e._root:void 0);return new V3(i,t)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),gi(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((n,t,e)=>ct(i=>(new Ooe(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),An(1),gi({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Sl(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),kv(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Vi(s=>{if(o=!0,q3(s)){W3(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new Rv(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),W3(s)){const c=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),l={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||hB(i.source)};e.scheduleNavigation(c,Xp,null,l,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new JE(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(c){i.reject(c)}}return ns}))}))}cancelNavigationTransition(e,i,r){const o=new Rv(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function hB(n){return n!==Xp}let fB=(()=>{class n{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===$t);return i}getResolvedTitleForRoute(e){return e.data[$p]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(Sse)},providedIn:"root"}),n})(),Sse=(()=>{class n extends fB{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(Q(c3))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Dse=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(Ise)},providedIn:"root"}),n})();class Ase{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let Ise=(()=>{class n extends Ase{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const $v=new ae("",{providedIn:"root",factory:()=>({})});let Rse=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(Fse)},providedIn:"root"}),n})(),Fse=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Pse(n){throw n}function Ose(n,t,e){return t.parse("/")}const Nse={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Lse={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let ro=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Et(vte),this.isNgZoneEnabled=!1,this.options=Et($v,{optional:!0})||{},this.errorHandler=this.options.errorHandler||Pse,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Ose,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Et(Rse),this.routeReuseStrategy=Et(Dse),this.urlCreationStrategy=Et(woe),this.titleStrategy=Et(fB),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=v3(Et(bf,{optional:!0})??[]),this.navigationTransitions=Et(jv),this.urlSerializer=Et(Wp),this.location=Et(Np),this.isNgZoneEnabled=Et(Xe)instanceof Xe&&Xe.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Tl,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=U3(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId??0},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Xp,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const c={...r};delete c.navigationId,delete c.\u0275routerPageId,0!==Object.keys(c).length&&(o.state=c)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(lT),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=i,l=c?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...o};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,l??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=nu(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Xp,null,i)}navigate(e,i={skipLocationChange:!1}){return function Bse(n){for(let t=0;t{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,l,d;return s?(a=s.resolve,c=s.reject,l=s.promise):l=new Promise((u,h)=>{a=u,c=h}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(u=>Promise.reject(u))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",o)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-(this.browserPageId??this.currentPageId);0!==o?this.location.historyGo(o):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class mB{}let Hse=(()=>{class n{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(mn(e=>e instanceof Sl),kl(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Kb(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return Pi(r).pipe(gh())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):nt(null);const o=r.pipe(hr(s=>null===s?nt(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?Pi([o,this.loader.loadComponent(i)]).pipe(gh()):o})}}return n.\u0275fac=function(e){return new(e||n)(Q(ro),Q(UN),Q(Ra),Q(mB),Q(mT))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const _T=new ae("");let pB=(()=>{class n{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ZE?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Sl&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof L3&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new L3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(e){Fa()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();var hs=(()=>((hs=hs||{})[hs.COMPLETE=0]="COMPLETE",hs[hs.FAILED=1]="FAILED",hs[hs.REDIRECTING=2]="REDIRECTING",hs))();const vf=!1;function Al(n,t){return{\u0275kind:n,\u0275providers:t}}const bT=new ae("",{providedIn:"root",factory:()=>!1});function _B(){const n=Et(Ni);return t=>{const e=n.get(af);if(t!==e.components[0])return;const i=n.get(ro),r=n.get(bB);1===n.get(vT)&&i.initialNavigation(),n.get(vB,null,It.Optional)?.setUpPreloading(),n.get(_T,null,It.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const bB=new ae(vf?"bootstrap done indicator":"",{factory:()=>new Me}),vT=new ae(vf?"initial navigation":"",{providedIn:"root",factory:()=>1});function Wse(){let n=[];return n=vf?[{provide:Sb,multi:!0,useFactory:()=>{const t=Et(ro);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function boe(n){if(!("type"in n))return`Unknown Router Event: ${n.constructor.name}`;switch(n.type){case 14:return`ActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state}, shouldActivate: ${n.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 2:return`NavigationCancel(id: ${n.id}, url: '${n.url}')`;case 16:return`NavigationSkipped(id: ${n.id}, url: '${n.url}')`;case 1:return`NavigationEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${n.id}, url: '${n.url}', error: ${n.error})`;case 0:return`NavigationStart(id: ${n.id}, url: '${n.url}')`;case 6:return`ResolveEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 5:return`ResolveStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 10:return`RouteConfigLoadEnd(path: ${n.route.path})`;case 9:return`RouteConfigLoadStart(path: ${n.route.path})`;case 4:return`RoutesRecognized(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 15:return`Scroll(anchor: '${n.anchor}', position: '${n.position?`${n.position[0]}, ${n.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Al(1,n)}const vB=new ae(vf?"router preloader":"");function qse(n){return Al(0,[{provide:vB,useExisting:Hse},{provide:mB,useExisting:n}])}const rg=!1,yB=new ae(rg?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),Qse=[Np,{provide:Wp,useClass:WE},ro,Zp,{provide:Dl,useFactory:function gB(n){return n.routerState.root},deps:[ro]},mT,rg?{provide:bT,useValue:!0}:[]];function Kse(){return new QN("Router",ro)}let xB=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[Qse,rg&&i?.enableTracing?Wse().\u0275providers:[],{provide:bf,multi:!0,useValue:e},{provide:yB,useFactory:Jse,deps:[[ro,new Ia,new Vd]]},{provide:$v,useValue:i||{}},i?.useHash?{provide:Zd,useClass:sne}:{provide:Zd,useClass:_L},{provide:_T,useFactory:()=>{const n=Et(xie),t=Et(Xe),e=Et($v),i=Et(jv),r=Et(Wp);return e.scrollOffset&&n.setOffset(e.scrollOffset),new pB(r,i,n,t,e)}},i?.preloadingStrategy?qse(i.preloadingStrategy).\u0275providers:[],{provide:QN,multi:!0,useFactory:Kse},i?.initialNavigation?eae(i):[],[{provide:wB,useFactory:_B},{provide:qN,multi:!0,useExisting:wB}]]}}static forChild(e){return{ngModule:n,providers:[{provide:bf,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(Q(yB,8))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[aT]}),n})();function Jse(n){if(rg&&n)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function eae(n){return["disabled"===n.initialNavigation?Al(3,[{provide:Jb,multi:!0,useFactory:()=>{const t=Et(ro);return()=>{t.setUpLocationChangeListener()}}},{provide:vT,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?Al(2,[{provide:vT,useValue:0},{provide:Jb,multi:!0,deps:[Ni],useFactory:t=>{const e=t.get(rne,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=t.get(ro),o=t.get(bB);(function zse(n,t){n.events.pipe(mn(e=>e instanceof Sl||e instanceof Rv||e instanceof JE||e instanceof Fv),ct(e=>e instanceof Sl||e instanceof Fv?hs.COMPLETE:e instanceof Rv&&(0===e.code||1===e.code)?hs.REDIRECTING:hs.FAILED),mn(e=>e!==hs.REDIRECTING),An(1)).subscribe(()=>{t()})})(r,()=>{i(!0)}),t.get(jv).afterPreactivation=()=>(i(!0),o.closed?nt(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const wB=new ae(rg?"Router Initializer":"");function CB(n,t,e,i,r,o,s){try{var a=n[o](s),c=a.value}catch(l){return void e(l)}a.done?t(c):Promise.resolve(c).then(i,r)}function xe(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(c){CB(o,i,r,s,a,"next",c)}function a(c){CB(o,i,r,s,a,"throw",c)}s(void 0)})}}class yT{}function xT(n){return n&&"function"==typeof n.connect&&!(n instanceof jE)}class kB{applyChanges(t,e,i,r,o){t.forEachOperation((s,a,c)=>{let l,d;if(null==s.previousIndex){const u=i(s,a,c);l=e.createEmbeddedView(u.templateRef,u.context,u.index),d=1}else null==c?(e.remove(a),d=3):(l=e.get(a),e.move(l,c),d=2);o&&o({context:l?.context,operation:d,record:s})})}detach(){}}class wT{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(t=!1,e,i=!0,r){this._multiple=t,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Me,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(i=>this._markSelected(i));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(i=>this._unmarkSelected(i));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);const e=this.selected,i=new Set(t);t.forEach(o=>this._markSelected(o)),e.filter(o=>!i.has(o)).forEach(o=>this._unmarkSelected(o));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();const e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(t){if(this.compareWith){for(let e of this._selection)if(this.compareWith(t,e))return e;return t}return t}}let CT=(()=>{class n{constructor(){this._listeners=[]}notify(e,i){for(let r of this._listeners)r(e,i)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(i=>e!==i)}}ngOnDestroy(){this._listeners=[]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const og=new ae("_ViewRepeater");function oo(n,t){const e="object"==typeof t;return new Promise((i,r)=>{let s,o=!1;n.subscribe({next:a=>{s=a,o=!0},error:r,complete:()=>{o?i(s):e?i(t.defaultValue):r(new lf)}})})}const kT={now:()=>(kT.delegate||Date).now(),delegate:void 0};class TB extends Me{constructor(t=1/0,e=1/0,i=kT){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){const{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();const e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){const o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const 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 ma?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(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new ma;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof ma?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class nae{encodeKey(t){return SB(t)}encodeValue(t){return SB(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const rae=/%(\d[a-f0-9])/gi,oae={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function SB(n){return encodeURIComponent(n).replace(rae,(t,e)=>oae[e]??t)}function Wv(n){return`${n}`}class Il{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new nae,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function iae(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],c=e.get(s)||[];c.push(a),e.set(s,c)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(Wv):[Wv(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const 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){const e=[];return Object.keys(t).forEach(i=>{const 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=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Il({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(Wv(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(Wv(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class sae{constructor(){this.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 DB(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function AB(n){return typeof Blob<"u"&&n instanceof Blob}function IB(n){return typeof FormData<"u"&&n instanceof FormData}class sg{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function aae(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new ma),this.context||(this.context=new sae),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":au.set(h,t.setHeaders[h]),c)),t.setParams&&(l=Object.keys(t.setParams).reduce((u,h)=>u.set(h,t.setParams[h]),l)),new sg(e,i,o,{params:l,headers:c,context:d,reportProgress:a,responseType:r,withCredentials:s})}}var tr=(()=>((tr=tr||{})[tr.Sent=0]="Sent",tr[tr.UploadProgress=1]="UploadProgress",tr[tr.ResponseHeader=2]="ResponseHeader",tr[tr.DownloadProgress=3]="DownloadProgress",tr[tr.Response=4]="Response",tr[tr.User=5]="User",tr))();class TT{constructor(t,e=200,i="OK"){this.headers=t.headers||new ma,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class ST extends TT{constructor(t={}){super(t),this.type=tr.ResponseHeader}clone(t={}){return new ST({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class qv extends TT{constructor(t={}){super(t),this.type=tr.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new qv({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class MB extends TT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function DT(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}}let Ml=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof sg)o=e;else{let c,l;c=r.headers instanceof ma?r.headers:new ma(r.headers),r.params&&(l=r.params instanceof Il?r.params:new Il({fromObject:r.params})),o=new sg(e,i,void 0!==r.body?r.body:null,{headers:c,context:r.context,params:l,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=nt(o).pipe(kl(c=>this.handler.handle(c)));if(e instanceof sg||"events"===r.observe)return s;const a=s.pipe(mn(c=>c instanceof qv));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ct(c=>{if(null!==c.body&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return a.pipe(ct(c=>{if(null!==c.body&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return a.pipe(ct(c=>{if(null!==c.body&&"string"!=typeof c.body)throw new Error("Response is not a string.");return c.body}));default:return a.pipe(ct(c=>c.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}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 Il).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,DT(r,i))}post(e,i,r={}){return this.request("POST",e,DT(r,i))}put(e,i,r={}){return this.request("PUT",e,DT(r,i))}}return n.\u0275fac=function(e){return new(e||n)(Q(Gv))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function RB(n,t){return t(n)}function lae(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const uae=new ae("HTTP_INTERCEPTORS"),ag=new ae("HTTP_INTERCEPTOR_FNS");function hae(){let n=null;return(t,e)=>(null===n&&(n=(Et(uae,{optional:!0})??[]).reduceRight(lae,RB)),n(t,e))}let FB=(()=>{class n extends Gv{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ag)));this.chain=i.reduceRight((r,o)=>function dae(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),RB)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(Q(ET),Q(Ra))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const gae=/^\)\]\}',?\n/;let OB=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Dn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,m)=>r.setRequestHeader(f,m.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",m=new ma(r.getAllResponseHeaders()),g=function _ae(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new ST({headers:m,status:r.status,statusText:f,url:g}),s},c=()=>{let{headers:f,status:m,statusText:g,url:p}=a(),b=null;204!==m&&(b=typeof r.response>"u"?r.responseText:r.response),0===m&&(m=b?200:0);let C=m>=200&&m<300;if("json"===e.responseType&&"string"==typeof b){const x=b;b=b.replace(gae,"");try{b=""!==b?JSON.parse(b):null}catch(D){b=x,C&&(C=!1,b={error:D,text:b})}}C?(i.next(new qv({body:b,headers:f,status:m,statusText:g,url:p||void 0})),i.complete()):i.error(new MB({error:b,headers:f,status:m,statusText:g,url:p||void 0}))},l=f=>{const{url:m}=a(),g=new MB({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:m||void 0});i.error(g)};let d=!1;const u=f=>{d||(i.next(a()),d=!0);let m={type:tr.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(m.total=f.total),"text"===e.responseType&&r.responseText&&(m.partialText=r.responseText),i.next(m)},h=f=>{let m={type:tr.UploadProgress,loaded:f.loaded};f.lengthComputable&&(m.total=f.total),i.next(m)};return r.addEventListener("load",c),r.addEventListener("error",l),r.addEventListener("timeout",l),r.addEventListener("abort",l),e.reportProgress&&(r.addEventListener("progress",u),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:tr.Sent}),()=>{r.removeEventListener("error",l),r.removeEventListener("abort",l),r.removeEventListener("load",c),r.removeEventListener("timeout",l),e.reportProgress&&(r.removeEventListener("progress",u),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(Q(BL))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const AT=new ae("XSRF_ENABLED"),NB=new ae("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),LB=new ae("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class BB{}let yae=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=SL(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(tv),Q(NB))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function xae(n,t){const e=n.url.toLowerCase();if(!Et(AT)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=Et(BB).getToken(),r=Et(LB);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var Ui=(()=>((Ui=Ui||{})[Ui.Interceptors=0]="Interceptors",Ui[Ui.LegacyInterceptors=1]="LegacyInterceptors",Ui[Ui.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Ui[Ui.NoXsrfProtection=3]="NoXsrfProtection",Ui[Ui.JsonpSupport=4]="JsonpSupport",Ui[Ui.RequestsMadeViaParent=5]="RequestsMadeViaParent",Ui))();function yf(n,t){return{\u0275kind:n,\u0275providers:t}}function wae(...n){const t=[Ml,OB,FB,{provide:Gv,useExisting:FB},{provide:ET,useExisting:OB},{provide:ag,useValue:xae,multi:!0},{provide:AT,useValue:!0},{provide:BB,useClass:yae}];for(const e of n)t.push(...e.\u0275providers);return function AX(n){return{\u0275providers:n}}(t)}const VB=new ae("LEGACY_INTERCEPTOR_FN");let IT,kae=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[wae(yf(Ui.LegacyInterceptors,[{provide:VB,useFactory:hae},{provide:ag,useExisting:VB,multi:!0}]))]}),n})();try{IT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{IT=!1}let xf,Hn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function yie(n){return n===NL}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!IT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(Q(tv))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const UB=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function HB(){if(xf)return xf;if("object"!=typeof document||!document)return xf=new Set(UB),xf;let n=document.createElement("input");return xf=new Set(UB.filter(t=>(n.setAttribute("type",t),n.type===t))),xf}let cg,Qv,iu,MT;function pa(n){return function Eae(){if(null==cg&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>cg=!0}))}finally{cg=cg||!1}return cg}()?n:!!n.capture}function zB(){if(null==iu){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return iu=!1,iu;if("scrollBehavior"in document.documentElement.style)iu=!0;else{const n=Element.prototype.scrollTo;iu=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return iu}function lg(){if("object"!=typeof document||!document)return 0;if(null==Qv){const 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";const e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),Qv=0,0===n.scrollLeft&&(n.scrollLeft=1,Qv=0===n.scrollLeft?1:2),n.remove()}return Qv}function RT(n){if(function Tae(){if(null==MT){const n=typeof document<"u"?document.head:null;MT=!(!n||!n.createShadowRoot&&!n.attachShadow)}return MT}()){const t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Kv(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){const t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function fs(n){return n.composedPath?n.composedPath()[0]:n.target}function FT(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function so(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}class Vae extends lt{constructor(t,e){super()}schedule(t,e=0){return this}}const Zv={setInterval(n,t,...e){const{delegate:i}=Zv;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){const{delegate:t}=Zv;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};class OT extends Vae{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;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return Zv.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;null!=e&&Zv.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;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){const{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,ea(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}class ug{constructor(t,e=ug.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}ug.now=kT.now;class NT extends ug{constructor(t,e=ug.now){super(t,e),this.actions=[],this._active=!1}flush(t){const{actions:e}=this;if(this._active)return void e.push(t);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}}}const hg=new NT(OT),Uae=hg;function Pc(n,t=hg){return Ci((e,i)=>{let r=null,o=null,s=null;const a=()=>{if(r){r.unsubscribe(),r=null;const l=o;o=null,i.next(l)}};function c(){const l=s+n,d=t.now();if(d{o=l,s=t.now(),r||(r=t.schedule(c,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function LT(n){return mn((t,e)=>n<=e)}function ja(n,t=pl){return n=n??Hae,Ci((e,i)=>{let r,o=!0;e.subscribe(ui(i,s=>{const a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function Hae(n,t){return n===t}function St(n){return Ci((t,e)=>{Kr(n).subscribe(ui(e,()=>e.complete(),To)),!e.closed&&t.subscribe(e)})}function Qe(n){return null!=n&&"false"!=`${n}`}function gr(n,t=0){return $B(n)?Number(n):t}function $B(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function fg(n){return Array.isArray(n)?n:[n]}function nr(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Mi(n){return n instanceof Ne?n.nativeElement:n}let GB=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),jae=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){const i=Mi(e);return new Dn(r=>{const s=this._observeElement(i).subscribe(r);return()=>{s.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const i=new Me,r=this._mutationObserverFactory.create(o=>i.next(o));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){const{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return n.\u0275fac=function(e){return new(e||n)(Q(GB))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),BT=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=Qe(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=gr(e),this._subscribe()}constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new De,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(Pc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(jae),y(Ne),y(Xe))},n.\u0275dir=X({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),Jv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[GB]}),n})();const WB=new Set;let Cf,$ae=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Wae}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function Gae(n){if(!WB.has(n))try{Cf||(Cf=document.createElement("style"),Cf.setAttribute("type","text/css"),document.head.appendChild(Cf)),Cf.sheet&&(Cf.sheet.insertRule(`@media ${n} {body{ }}`,0),WB.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Wae(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let VT=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new Me}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return qB(fg(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let o=Cl(qB(fg(e)).map(s=>this._registerQuery(s).observable));return o=jp(o.pipe(An(1)),o.pipe(LT(1),Pc(0))),o.pipe(ct(s=>{const a={matches:!1,breakpoints:{}};return s.forEach(({matches:c,query:l})=>{a.matches=a.matches||c,a.breakpoints[l]=c}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const i=this._mediaMatcher.matchMedia(e),o={observable:new Dn(s=>{const a=c=>this._zone.run(()=>s.next(c));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(er(i),ct(({matches:s})=>({query:e,matches:s})),St(this._destroySubject)),mql:i};return this._queries.set(e,o),o}}return n.\u0275fac=function(e){return new(e||n)(Q($ae),Q(Xe))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function qB(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function ey(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}const KB="cdk-describedby-message",ty="cdk-describedby-host";let UT=0,XB=(()=>{class n{constructor(e,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+UT++,this._document=e,this._id=Et(sf)+"-"+UT++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;const o=HT(i,r);"string"!=typeof i?(YB(i,this._id),this._messageRegistry.set(o,{messageElement:i,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(i,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,i,r){if(!i||!this._isElementNode(e))return;const o=HT(i,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),"string"==typeof i){const s=this._messageRegistry.get(o);s&&0===s.referenceCount&&this._deleteMessageElement(o)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const e=this._document.querySelectorAll(`[${ty}="${this._id}"]`);for(let i=0;i0!=r.indexOf(KB));e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){const r=this._messageRegistry.get(i);(function Qae(n,t,e){const i=ey(n,t);i.some(r=>r.trim()==e.trim())||(i.push(e.trim()),n.setAttribute(t,i.join(" ")))})(e,"aria-describedby",r.messageElement.id),e.setAttribute(ty,this._id),r.referenceCount++}_removeMessageReference(e,i){const r=this._messageRegistry.get(i);r.referenceCount--,function Kae(n,t,e){const r=ey(n,t).filter(o=>o!=e.trim());r.length?n.setAttribute(t,r.join(" ")):n.removeAttribute(t)}(e,"aria-describedby",r.messageElement.id),e.removeAttribute(ty)}_isElementDescribedByMessage(e,i){const r=ey(e,"aria-describedby"),o=this._messageRegistry.get(i),s=o&&o.messageElement.id;return!!s&&-1!=r.indexOf(s)}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&"object"==typeof i)return!0;const r=null==i?"":`${i}`.trim(),o=e.getAttribute("aria-label");return!(!r||o&&o.trim()===r)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Hn))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function HT(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function YB(n,t){n.id||(n.id=`${KB}-${t}-${UT++}`)}class ZB{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Me,this._typeaheadSubscription=lt.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new Me,this.change=new Me,t instanceof yl&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(gi(e=>this._pressedLetters.push(e)),Pc(t),mn(()=>this._pressedLetters.length>0),ct(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof yl?this._items.toArray():this._items}}class JB extends ZB{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class zT extends ZB{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let mg=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function Yae(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;const i=function Xae(n){try{return n.frameElement}catch{return null}}(function oce(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(e));if(i&&(-1===t5(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=t5(e);return e.hasAttribute("contenteditable")?-1!==o:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ice(n){let t=n.nodeName.toLowerCase(),e="input"===t&&n.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==o:"video"===r?-1!==o&&(null!==o||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function rce(n){return!function Jae(n){return function tce(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function Zae(n){let t=n.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(n)||function ece(n){return function nce(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||e5(n))}(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function e5(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function t5(n){if(!e5(n))return null;const t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class sce{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}constructor(t,e,i,r,o=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){const e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){const e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){const i=this._getFirstTabbableElement(e);return i?.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){const e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){const e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;const e=t.children;for(let i=0;i=0;i--){const r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(An(1)).subscribe(t)}}let ny=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new sce(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(Q(mg),Q(Xe),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function iy(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function ry(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}const ace=new ae("cdk-input-modality-detector-options"),cce={ignoreKeys:[18,17,224,91,16]},kf=pa({passive:!0,capture:!0});let lce=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new Ti(null),this._lastTouchMs=0,this._onKeydown=s=>{this._options?.ignoreKeys?.some(a=>a===s.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=fs(s))},this._onMousedown=s=>{Date.now()-this._lastTouchMs<650||(this._modality.next(iy(s)?"keyboard":"mouse"),this._mostRecentTarget=fs(s))},this._onTouchstart=s=>{ry(s)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=fs(s))},this._options={...cce,...o},this.modalityDetected=this._modality.pipe(LT(1)),this.modalityChanged=this.modalityDetected.pipe(ja()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,kf),r.addEventListener("mousedown",this._onMousedown,kf),r.addEventListener("touchstart",this._onTouchstart,kf)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,kf),document.removeEventListener("mousedown",this._onMousedown,kf),document.removeEventListener("touchstart",this._onTouchstart,kf))}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(Xe),Q(gt),Q(ace,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const dce=new ae("liveAnnouncerElement",{providedIn:"root",factory:function uce(){return null}}),hce=new ae("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let fce=0,jT=(()=>{class n{constructor(e,i,r,o){this._ngZone=i,this._defaultOptions=o,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){const r=this._defaultOptions;let o,s;return 1===i.length&&"number"==typeof i[0]?s=i[0]:[o,s]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),null==s&&r&&(s=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof s&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class n{constructor(e,i,r,o,s){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Me,this._rootNodeFocusAndBlurListener=a=>{for(let l=fs(a);l;l=l.parentElement)"focus"===a.type?this._onFocus(a,l):this._onBlur(a,l)},this._document=o,this._detectionMode=s?.detectionMode||0}monitor(e,i=!1){const r=Mi(e);if(!this._platform.isBrowser||1!==r.nodeType)return nt(null);const o=RT(r)||this._getDocument(),s=this._elementInfo.get(r);if(s)return i&&(s.checkChildren=!0),s.subject;const a={checkChildren:i,subject:new Me,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const i=Mi(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){const o=Mi(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([a,c])=>this._originChanged(a,i,c)):(this._setOrigin(i),"function"==typeof o.focus&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){const r=this._elementInfo.get(i),o=fs(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,oy),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,oy)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(St(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){const i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,oy),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,oy),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){const i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;const o=e.labels;if(o)for(let s=0;s{class n{constructor(e,i){this._elementRef=e,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new De}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){const e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(i=>{this._focusOrigin=i,this.cdkFocusChange.emit(i)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ms))},n.\u0275dir=X({type:n,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]}),n})();const r5="cdk-high-contrast-black-on-white",o5="cdk-high-contrast-white-on-black",$T="cdk-high-contrast-active";let s5=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=Et(VT).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove($T,r5,o5),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?e.add($T,r5):2===i&&e.add($T,o5)}}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),GT=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(Q(s5))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Jv]}),n})();const gce=new ae("cdk-dir-doc",{providedIn:"root",factory:function _ce(){return Et(gt)}}),bce=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Hi=(()=>{class n{constructor(e){this.value="ltr",this.change=new De,e&&(this.value=function vce(n){const t=n?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?bce.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(Q(gce,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),pg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const yce=["text"];function xce(n,t){if(1&n&&_e(0,"mat-pseudo-checkbox",6),2&n){const e=O();E("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function wce(n,t){1&n&&_e(0,"mat-pseudo-checkbox",7),2&n&&E("disabled",O().disabled)}function Cce(n,t){if(1&n&&(_(0,"span",8),k(1),v()),2&n){const e=O();w(1),it("(",e.group.label,")")}}const kce=[[["mat-icon"]],"*"],Ece=["mat-icon","*"];let Tce=(()=>{class n{}return n.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",n.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",n.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",n.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",n})(),Sce=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})();const Ace=new ae("mat-sanity-checks",{providedIn:"root",factory:function Dce(){return!0}});let Ft=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!FT()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(Q(s5),Q(Ace,8),Q(gt))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[pg,pg]}),n})();function Oc(n){return class extends n{get disabled(){return this._disabled}set disabled(t){this._disabled=Qe(t)}constructor(...t){super(...t),this._disabled=!1}}}function Pl(n,t){return class extends n{get color(){return this._color}set color(e){const i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}constructor(...e){super(...e),this.defaultColor=t,this.color=t}}}function Ol(n){return class extends n{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Qe(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function gg(n,t=0){return class extends n{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?gr(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function l5(n){return class extends n{updateErrorState(){const t=this.errorState,o=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);o!==t&&(this.errorState=o,this.stateChanges.next())}constructor(...t){super(...t),this.errorState=!1}}}function Ice(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Dn(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}let d5=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class Rce{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const u5=pa({passive:!0,capture:!0});class Fce{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=fs(t);e&&this._events.get(t.type)?.forEach((i,r)=>{(r===e||r.contains(e))&&i.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,i,r){const o=this._events.get(e);if(o){const s=o.get(i);s?s.add(r):o.set(i,new Set([r]))}else this._events.set(e,new Map([[i,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,u5)})}removeHandler(t,e,i){const r=this._events.get(t);if(!r)return;const o=r.get(e);o&&(o.delete(i),0===o.size&&r.delete(e),0===r.size&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,u5)))}}const h5={enterDuration:225,exitDuration:150},f5=pa({passive:!0,capture:!0}),m5=["mousedown","touchstart"],p5=["mouseup","mouseleave","touchend","touchcancel"];class Ef{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Mi(i))}fadeInRipple(t,e,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o={...h5,...i.animation};i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const s=i.radius||function Oce(n,t,e){const i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),a=t-r.left,c=e-r.top,l=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-s+"px",d.style.top=c-s+"px",d.style.height=2*s+"px",d.style.width=2*s+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(d);const u=window.getComputedStyle(d),f=u.transitionDuration,m="none"===u.transitionProperty||"0s"===f||"0s, 0s"===f||0===r.width&&0===r.height,g=new Rce(this,d,i,m);d.style.transform="scale3d(1, 1, 1)",g.state=0,i.persistent||(this._mostRecentTransientRipple=g);let p=null;return!m&&(l||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const b=()=>this._finishRippleTransition(g),C=()=>this._destroyRipple(g);d.addEventListener("transitionend",b),d.addEventListener("transitioncancel",C),p={onTransitionEnd:b,onTransitionCancel:C}}),this._activeRipples.set(g,p),(m||!l)&&this._finishRippleTransition(g),g}fadeOutRipple(t){if(2===t.state||3===t.state)return;const e=t.element,i={...h5,...t.config.animation};e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){const e=Mi(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,m5.forEach(i=>{Ef._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{p5.forEach(e=>{this._triggerElement.addEventListener(e,this,f5)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){0===t.state?this._startFadeOutTransition(t):2===t.state&&this._destroyRipple(t)}_startFadeOutTransition(t){const e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=1,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){const e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=3,null!==e&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel)),t.element.remove()}_onMousedown(t){const e=iy(t),i=this._lastTouchStartEvent&&Date.now(){!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const t=this._triggerElement;t&&(m5.forEach(e=>Ef._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&p5.forEach(e=>t.removeEventListener(e,this,f5)))}}Ef._eventManager=new Fce;const WT=new ae("mat-ripple-global-options");let Bs=(()=>{class n{get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}constructor(e,i,r,o,s){this._elementRef=e,this._animationMode=s,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new Ef(this,i,e,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...e})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Xe),y(Hn),y(WT,8),y(Jn,8))},n.\u0275dir=X({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),Nl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})(),Nce=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return n.\u0275fac=function(e){return new(e||n)(y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&ot("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal","minimal"===i.appearance)("mat-pseudo-checkbox-full","full"===i.appearance)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0}),n})(),g5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft]}),n})();const qT=new ae("MAT_OPTION_PARENT_COMPONENT"),QT=new ae("MatOptgroup");let Lce=0;class _5{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let Bce=(()=>{class n{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=Qe(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(e,i,r,o){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+Lce++,this.onSelectionChange=new De,this._stateChanges=new Me}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!so(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new _5(this,e))}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(yce,7),2&e){let r;Ae(r=Ie())&&(i._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),Ll=(()=>{class n extends Bce{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(qT,8),y(QT,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,i){1&e&&z("click",function(){return i._selectViaInteraction()})("keydown",function(o){return i._handleKeydown(o)}),2&e&&(Ba("id",i.id),vt("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),ot("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},exportAs:["matOption"],features:[ye],ngContentSelectors:Ece,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(Rn(kce),A(0,xce,1,2,"mat-pseudo-checkbox",0),dt(1),_(2,"span",1,2),dt(4,1),v(),A(5,wce,1,1,"mat-pseudo-checkbox",3),A(6,Cce,2,1,"span",4),_e(7,"div",5)),2&e&&(E("ngIf",i.multiple),w(5),E("ngIf",!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator),w(1),E("ngIf",i.group&&i.group._inert),w(1),E("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Bs,ri,Nce],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})();function b5(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),o=0;for(let s=0;se+i?Math.max(0,n-i+t):e}let sy=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Nl,Br,Ft,g5]}),n})();const y5=["mat-button",""],x5=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],w5=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],C5=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",Uce=["mat-icon-button",""],Hce=["*"],zce=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],jce=Pl(Oc(Ol(class{constructor(n){this._elementRef=n}})));let KT=(()=>{class n extends jce{constructor(e,i,r,o){super(e),this._platform=i,this._ngZone=r,this._animationMode=o,this._focusMonitor=Et(ms),this._isFab=!1;const s=e.nativeElement.classList;for(const a of zce)this._hasHostAttributes(a.selector)&&a.mdcClasses.forEach(c=>{s.add(c)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...e){return e.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(Bs,5),2&e){let r;Ae(r=Ie())&&(i.ripple=r.first)}},features:[ye]}),n})(),Gce=(()=>{class n extends KT{constructor(e,i,r,o){super(e,i,r,o),this._haltDisabledEvents=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,features:[ye]}),n})(),Fo=(()=>{class n extends KT{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Xe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(vt("disabled",i.disabled||null),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ye],attrs:y5,ngContentSelectors:w5,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Rn(x5),_e(0,"span",0),dt(1),_(2,"span",1),dt(3,1),v(),dt(4,2),_e(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ot("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),w(6),E("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Bs],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n 100% + 4px\n );width:calc(\n 100% + 4px\n );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),Wce=(()=>{class n extends Gce{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Xe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:9,hostBindings:function(e,i){2&e&&(vt("disabled",i.disabled||null)("tabindex",i.disabled?-1:i.tabIndex)("aria-disabled",i.disabled.toString()),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[ye],attrs:y5,ngContentSelectors:w5,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Rn(x5),_e(0,"span",0),dt(1),_(2,"span",1),dt(3,1),v(),dt(4,2),_e(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ot("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),w(6),E("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Bs],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n 100% + 4px\n );width:calc(\n 100% + 4px\n );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',C5],encapsulation:2,changeDetection:0}),n})(),Vs=(()=>{class n extends KT{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Xe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(vt("disabled",i.disabled||null),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ye],attrs:Uce,ngContentSelectors:Hce,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Rn(),_e(0,"span",0),dt(1),_e(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(w(3),E("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Bs],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',C5],encapsulation:2,changeDetection:0}),n})(),k5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Nl,Ft]}),n})();class E5{}class Qce{}const Nc="*";function $n(n,t){return{type:7,name:n,definitions:t,options:{}}}function Gt(n,t=null){return{type:4,styles:t,timings:n}}function XT(n,t=null){return{type:3,steps:n,options:t}}function T5(n,t=null){return{type:2,steps:n,options:t}}function ze(n){return{type:6,styles:n,offset:null}}function pn(n,t,e){return{type:0,name:n,styles:t,options:e}}function Tf(n){return{type:5,steps:n}}function Qt(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function ay(n=null){return{type:9,options:n}}function cy(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function S5(n){Promise.resolve().then(n)}class bg{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){S5(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class D5{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?S5(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const YT="!";class ZT{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class Sf extends ZT{constructor(t,e,i,r,o){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=o}}class Lc extends ZT{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class Kce extends ZT{constructor(t){super(),this.element=t instanceof Ne?t.nativeElement:t}}class ly{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Sf?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Lc?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof Kce?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Xce extends ly{constructor(t,e,i,r,o){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=s=>{const a=s.element,c=this._document.createComment("dom-portal");a.parentNode.insertBefore(c,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}attachComponentPortal(t){const i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let r;return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector,t.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||Ni.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let Yce=(()=>{class n extends Lc{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(ii))},n.\u0275dir=X({type:n,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[ye]}),n})(),Bc=(()=>{class n extends ly{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new De,this.attachDomPortal=o=>{const s=o.element,a=this._document.createComment("dom-portal");o.setAttachedHost(this),s.parentNode.insertBefore(a,s),this._getRootNode().appendChild(s),this._attachedPortal=o,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(s,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);const i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,o=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),s=i.createComponent(o,i.length,e.injector||i.injector,e.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(e){e.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return n.\u0275fac=function(e){return new(e||n)(y(bl),y(ii),y(gt))},n.\u0275dir=X({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ye]}),n})(),ru=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const Zce=["addListener","removeListener"],Jce=["addEventListener","removeEventListener"],ele=["on","off"];function ga(n,t,e,i){if(sn(e)&&(i=e,e=void 0),i)return ga(n,t,e).pipe(HE(i));const[r,o]=function ile(n){return sn(n.addEventListener)&&sn(n.removeEventListener)}(n)?Jce.map(s=>a=>n[s](t,a,e)):function tle(n){return sn(n.addListener)&&sn(n.removeListener)}(n)?Zce.map(A5(n,t)):function nle(n){return sn(n.on)&&sn(n.off)}(n)?ele.map(A5(n,t)):[];if(!r&&$w(n))return hr(s=>ga(s,t,e))(Kr(n));if(!r)throw new TypeError("Invalid event target");return new Dn(s=>{const a=(...c)=>s.next(1o(a)})}function A5(n,t){return e=>i=>n[e](t,i)}const vg={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=vg;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=t(o=>{e=void 0,n(o)});return new lt(()=>e?.(r))},requestAnimationFrame(...n){const{delegate:t}=vg;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:t}=vg;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},I5=new class ole extends NT{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let 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}}}(class rle extends OT{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=vg.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);const{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(vg.cancelAnimationFrame(e),t._scheduled=void 0)}});let JT,sle=1;const dy={};function M5(n){return n in dy&&(delete dy[n],!0)}const ale={setImmediate(n){const t=sle++;return dy[t]=!0,JT||(JT=Promise.resolve()),JT.then(()=>M5(t)&&n()),t},clearImmediate(n){M5(n)}},{setImmediate:cle,clearImmediate:lle}=ale,uy={setImmediate(...n){const{delegate:t}=uy;return(t?.setImmediate||cle)(...n)},clearImmediate(n){const{delegate:t}=uy;return(t?.clearImmediate||lle)(n)},delegate:void 0},eS=new class ule extends NT{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let 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}}}(class dle extends OT{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=uy.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);const{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(uy.clearImmediate(e),t._scheduled=void 0)}});function yg(n=0,t,e=Uae){let i=-1;return null!=t&&(NR(t)?e=t:i=t),new Dn(r=>{let o=function fle(n){return n instanceof Date&&!isNaN(n)}(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=hg){return function hle(n){return Ci((t,e)=>{let i=!1,r=null,o=null,s=!1;const a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;const l=r;r=null,e.next(l)}s&&e.complete()},c=()=>{o=null,s&&e.complete()};t.subscribe(ui(e,l=>{i=!0,r=l,o||Kr(n(l)).subscribe(o=ui(e,a,c))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>yg(n,t))}const mle=["contentWrapper"],ple=["*"],gle=new ae("VIRTUAL_SCROLL_STRATEGY");let ou=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new Me,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new Dn(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(tS(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):nt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){const r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(mn(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Mi(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>ga(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(Q(Xe),Q(Hn),Q(gt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),xg=(()=>{class n{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new Me,this._elementScrolled=new Dn(s=>this.ngZone.runOutsideAngular(()=>ga(this.elementRef.nativeElement,"scroll").pipe(St(this._destroyed)).subscribe(s)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=lg()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==lg()?e.left=e.right:1==lg()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const i=this.elementRef.nativeElement;zB()?i.scrollTo(e):(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left))}measureScrollOffset(e){const i="left",r="right",o=this.elementRef.nativeElement;if("top"==e)return o.scrollTop;if("bottom"==e)return o.scrollHeight-o.clientHeight-o.scrollTop;const s=this.dir&&"rtl"==this.dir.value;return"start"==e?e=s?r:i:"end"==e&&(e=s?i:r),s&&2==lg()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&1==lg()?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ou),y(Xe),y(Hi,8))},n.\u0275dir=X({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),n})(),_a=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new Me,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const 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};const e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(tS(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(Xe),Q(gt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const R5=new ae("VIRTUAL_SCROLLABLE");let vle=(()=>{class n extends xg{constructor(e,i,r,o){super(e,i,r,o)}measureViewportSize(e){const i=this.elementRef.nativeElement;return"horizontal"===e?i.clientWidth:i.clientHeight}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ou),y(Xe),y(Hi,8))},n.\u0275dir=X({type:n,features:[ye]}),n})();const xle=typeof requestAnimationFrame<"u"?I5:eS;let wle=(()=>{class n extends vle{get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=Qe(e)}constructor(e,i,r,o,s,a,c,l){super(e,a,r,s),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this.scrollable=l,this._platform=Et(Hn),this._detachedSubject=new Me,this._renderedRangeSubject=new Me,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Dn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(u=>Promise.resolve().then(()=>this.ngZone.run(()=>d.next(u))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=lt.EMPTY,this._viewportChanges=c.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}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(er(null),tS(0,xle)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(St(this._detachedSubject)).subscribe(i=>{const 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){(function yle(n,t){return n.start==t.start&&n.end==t.end})(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&&"to-start"===i?0:e;const o="horizontal"==this.orientation,s=o?"X":"Y";let c=`translate${s}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i;const r="left",o="right",s="rtl"==this.dir?.value;i="start"==e?s?o:r:"end"==e?s?r:o:e||("horizontal"===this.orientation?"left":"top");const a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?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),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(Xe),y(gle,8),y(Hi,8),y(ou),y(_a),y(R5,8))},n.\u0275cmp=Ve({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&pt(mle,7),2&e){let r;Ae(r=Ie())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&ot("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[tt([{provide:xg,useFactory:(t,e)=>t||e,deps:[[new Ia,new gb(R5)],n]}]),ye,Bk],ngContentSelectors:ple,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(Rn(),_(0,"div",0,1),dt(2),v(),_e(3,"div",2)),2&e&&(w(3),Ai("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.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}"],encapsulation:2,changeDetection:0}),n})(),Vc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})(),nS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[pg,Vc,wle,pg,Vc]}),n})();const F5=zB();class Cle{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=nr(-this._previousScrollPosition.left),t.style.top=nr(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,i=t.style,r=this._document.body.style,o=i.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),F5&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),F5&&(i.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}class kle{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0).pipe(mn(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class P5{enable(){}disable(){}attach(){}}function iS(n,t){return t.some(e=>n.bottome.bottom||n.righte.right)}function O5(n,t){return t.some(e=>n.tope.bottom||n.lefte.right)}class Ele{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();iS(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let Tle=(()=>{class n{constructor(e,i,r,o){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new P5,this.close=s=>new kle(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new Cle(this._viewportRuler,this._document),this.reposition=s=>new Ele(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}}return n.\u0275fac=function(e){return new(e||n)(Q(ou),Q(_a),Q(Xe),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class Df{constructor(t){if(this.scrollStrategy=new P5,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class Sle{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let N5=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){const i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Dle=(()=>{class n extends N5{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{const o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){const a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Xe,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ale=(()=>{class n extends N5{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=fs(o)},this._clickListener=o=>{const s=fs(o),a="click"===o.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;const c=this._attachedOverlays.slice();for(let l=c.length-1;l>-1;l--){const d=c[l];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(s)||d.overlayElement.contains(a))break;const u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(e){if(super.add(e),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Hn),Q(Xe,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),hy=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e="cdk-overlay-container";if(this._platform.isBrowser||FT()){const r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;othis._backdropClick.next(u),this._backdropTransitionendHandler=u=>{this._disposeBackdrop(u.target)},this._keydownEvents=new Me,this._outsidePointerEvents=new Me,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(An(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof e?.onDestroy&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config={...this._config,...t},this._updateElementSize()}setDirection(t){this._config={...this._config,direction:t},this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=nr(this._config.width),t.height=nr(this._config.height),t.minWidth=nr(this._config.minWidth),t.minHeight=nr(this._config.minHeight),t.maxWidth=nr(this._config.maxWidth),t.maxHeight=nr(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){const t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const t=this._backdropElement;if(t){if(this._animationsDisabled)return void this._disposeBackdrop(t);t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){const r=fg(e||[]).filter(o=>!!o);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(St(oi(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const L5="cdk-overlay-connected-position-bounding-box",Ile=/([A-Za-z%]+)$/;class Mle{get positions(){return this._preferredPositions}constructor(t,e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Me,this._resizeSubscription=lt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(L5),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[];let s;for(let a of this._preferredPositions){let c=this._getOriginPoint(t,r,a),l=this._getOverlayPoint(c,e,a),d=this._getOverlayFit(l,e,i,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,c);this._canFitWithFlexibleDimensions(d,l,i)?o.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)}):(!s||s.overlayFit.visibleAreac&&(c=d,a=l)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(s.position,s.originPoint);this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&su(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(L5),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r,o;if("center"==i.originX)r=t.left+t.width/2;else{const s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==i.originX?s:a}return e.left<0&&(r-=e.left),o="center"==i.originY?t.top+t.height/2:"top"==i.originY?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,i){let r,o;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,o="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,i,r){const o=V5(e);let{x:s,y:a}=t,c=this._getOffset(r,"x"),l=this._getOffset(r,"y");c&&(s+=c),l&&(a+=l);let h=0-a,f=a+o.height-i.height,m=this._subtractOverflows(o.width,0-s,s+o.width-i.width),g=this._subtractOverflows(o.height,h,f),p=m*g;return{visibleArea:p,isCompletelyWithinViewport:o.width*o.height===p,fitsInViewportVertically:g===o.height,fitsInViewportHorizontally:m==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const r=i.bottom-e.y,o=i.right-e.x,s=B5(this._overlayRef.getConfig().minHeight),a=B5(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=s&&s<=r)&&(t.fitsInViewportHorizontally||null!=a&&a<=o)}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const r=V5(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=Math.max(t.y+r.height-o.height,0),c=Math.max(o.top-i.top-t.y,0),l=Math.max(o.left-i.left-t.x,0);let d=0,u=0;return d=r.width<=o.width?l||-s:t.xm&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-m/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)h=i.width-t.x+this._viewportMargin,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)u=t.x,d=i.right-t.x;else{const f=Math.min(i.right-t.x+i.left,t.x),m=this._lastBoundingBoxSize.width;d=2*f,u=t.x-f,d>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-m/2)}return{top:s,left:u,bottom:a,right:h,width:d,height:o}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=nr(i.height),r.top=nr(i.top),r.bottom=nr(i.bottom),r.width=nr(i.width),r.left=nr(i.left),r.right=nr(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",o&&(r.maxHeight=nr(o)),s&&(r.maxWidth=nr(s))}this._lastBoundingBoxSize=i,su(this._boundingBox.style,r)}_resetBoundingBoxStyles(){su(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){su(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){const d=this._viewportRuler.getViewportScrollPosition();su(i,this._getExactOverlayY(e,t,d)),su(i,this._getExactOverlayX(e,t,d))}else i.position="static";let a="",c=this._getOffset(e,"x"),l=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),i.transform=a.trim(),s.maxHeight&&(r?i.maxHeight=nr(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(r?i.maxWidth=nr(s.maxWidth):o&&(i.maxWidth="")),su(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(o.y+this._overlayRect.height)+"px":r.top=nr(o.y),r}_getExactOverlayX(t,e,i){let s,r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),s=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===s?r.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":r.left=nr(o.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:O5(t,i),isOriginOutsideView:iS(t,i),isOverlayClipped:O5(e,i),isOverlayOutsideView:iS(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&fg(t).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof Ne)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function su(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function B5(n){if("number"!=typeof n&&null!=n){const[t,e]=n.split(Ile);return e&&"px"!==e?null:parseFloat(t)}return n||null}function V5(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const U5="cdk-global-overlay-wrapper";class Rle{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(U5),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=i,c=!("100%"!==r&&"100vw"!==r||s&&"100%"!==s&&"100vw"!==s),l=!("100%"!==o&&"100vh"!==o||a&&"100%"!==a&&"100vh"!==a),d=this._xPosition,u=this._xOffset,h="rtl"===this._overlayRef.getConfig().direction;let f="",m="",g="";c?g="flex-start":"center"===d?(g="center",h?m=u:f=u):h?"left"===d||"end"===d?(g="flex-end",f=u):("right"===d||"start"===d)&&(g="flex-start",m=u):"left"===d||"start"===d?(g="flex-start",f=u):("right"===d||"end"===d)&&(g="flex-end",m=u),t.position=this._cssPosition,t.marginLeft=c?"0":f,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=c?"0":m,e.justifyContent=g,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(U5),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let Fle=(()=>{class n{constructor(e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o}global(){return new Rle}flexibleConnectedTo(e){return new Mle(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(e){return new(e||n)(Q(_a),Q(gt),Q(Hn),Q(hy))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ple=0,ao=(()=>{class n{constructor(e,i,r,o,s,a,c,l,d,u,h,f){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=c,this._document=l,this._directionality=d,this._location=u,this._outsideClickDispatcher=h,this._animationsModuleType=f}create(e){const i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),s=new Df(e);return s.direction=s.direction||this._directionality.value,new wg(o,i,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){const i=this._document.createElement("div");return i.id="cdk-overlay-"+Ple++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){const e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(af)),new Xce(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(Q(Tle),Q(hy),Q(bl),Q(Fle),Q(Dle),Q(Ni),Q(Xe),Q(gt),Q(Hi),Q(Np),Q(Ale),Q(Jn,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ole=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],H5=new ae("cdk-connected-overlay-scroll-strategy");let rS=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(y(Ne))},n.\u0275dir=X({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),n})(),z5=(()=>{class n{get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Qe(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=Qe(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=Qe(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=Qe(e)}get push(){return this._push}set push(e){this._push=Qe(e)}constructor(e,i,r,o,s){this._overlay=e,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=lt.EMPTY,this._attachSubscription=lt.EMPTY,this._detachSubscription=lt.EMPTY,this._positionSubscription=lt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new De,this.positionChange=new De,this.attach=new De,this.detach=new De,this.overlayKeydown=new De,this.overlayOutsideClick=new De,this._templatePortal=new Lc(i,r),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Ole);const e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!so(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new Df({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof rS?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(GE(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(ao),y(Un),y(ii),y(H5),y(Hi,8))},n.\u0275dir=X({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[jn]}),n})();const Lle={provide:H5,deps:[ao],useFactory:function Nle(n){return()=>n.scrollStrategies.reposition()}};let au=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[ao,Lle],imports:[pg,ru,nS,nS]}),n})();function Ble(n,t){if(1&n){const e=Le();_(0,"div",2)(1,"button",3),z("click",function(){return he(e),fe(O().action())}),k(2),v()()}if(2&n){const e=O();w(2),it(" ",e.data.action," ")}}const Vle=["label"];function Ule(n,t){}const Hle=Math.pow(2,31)-1;class fy{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Me,this._afterOpened=new Me,this._onAction=new Me,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,Hle))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const oS=new ae("MatSnackBarData");class my{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let zle=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),n})(),jle=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),n})(),$le=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),n})(),Gle=(()=>{class n{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(e){return new(e||n)(y(fy),y(oS))},n.\u0275cmp=Ve({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions","",4,"ngIf"],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(e,i){1&e&&(_(0,"div",0),k(1),v(),A(2,Ble,3,1,"div",1)),2&e&&(w(1),it(" ",i.data.message,"\n"),w(1),E("ngIf",i.hasAction))},dependencies:[ri,Fo,zle,jle,$le],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),n})();const Wle={snackBarState:$n("state",[pn("void, hidden",ze({transform:"scale(0.8)",opacity:0})),pn("visible",ze({transform:"scale(1)",opacity:1})),Qt("* => visible",Gt("150ms cubic-bezier(0, 0, 0.2, 1)")),Qt("* => void, * => hidden",Gt("75ms cubic-bezier(0.4, 0.0, 1, 1)",ze({opacity:0})))])};let qle=0,Qle=(()=>{class n extends ly{constructor(e,i,r,o,s){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=o,this.snackBarConfig=s,this._document=Et(gt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Me,this._onExit=new Me,this._onEnter=new Me,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+qle++,this.attachDomPortal=a=>{this._assertNotAttached();const c=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),c},this._live="assertive"!==s.politeness||s.announcementMessage?"off"===s.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){const{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(An(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i)),this._exposeToModals()}_exposeToModals(){const e=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const i=e.getAttribute("aria-owns");if(i){const r=i.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(e){return new(e||n)(y(Xe),y(Ne),y(an),y(Hn),y(my))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(Bc,7),2&e){let r;Ae(r=Ie())&&(i._portalOutlet=r.first)}},features:[ye]}),n})(),Kle=(()=>{class n extends Qle{_afterPortalAttached(){super._afterPortalAttached();const e=this._label.nativeElement,i="mdc-snackbar__label";e.classList.toggle(i,!e.querySelector(`.${i}`))}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,i){if(1&e&&pt(Vle,7),2&e){let r;Ae(r=Ie())&&(i._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,i){1&e&&Ub("@state.done",function(o){return i.onAnimationEnd(o)}),2&e&&$b("@state",i._animationState)},features:[ye],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1,2)(3,"div",3),A(4,Ule,0,0,"ng-template",4),v(),_e(5,"div"),v()()),2&e&&(w(5),vt("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[Bc],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss svg,.mat-mdc-snack-bar-container .mdc-snackbar__dismiss img{width:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px));height:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size, inherit);font-family:var(--mdc-snackbar-supporting-text-font, inherit);font-weight:var(--mdc-snackbar-supporting-text-weight, inherit);line-height:var(--mdc-snackbar-supporting-text-line-height, inherit)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-mdc-snack-bar-button-color, transparent);--mat-mdc-button-persistent-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{background-color:currentColor;opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[Wle.snackBarState]}}),n})(),j5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[au,ru,Br,k5,Ft,Ft]}),n})();const $5=new ae("mat-snack-bar-default-options",{providedIn:"root",factory:function Xle(){return new my}});let Yle=(()=>{class n{get _openedSnackBarRef(){const e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(e,i,r,o,s,a){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=o,this._parentSnackBar=s,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){const o={...this._defaultConfig,...r};return o.data={message:e,action:i},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){const o=Ni.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:my,useValue:i}]}),s=new Sf(this.snackBarContainerComponent,i.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){const r={...new my,...this._defaultConfig,...i},o=this._createOverlay(r),s=this._attachSnackBarContainer(o,r),a=new fy(s,o);if(e instanceof Un){const c=new Lc(e,null,{$implicit:r.data,snackBarRef:a});a.instance=s.attachTemplatePortal(c)}else{const c=this._createInjector(r,a),l=new Sf(e,void 0,c),d=s.attachComponentPortal(l);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(St(o.detachments())).subscribe(c=>{o.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),r.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){const i=new Df;i.direction=e.direction;let r=this._overlay.position().global();const o="rtl"===e.direction,s="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!o||"end"===e.horizontalPosition&&o,a=!s&&"center"!==e.horizontalPosition;return s?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return Ni.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:fy,useValue:i},{provide:oS,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(jT),Q(Ni),Q(VT),Q(n,12),Q($5))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Af=(()=>{class n extends Yle{constructor(e,i,r,o,s,a){super(e,i,r,o,s,a),this.simpleSnackBarComponent=Gle,this.snackBarContainerComponent=Kle,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(jT),Q(Ni),Q(VT),Q(n,12),Q($5))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:j5}),n})(),Si=(()=>{class n{constructor(e,i){this.sbRef=e,this.data=i}static#e=this.\u0275fac=function(i){return new(i||n)(y(fy),y(oS))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["snack-alert"]],decls:2,vars:1,consts:[[1,"example-alert"]],template:function(i,r){1&i&&(_(0,"span",0),k(1),v()),2&i&&(w(1),Ze(r.data))},styles:[".example-alert[_ngcontent-%COMP%]{color:#fff}"]})}return n})(),Ur=(()=>{class n{constructor(e,i){this.http=e,this._snackBar=i,this.snowstormFhirBase="https://snowstorm.ihtsdotools.org/fhir",this.defaultFhirUrlParam="http://snomed.info/sct",this.fhirUrlParam=this.defaultFhirUrlParam,this.lang="en",this.snowstormFhirBaseSubject=new Ti(this.snowstormFhirBase),this.fhirUrlParamSubject=new Ti(this.fhirUrlParam),this.langSubject=new Ti(this.lang),this.snowstormFhirBase$=this.snowstormFhirBaseSubject.asObservable(),this.fhirUrlParam$=this.fhirUrlParamSubject.asObservable(),this.lang$=this.langSubject.asObservable(),this.conceptCache=new Map}setSnowstormFhirBase(e){this.snowstormFhirBase=e,this.snowstormFhirBaseSubject.next(e)}setFhirUrlParam(e){this.fhirUrlParam=e,this.fhirUrlParamSubject.next(e)}setLang(e){this.lang=e,this.langSubject.next(e)}getSnowstormFhirBase(){return this.snowstormFhirBase}getFhirUrlParam(){return this.fhirUrlParam}getLang(){return this.lang}getCodeSystems(){return this.http.get(`${this.snowstormFhirBase}/CodeSystem`).pipe(Vi(this.handleError("getCodeSystems",{})))}getCodeSystem(e){return this.http.get(`${this.snowstormFhirBase}/CodeSystem?version=${e}`).pipe(Vi(this.handleError("getCodeSystem",{})))}getValueSetExpansionUrl(e,i,r,o){return r||(r=0),o||(o=20),"string"!=typeof i&&(i=""),`${this.snowstormFhirBase}/ValueSet/$expand?url=${this.fhirUrlParam}?fhir_vs=ecl/${encodeURIComponent(e)}&count=${o}&offset=${r}&filter=${i}&language=${this.lang}&displayLanguage=${this.lang}`}expandValueSet(e,i,r,o){let s=this.getValueSetExpansionUrl(e,i,r,o);return this.http.get(s).pipe(Vi(this.handleError("expandValueSet",{})))}translate(e,i,r){return r||(r=this.defaultFhirUrlParam),this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=${e}&code=${i}&system=${r}`).pipe(Vi(this.handleError("translate",{})))}expandValueSetFromServer(e,i,r,o,s,a){s||(s=0),a||(a=20),e||(e=this.snowstormFhirBase),i||(i=this.fhirUrlParam),"string"!=typeof o&&(o="");let c=`${e}/ValueSet/$expand?url=${i}?fhir_vs=ecl/${encodeURIComponent(r)}&count=${a}&offset=${s}&filter=${o}&language=${this.lang}&displayLanguage=${this.lang}`;return this.http.get(c).pipe(Vi(this.handleError("expandValueSet",{})))}handleError(e="operation",i){return r=>(console.error("There was an error!"),console.error(r),this._snackBar.openFromComponent(Si,{duration:5e3,data:r.message,panelClass:["red-snackbar"]}),nt(i))}lookupConcept(e,i){i||(i=this.fhirUrlParam);const r=`${i}:${e}`,o=this.conceptCache.get(r);if(o)return nt(o);let s=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=http://snomed.info/sct&code=${e}&property=normalForm`;"http://snomed.info/sct"!=i&&(s+=`&version=${i}`);const a={headers:new ma({"Accept-Language":"en"})};return this.http.get(s,a).pipe(gi(c=>{this.conceptCache.set(r,c)}),Vi(this.handleError("lookupConcept",{})))}getMRCMAttributes(e){let i=`${this.snowstormFhirBase.replace("fhir","snowstorm/snomed-ct")}mrcm/MAIN/domain-attributes?parentIds=${e}&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED`;return this.http.get(i).pipe(Vi(this.handleError("getMRCMAttributes",{})))}addPostcoordinatedExpression(e){let i=`${this.snowstormFhirBase}/CodeSystem/sct_11000003104_EXP`;const r={headers:new ma({"Content-Type":"application/fhir+json"})};return this.http.patch(i,{resourceType:"CodeSystem",concept:[{code:e}]},r).pipe(Vi(this.handleError("addPostcoordinatedExpression",{})))}runEclLegacy(e){let i=`https://browser.ihtsdotools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-ES/2022-10-31/concepts?offset=0&limit=100&termActive=true&ecl=${encodeURIComponent(e)}`;return this.http.get(i).pipe(Vi(this.handleError("expandValueSet",{})))}getIcd10MapTargets(e){return this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?code=${e}&system=http://snomed.info/sct&source=http://snomed.info/sct?fhir_vs&target=http://hl7.org/fhir/sid/icd-10&url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_cm=447562003`).pipe(Vi(this.handleError("translate",{})))}lookupOtherCodeSystems(e,i){return this.http.get(`${this.snowstormFhirBase}/CodeSystem/$lookup?system=${e}&code=${i}`).pipe(Vi(this.handleError("lookup",{})))}getNormalForm(e){if(e.parameter)for(let i of e.parameter){let r=!1;if("property"==i.name){for(let o of i.part)"code"==o.name&&"normalForm"==o.valueString&&(r=!0);if(r)for(let o of i.part)if("valueString"==o.name)return o.valueString}}return""}parseNormmalForm(e){const i=[];return e.split("} {").forEach(o=>{const s=o.match(/\d+\|[^\|]+\|\s*=\s*\d+\|[^\|]+\|/g);if(!s)return;const a=s.map(c=>{const[l,d]=c.split("=").map(g=>g.trim()),[u,h]=l.split("|").map(g=>g.trim()),[f,m]=d.split("|").map(g=>g.trim());return{type:{code:u,display:h.replace(/\(.*\)/,"").trim()},target:{code:f,display:m}}});i.push(a)}),{groups:i}}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ml),Q(Af))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function G5(...n){const t=LR(n),{args:e,keys:i}=h3(n),r=new Dn(o=>{const{length:s}=e;if(!s)return void o.complete();const a=new Array(s);let c=s,l=s;for(let d=0;d{u||(u=!0,l--),a[d]=h},()=>c--,void 0,()=>{(!c||!u)&&(l||o.next(i?f3(i,a):a),o.complete())}))}});return t?r.pipe(HE(t)):r}const Zle=["*"];let py;function Cg(n){return function Jle(){if(void 0===py&&(py=null,typeof window<"u")){const n=window;void 0!==n.trustedTypes&&(py=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return py}()?.createHTML(n)||n}function W5(n){return Error(`Unable to find icon with the name "${n}"`)}function q5(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function Q5(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class cu{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let gy=(()=>{class n{constructor(e,i,r,o){this._httpClient=e,this._sanitizer=i,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,o){return this._addSvgIconConfig(e,i,new cu(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,o){const s=this._sanitizer.sanitize(Nn.HTML,r);if(!s)throw Q5(r);const a=Cg(s);return this._addSvgIconConfig(e,i,new cu("",a,o))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new cu(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){const o=this._sanitizer.sanitize(Nn.HTML,i);if(!o)throw Q5(i);const s=Cg(o);return this._addSvgIconSetConfig(e,new cu("",s,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){const i=this._sanitizer.sanitize(Nn.RESOURCE_URL,e);if(!i)throw q5(e);const r=this._cachedIconsByUrl.get(i);return r?nt(_y(r)):this._loadSvgIconFromConfig(new cu(e,null)).pipe(gi(o=>this._cachedIconsByUrl.set(i,o)),ct(o=>_y(o)))}getNamedSvgIcon(e,i=""){const r=K5(i,e);let o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(i,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);const s=this._iconSetConfigs.get(i);return s?this._getSvgFromIconSetConfigs(e,s):eu(W5(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?nt(_y(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(ct(i=>_y(i)))}_getSvgFromIconSetConfigs(e,i){const r=this._extractIconWithNameFromAnySet(e,i);return r?nt(r):G5(i.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(Vi(a=>{const l=`Loading icon set URL: ${this._sanitizer.sanitize(Nn.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(l)),nt(null)})))).pipe(ct(()=>{const s=this._extractIconWithNameFromAnySet(e,i);if(!s)throw W5(e);return s}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){const s=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(s,e,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(gi(i=>e.svgText=i),ct(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?nt(null):this._fetchIcon(e).pipe(gi(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){const o=e.querySelector(`[id="${i}"]`);if(!o)return null;const s=o.cloneNode(!0);if(s.removeAttribute("id"),"svg"===s.nodeName.toLowerCase())return this._setSvgAttributes(s,r);if("symbol"===s.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(s),r);const a=this._svgElementFromString(Cg(""));return a.appendChild(s),this._setSvgAttributes(a,r)}_svgElementFromString(e){const i=this._document.createElement("DIV");i.innerHTML=e;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){const i=this._svgElementFromString(Cg("")),r=e.attributes;for(let o=0;oCg(l)),kv(()=>this._inProgressUrlFetches.delete(s)),HR());return this._inProgressUrlFetches.set(s,c),c}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(K5(e,i),r),this}_addSvgIconSetConfig(e,i){const r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){const i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;rt?t.pathname+t.search:""}}}),X5=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ade=X5.map(n=>`[${n}]`).join(", "),cde=/^url\(['"]?#(.*?)['"]?\)$/;let co=(()=>{class n extends ide{get inline(){return this._inline}set inline(e){this._inline=Qe(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){const i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){const i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}constructor(e,i,r,o,s,a){super(e),this._iconRegistry=i,this._location=o,this._errorHandler=s,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=lt.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];const i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const e=this._elementsWithExternalReferences;if(e&&e.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){const e=this._elementRef.nativeElement;let i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){const i=this._elementsWithExternalReferences;i&&i.forEach((r,o)=>{r.forEach(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){const i=e.querySelectorAll(ade),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o{const a=i[o],c=a.getAttribute(s),l=c?c.match(cde):null;if(l){let d=r.get(a);d||(d=[],r.set(a,d)),d.push({name:s,value:l[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){const[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(An(1)).subscribe(o=>this._setSvgElement(o),o=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${o.message}`))})}}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(gy),Ms("aria-hidden"),y(ode),y(kc),y(rde,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,i){2&e&&(vt("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),ot("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[ye],ngContentSelectors:Zle,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),dt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),lde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})();function Y5(n,t){return t?e=>jp(t.pipe(An(1),function dde(){return Ci((n,t)=>{n.subscribe(ui(t,To))})}()),e.pipe(Y5(n))):hr((e,i)=>Kr(n(e,i)).pipe(An(1),Cv(e)))}function sS(n,t=hg){const e=yg(n,t);return Y5(()=>e)}const ude=["mat-menu-item",""];function hde(n,t){1&n&&(xc(),_(0,"svg",3),_e(1,"polygon",4),v())}const fde=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],mde=["mat-icon, [matMenuItemIcon]","*"];function pde(n,t){if(1&n){const e=Le();_(0,"div",0),z("keydown",function(r){return he(e),fe(O()._handleKeydown(r))})("click",function(){return he(e),fe(O().closed.emit("click"))})("@transformMenu.start",function(r){return he(e),fe(O()._onAnimationStart(r))})("@transformMenu.done",function(r){return he(e),fe(O()._onAnimationDone(r))}),_(1,"div",1),dt(2),v()()}if(2&n){const e=O();E("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),vt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const gde=["*"],aS=new ae("MAT_MENU_PANEL"),_de=Ol(Oc(class{}));let $a=(()=>{class n extends _de{constructor(e,i,r,o,s){super(),this._elementRef=e,this._document=i,this._focusMonitor=r,this._parentMenu=o,this._changeDetectorRef=s,this.role="menuitem",this._hovered=new Me,this._focused=new Me,this._highlighted=!1,this._triggersSubmenu=!1,o?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",Gt("120ms cubic-bezier(0, 0, 0.2, 1)",ze({opacity:1,transform:"scale(1)"}))),Qt("* => void",Gt("100ms 25ms linear",ze({opacity:0})))]),fadeInItems:$n("fadeInItems",[pn("showing",ze({opacity:1})),Qt("void => *",[ze({opacity:0}),Gt("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let vde=0;const Z5=new ae("mat-menu-default-options",{providedIn:"root",factory:function yde(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let kg=(()=>{class n{get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(e){this._overlapTrigger=Qe(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Qe(e)}set panelClass(e){const i=this._previousPanelClass;i&&i.length&&i.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(e){this.panelClass=e}constructor(e,i,r,o){this._elementRef=e,this._ngZone=i,this._defaultOptions=r,this._changeDetectorRef=o,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new yl,this._classList={},this._panelAnimationState="void",this._animationDone=new Me,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new De,this.close=this.closed,this.panelId="mat-menu-panel-"+vde++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new zT(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(er(this._directDescendantItems),Ji(e=>oi(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{const i=this._keyManager;if("enter"===this._panelAnimationState&&i.activeItem?._hasFocus()){const r=e.toArray(),o=Math.max(0,Math.min(r.length-1,i.activeItemIndex||0));r[o]&&!r[o].disabled?i.setActiveItem(o):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(er(this._directDescendantItems),Ji(i=>oi(...i.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const i=e.keyCode,r=this._keyManager;switch(i){case 27:so(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===i||40===i)&&r.setFocusOrigin("keyboard"),void r.onKeydown(e)}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(An(1)).subscribe(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&i&&i.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){const i=Math.min(this._baseElevation+e,24),r=`${this._elevationPrefix}${i}`,o=Object.keys(this._classList).find(s=>s.startsWith(this._elevationPrefix));(!o||o===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(e=this.xPosition,i=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===e,r["mat-menu-after"]="after"===e,r["mat-menu-above"]="above"===i,r["mat-menu-below"]="below"===i,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(e){this._animationDone.next(e),this._isAnimating=!1}_onAnimationStart(e){this._isAnimating=!0,"enter"===e.toState&&0===this._keyManager.activeItemIndex&&(e.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(er(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Xe),y(Z5),y(an))},n.\u0275dir=X({type:n,contentQueries:function(e,i,r){if(1&e&&(qt(r,bde,5),qt(r,$a,5),qt(r,$a,4)),2&e){let o;Ae(o=Ie())&&(i.lazyContent=o.first),Ae(o=Ie())&&(i._allItems=o),Ae(o=Ie())&&(i.items=o)}},viewQuery:function(e,i){if(1&e&&pt(Un,5),2&e){let r;Ae(r=Ie())&&(i.templateRef=r.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}}),n})(),lu=(()=>{class n extends kg{constructor(e,i,r,o){super(e,i,r,o),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Xe),y(Z5),y(an))},n.\u0275cmp=Ve({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,i){2&e&&vt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[tt([{provide:aS,useExisting:n}]),ye],ngContentSelectors:gde,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(e,i){1&e&&(Rn(),A(0,pde,3,6,"ng-template"))},dependencies:[ha],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[by.transformMenu,by.fadeInItems]},changeDetection:0}),n})();const J5=new ae("mat-menu-scroll-strategy"),wde={provide:J5,deps:[ao],useFactory:function xde(n){return()=>n.scrollStrategies.reposition()}},eV=pa({passive:!0});let Cde=(()=>{class n{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),("click"===i||"tab"===i)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(e,i,r,o,s,a,c,l,d){this._overlay=e,this._element=i,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=c,this._focusMonitor=l,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=lt.EMPTY,this._hoverSubscription=lt.EMPTY,this._menuCloseSubscription=lt.EMPTY,this._changeDetectorRef=Et(an),this._handleTouchStart=u=>{ry(u)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new De,this.onMenuOpen=this.menuOpened,this.menuClosed=new De,this.onMenuClose=this.menuClosed,this._scrollStrategy=o,this._parentMaterialMenu=s instanceof kg?s:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,eV)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,eV),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const e=this.menu;if(this._menuOpen||!e)return;const i=this._createOverlay(e),r=i.getConfig(),o=r.positionStrategy;this._setPosition(e,o),r.hasBackdrop=null==e.hasBackdrop?!this.triggersSubmenu():e.hasBackdrop,i.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof kg&&(e._startAnimation(),e._directDescendantItems.changes.pipe(St(e.close)).subscribe(()=>{o.withLockedPosition(!1).reapplyLastPosition(),o.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;const i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===e||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof kg?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(mn(r=>"void"===r.toState),An(1),St(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(e){e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,this._setMenuElevation(e),e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(e){if(e.setElevation){let i=0,r=e.parentMenu;for(;r;)i++,r=r.parentMenu;e.setElevation(i)}}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){const i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new Df({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(r=>{const o="start"===r.connectionPair.overlayX?"after":"before",s="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(o,s)):e.setPositionClasses(o,s)})}_setPosition(e,i){let[r,o]="before"===e.xPosition?["end","start"]:["start","end"],[s,a]="above"===e.yPosition?["bottom","top"]:["top","bottom"],[c,l]=[s,a],[d,u]=[r,o],h=0;if(this.triggersSubmenu()){if(u=r="before"===e.xPosition?"start":"end",o=d="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}h="bottom"===s?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(c="top"===s?"bottom":"top",l="top"===a?"bottom":"top");i.withPositions([{originX:r,originY:c,overlayX:d,overlayY:s,offsetY:h},{originX:o,originY:c,overlayX:u,overlayY:s,offsetY:h},{originX:r,originY:l,overlayX:d,overlayY:a,offsetY:-h},{originX:o,originY:l,overlayX:u,overlayY:a,offsetY:-h}])}_menuClosingActions(){const e=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return oi(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:nt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(mn(s=>s!==this._menuItemInstance),mn(()=>this._menuOpen)):nt(),i)}_handleMousedown(e){iy(e)||(this._openedBy=0===e.button?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){const i=e.keyCode;(13===i||32===i)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===i&&"ltr"===this.dir||37===i&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(mn(e=>e===this._menuItemInstance&&!e.disabled),sS(0,eS)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof kg&&this.menu._isAnimating?this.menu._animationDone.pipe(An(1),sS(0,eS),St(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Lc(e.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(e){return new(e||n)(y(ao),y(Ne),y(ii),y(J5),y(aS,8),y($a,10),y(Hi,8),y(ms),y(Xe))},n.\u0275dir=X({type:n,hostVars:3,hostBindings:function(e,i){1&e&&z("click",function(o){return i._handleClick(o)})("mousedown",function(o){return i._handleMousedown(o)})("keydown",function(o){return i._handleKeydown(o)}),2&e&&vt("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}}),n})(),du=(()=>{class n extends Cde{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[ye]}),n})(),kde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[wde],imports:[Br,Nl,Ft,au,Vc,Ft]}),n})();const Ede=["determinateSpinner"];function Tde(n,t){if(1&n&&(xc(),_(0,"svg",11),_e(1,"circle",12),v()),2&n){const e=O();vt("viewBox",e._viewBox()),w(1),Ai("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),vt("r",e._circleRadius())}}const Sde=Pl(class{constructor(n){this._elementRef=n}},"primary"),Dde=new ae("mat-progress-spinner-default-options",{providedIn:"root",factory:function Ade(){return{diameter:tV}}}),tV=100;let Bl=(()=>{class n extends Sde{constructor(e,i,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=tV,this._noopAnimations="NoopAnimations"===i&&!!r&&!r._forceAnimations,r&&(r.color&&(this.color=this.defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,gr(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=gr(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=gr(e)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const e=2*this._circleRadius()+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Jn,8),y(Dde))},n.\u0275cmp=Ve({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,i){if(1&e&&pt(Ede,5),2&e){let r;Ae(r=Ie())&&(i._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(e,i){2&e&&(vt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===i.mode?i.value:null)("mode",i.mode),Ai("width",i.diameter,"px")("height",i.diameter,"px"),ot("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===i.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[ye],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(e,i){if(1&e&&(A(0,Tde,2,8,"ng-template",null,0,Xd),_(2,"div",1,2),xc(),_(4,"svg",3),_e(5,"circle",4),v()(),Eh(),_(6,"div",5)(7,"div",6)(8,"div",7),ds(9,8),v(),_(10,"div",9),ds(11,8),v(),_(12,"div",10),ds(13,8),v()()()),2&e){const r=Pt(1);w(4),vt("viewBox",i._viewBox()),w(1),Ai("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),vt("r",i._circleRadius()),w(4),E("ngTemplateOutlet",r),w(2),E("ngTemplateOutlet",r),w(2),E("ngTemplateOutlet",r)}},dependencies:[pv],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, transparent)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),Mde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft]}),n})();const Rde=["*"],Lde=new ae("MAT_CARD_CONFIG");let cS=(()=>{class n{constructor(e){this.appearance=e?.appearance||"raised"}}return n.\u0275fac=function(e){return new(e||n)(y(Lde,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-mdc-card-outlined","outlined"===i.appearance)("mdc-card--outlined","outlined"===i.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rde,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),dt(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mat-mdc-card{position:relative;border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px));background-color:var(--mdc-elevated-card-container-color, transparent);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color, transparent)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width, 1px);border-style:solid;border-color:var(--mdc-outlined-card-outline-color, transparent)}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0}),n})(),Yde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Br,Ft]}),n})();const Jde=[[["caption"]],[["colgroup"],["col"]]],eue=["caption","colgroup, col"];function lS(n){return class extends n{get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=Qe(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}}}const If=new ae("CDK_TABLE");let Mf=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","cdkCellDef",""]]}),n})(),Rf=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","cdkHeaderCellDef",""]]}),n})(),vy=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","cdkFooterCellDef",""]]}),n})();class rue{}const oue=lS(rue);let Uc=(()=>{class n extends oue{get name(){return this._name}set name(e){this._setNameInput(e)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){const i=this._stickyEnd;this._stickyEnd=Qe(e),this._hasStickyChanged=i!==this._stickyEnd}constructor(e){super(),this._table=e,this._stickyEnd=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return n.\u0275fac=function(e){return new(e||n)(y(If,8))},n.\u0275dir=X({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(e,i,r){if(1&e&&(qt(r,Mf,5),qt(r,Rf,5),qt(r,vy,5)),2&e){let o;Ae(o=Ie())&&(i.cell=o.first),Ae(o=Ie())&&(i.headerCell=o.first),Ae(o=Ie())&&(i.footerCell=o.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[tt([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ye]}),n})();class dS{constructor(t,e){e.nativeElement.classList.add(...t._columnCssClassName)}}let uS=(()=>{class n extends dS{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(y(Uc),y(Ne))},n.\u0275dir=X({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[ye]}),n})(),hS=(()=>{class n extends dS{constructor(e,i){if(super(e,i),1===e._table?._elementRef.nativeElement.nodeType){const r=e._table._elementRef.nativeElement.getAttribute("role");i.nativeElement.setAttribute("role","grid"===r||"treegrid"===r?"gridcell":"cell")}}}return n.\u0275fac=function(e){return new(e||n)(y(Uc),y(Ne))},n.\u0275dir=X({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[ye]}),n})();class iV{constructor(){this.tasks=[],this.endTasks=[]}}const fS=new ae("_COALESCED_STYLE_SCHEDULER");let rV=(()=>{class n{constructor(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new Me}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new iV,this._getScheduleObservable().pipe(St(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const e=this._currentSchedule;this._currentSchedule=new iV;for(const i of e.tasks)i();for(const i of e.endTasks)i()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Pi(Promise.resolve(void 0)):this._ngZone.onStable.pipe(An(1))}}return n.\u0275fac=function(e){return new(e||n)(Q(Xe))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),mS=(()=>{class n{constructor(e,i){this.template=e,this._differs=i}ngOnChanges(e){if(!this._columnsDiffer){const i=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(i).create(),this._columnsDiffer.diff(i)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Eg?e.headerCell.template:this instanceof Tg?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc))},n.\u0275dir=X({type:n,features:[jn]}),n})();class sue extends mS{}const aue=lS(sue);let Eg=(()=>{class n extends aue{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc),y(If,8))},n.\u0275dir=X({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[ye,jn]}),n})();class cue extends mS{}const lue=lS(cue);let Tg=(()=>{class n extends lue{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc),y(If,8))},n.\u0275dir=X({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[ye,jn]}),n})(),yy=(()=>{class n extends mS{constructor(e,i,r){super(e,i),this._table=r}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc),y(If,8))},n.\u0275dir=X({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[ye]}),n})(),Hc=(()=>{class n{constructor(e){this._viewContainer=e,n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}}return n.mostRecentCellOutlet=null,n.\u0275fac=function(e){return new(e||n)(y(ii))},n.\u0275dir=X({type:n,selectors:[["","cdkCellOutlet",""]]}),n})(),pS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Ve({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),_S=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Ve({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),xy=(()=>{class n{constructor(e){this.templateRef=e,this._contentClassName="cdk-no-data-row"}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["ng-template","cdkNoDataRow",""]]}),n})();const oV=["top","bottom","left","right"];class due{constructor(t,e,i,r,o=!0,s=!0,a){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=o,this._needsPositionStickyOnElement=s,this._positionListener=a,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(t,e){const i=[];for(const r of t)if(r.nodeType===r.ELEMENT_NODE){i.push(r);for(let o=0;o{for(const r of i)this._removeStickyStyle(r,e)})}updateStickyColumns(t,e,i,r=!0){if(!t.length||!this._isBrowser||!e.some(h=>h)&&!i.some(h=>h))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const o=t[0],s=o.children.length,a=this._getCellWidths(o,r),c=this._getStickyStartColumnPositions(a,e),l=this._getStickyEndColumnPositions(a,i),d=e.lastIndexOf(!0),u=i.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const h="rtl"===this.direction,f=h?"right":"left",m=h?"left":"right";for(const g of t)for(let p=0;pe[p]?g:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===u?[]:a.slice(u).map((g,p)=>i[p+u]?g:null).reverse()}))})}stickRows(t,e,i){if(!this._isBrowser)return;const r="bottom"===i?t.slice().reverse():t,o="bottom"===i?e.slice().reverse():e,s=[],a=[],c=[];for(let d=0,u=0;d{for(let d=0;d{e.some(r=>!r)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0,!1)})}_removeStickyStyle(t,e){for(const r of e)t.style[r]="",t.classList.remove(this._borderCellCss[r]);oV.some(r=>-1===e.indexOf(r)&&t.style[r])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,i,r){t.classList.add(this._stickCellCss),r&&t.classList.add(this._borderCellCss[e]),t.style[e]=`${i}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const r of oV)t.style[r]&&(i+=e[r]);return i?`${i}`:""}_getCellWidths(t,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const i=[],r=t.children;for(let o=0;o0;o--)e[o]&&(i[o]=r,r+=t[o]);return i}}const bS=new ae("CDK_SPL");let wy=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","rowOutlet",""]]}),n})(),Cy=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","headerRowOutlet",""]]}),n})(),ky=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","footerRowOutlet",""]]}),n})(),Ey=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","noDataRowOutlet",""]]}),n})(),Ty=(()=>{class n{get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=Qe(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=Qe(e),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(e,i,r,o,s,a,c,l,d,u,h,f){this._differs=e,this._changeDetectorRef=i,this._elementRef=r,this._dir=s,this._platform=c,this._viewRepeater=l,this._coalescedStyleScheduler=d,this._viewportRuler=u,this._stickyPositioningListener=h,this._ngZone=f,this._onDestroy=new Me,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new De,this.viewChange=new Ti({start:0,end:Number.MAX_VALUE}),o||this._elementRef.nativeElement.setAttribute("role","table"),this._document=a,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((e,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i),this._viewportRuler.change().pipe(St(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const i=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||i,this._forceRecalculateCellWidths=i,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){[this._rowOutlet.viewContainer,this._headerRowOutlet.viewContainer,this._footerRowOutlet.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),xT(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const e=this._dataDiffer.diff(this._renderRows);if(!e)return this._updateNoDataRow(),void this.contentChanged.next();const i=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,i,(r,o,s)=>this._getEmbeddedViewArgs(r.item,s),r=>r.item.data,r=>{1===r.operation&&r.context&&this._renderCellTemplateForItem(r.record.item.rowDef,r.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(r=>{i.get(r.currentIndex).context.$implicit=r.item.data}),this._updateNoDataRow(),this._ngZone&&Xe.isInAngularZone()?this._ngZone.onStable.pipe(An(1),St(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){const e=this._getRenderedRows(this._headerRowOutlet),r=this._elementRef.nativeElement.querySelector("thead");r&&(r.style.display=e.length?"":"none");const o=this._headerRowDefs.map(s=>s.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,o,"top"),this._headerRowDefs.forEach(s=>s.resetStickyChanged())}updateStickyFooterRowStyles(){const e=this._getRenderedRows(this._footerRowOutlet),r=this._elementRef.nativeElement.querySelector("tfoot");r&&(r.style.display=e.length?"":"none");const o=this._footerRowDefs.map(s=>s.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,o,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,o),this._footerRowDefs.forEach(s=>s.resetStickyChanged())}updateStickyColumnStyles(){const e=this._getRenderedRows(this._headerRowOutlet),i=this._getRenderedRows(this._rowOutlet),r=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...i,...r],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((o,s)=>{this._addStickyColumnStyles([o],this._headerRowDefs[s])}),this._rowDefs.forEach(o=>{const s=[];for(let a=0;a{this._addStickyColumnStyles([o],this._footerRowDefs[s])}),Array.from(this._columnDefsByName.values()).forEach(o=>o.resetStickyChanged())}_getAllRenderRows(){const e=[],i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=0;r{const a=r&&r.has(s)?r.get(s):[];if(a.length){const c=a.shift();return c.dataIndex=i,c}return{data:e,rowDef:s,dataIndex:i}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Sy(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(i=>{this._columnDefsByName.has(i.name),this._columnDefsByName.set(i.name,i)})}_cacheRowDefs(){this._headerRowDefs=Sy(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Sy(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Sy(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const e=this._rowDefs.filter(i=>!i.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){const e=(s,a)=>s||!!a.getColumnsDiff(),i=this._rowDefs.reduce(e,!1);i&&this._forceRenderDataRows();const r=this._headerRowDefs.reduce(e,!1);r&&this._forceRenderHeaderRows();const o=this._footerRowDefs.reduce(e,!1);return o&&this._forceRenderFooterRows(),i||r||o}_switchDataSource(e){this._data=[],xT(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;xT(this.dataSource)?e=this.dataSource.connect(this):function Zde(n){return!!n&&(n instanceof Dn||sn(n.lift)&&sn(n.subscribe))}(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=nt(this.dataSource)),this._renderChangeSubscription=e.pipe(St(this._onDestroy)).subscribe(i=>{this._data=i||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,i)=>this._renderRow(this._headerRowOutlet,e,i)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,i)=>this._renderRow(this._footerRowOutlet,e,i)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,i){const r=Array.from(i.columns||[]).map(a=>this._columnDefsByName.get(a)),o=r.map(a=>a.sticky),s=r.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,o,s,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){const i=[];for(let r=0;r!o.when||o.when(i,e));else{let o=this._rowDefs.find(s=>s.when&&s.when(i,e))||this._defaultRowDef;o&&r.push(o)}return r}_getEmbeddedViewArgs(e,i){return{templateRef:e.rowDef.template,context:{$implicit:e.data},index:i}}_renderRow(e,i,r,o={}){const s=e.viewContainer.createEmbeddedView(i.template,o,r);return this._renderCellTemplateForItem(i,o),s}_renderCellTemplateForItem(e,i){for(let r of this._getCellTemplates(e))Hc.mostRecentCellOutlet&&Hc.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,i);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const e=this._rowOutlet.viewContainer;for(let i=0,r=e.length;i{const r=this._columnDefsByName.get(i);return e.extractCellTemplate(r)}):[]}_applyNativeTableSections(){const e=this._document.createDocumentFragment(),i=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const r of i){const o=this._document.createElement(r.tag);o.setAttribute("role","rowgroup");for(const s of r.outlets)o.appendChild(s.elementRef.nativeElement);e.appendChild(o)}this._elementRef.nativeElement.appendChild(e)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const e=(i,r)=>i||r.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new due(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:nt()).pipe(St(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(i=>!i._table||i._table===this)}_updateNoDataRow(){const e=this._customNoDataRow||this._noDataRow;if(!e)return;const i=0===this._rowOutlet.viewContainer.length;if(i===this._isShowingNoDataRow)return;const r=this._noDataRowOutlet.viewContainer;if(i){const o=r.createEmbeddedView(e.templateRef),s=o.rootNodes[0];1===o.rootNodes.length&&s?.nodeType===this._document.ELEMENT_NODE&&(s.setAttribute("role","row"),s.classList.add(e._contentClassName))}else r.clear();this._isShowingNoDataRow=i}}return n.\u0275fac=function(e){return new(e||n)(y(Dc),y(an),y(Ne),Ms("role"),y(Hi,8),y(gt),y(Hn),y(og),y(fS),y(_a),y(bS,12),y(Xe,8))},n.\u0275cmp=Ve({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(e,i,r){if(1&e&&(qt(r,xy,5),qt(r,Uc,5),qt(r,yy,5),qt(r,Eg,5),qt(r,Tg,5)),2&e){let o;Ae(o=Ie())&&(i._noDataRow=o.first),Ae(o=Ie())&&(i._contentColumnDefs=o),Ae(o=Ie())&&(i._contentRowDefs=o),Ae(o=Ie())&&(i._contentHeaderRowDefs=o),Ae(o=Ie())&&(i._contentFooterRowDefs=o)}},viewQuery:function(e,i){if(1&e&&(pt(wy,7),pt(Cy,7),pt(ky,7),pt(Ey,7)),2&e){let r;Ae(r=Ie())&&(i._rowOutlet=r.first),Ae(r=Ie())&&(i._headerRowOutlet=r.first),Ae(r=Ie())&&(i._footerRowOutlet=r.first),Ae(r=Ie())&&(i._noDataRowOutlet=r.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(e,i){2&e&&ot("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[tt([{provide:If,useExisting:n},{provide:og,useClass:kB},{provide:fS,useClass:rV},{provide:bS,useValue:null}])],ngContentSelectors:eue,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,i){1&e&&(Rn(Jde),dt(0),dt(1,1),ds(2,0)(3,1)(4,2)(5,3))},dependencies:[wy,Cy,ky,Ey],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2}),n})();function Sy(n,t){return n.concat(Array.from(t))}let hue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[nS]}),n})();const fue=[[["caption"]],[["colgroup"],["col"]]],mue=["caption","colgroup, col"];let Vl=(()=>{class n extends Ty{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}ngOnInit(){super.ngOnInit(),this._isNativeHtmlTable&&this._elementRef.nativeElement.querySelector("tbody").classList.add("mdc-data-table__content")}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mdc-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[tt([{provide:Ty,useExisting:n},{provide:If,useExisting:n},{provide:fS,useClass:rV},{provide:og,useClass:kB},{provide:bS,useValue:null}]),ye],ngContentSelectors:mue,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,i){1&e&&(Rn(fue),dt(0),dt(1,1),ds(2,0)(3,1)(4,2)(5,3))},dependencies:[wy,Cy,ky,Ey],styles:[".mdc-data-table{border-radius:var(--mdc-shape-medium, 4px);border-width:1px;border-style:solid}.mdc-data-table .mdc-data-table__header-cell:first-child{border-top-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:first-child,.mdc-data-table .mdc-data-table__header-cell:first-child[dir=rtl]{border-top-right-radius:var(--mdc-shape-medium, 4px);border-top-left-radius:0}.mdc-data-table .mdc-data-table__header-cell:last-child{border-top-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:last-child,.mdc-data-table .mdc-data-table__header-cell:last-child[dir=rtl]{border-top-left-radius:var(--mdc-shape-medium, 4px);border-top-right-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child{border-bottom-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child[dir=rtl]{border-bottom-right-radius:var(--mdc-shape-medium, 4px);border-bottom-left-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child{border-bottom-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child[dir=rtl]{border-bottom-left-radius:var(--mdc-shape-medium, 4px);border-bottom-right-radius:0}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-width:1px;border-bottom-style:solid}.mdc-data-table__pagination{border-top-width:1px;border-top-style:solid}.mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:none}.mdc-data-table__row{height:52px}.mdc-data-table__pagination{min-height:52px}.mdc-data-table__header-row{height:56px}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table--sticky-header .mdc-data-table__header-cell{position:sticky;top:0;z-index:1}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__pagination{box-sizing:border-box;display:flex;justify-content:flex-end}.mdc-data-table__pagination-trailing{margin-left:4px;margin-right:0;align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end}[dir=rtl] .mdc-data-table__pagination-trailing,.mdc-data-table__pagination-trailing[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__pagination-navigation{align-items:center;display:flex}.mdc-data-table__pagination-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__pagination-button .mdc-button__icon,.mdc-data-table__pagination-button .mdc-button__icon[dir=rtl]{transform:rotate(180deg)}[dir=rtl] .mdc-data-table__pagination-button,.mdc-data-table__pagination-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__pagination-total{margin-left:14px;margin-right:36px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-total,.mdc-data-table__pagination-total[dir=rtl]{margin-left:36px;margin-right:14px}.mdc-data-table__pagination-rows-per-page{margin-left:0;margin-right:22px;align-items:center;display:inline-flex}[dir=rtl] .mdc-data-table__pagination-rows-per-page,.mdc-data-table__pagination-rows-per-page[dir=rtl]{margin-left:22px;margin-right:0}.mdc-data-table__pagination-rows-per-page-label{margin-left:0;margin-right:12px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__pagination-rows-per-page-label[dir=rtl]{margin-left:12px;margin-right:0}.mdc-data-table__pagination-rows-per-page-select{min-width:var(--mdc-menu-min-width, 80px);margin:8px 0}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{width:100%;min-width:80px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{height:36px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__dropdown-icon{width:20px;height:20px}.mdc-data-table__pagination-rows-per-page-select.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 56px)}.mdc-data-table__pagination-rows-per-page-select .mdc-list-item.mdc-list-item--with-one-line{height:36px}.mdc-data-table__progress-indicator{display:none;position:absolute;width:100%}.mdc-data-table--in-progress .mdc-data-table__progress-indicator{display:block}.mdc-data-table__scrim{background-color:var(--mdc-theme-surface, #fff);height:100%;opacity:.32;position:absolute;top:0;width:100%}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table-sticky{position:sticky !important}.mat-mdc-table{table-layout:auto;white-space:normal}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table .mat-mdc-row:hover,.mat-mdc-table .mat-mdc-footer-row:hover{background-color:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2}),n})(),zc=(()=>{class n extends Mf{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matCellDef",""]],features:[tt([{provide:Mf,useExisting:n}]),ye]}),n})(),jc=(()=>{class n extends Rf{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matHeaderCellDef",""]],features:[tt([{provide:Rf,useExisting:n}]),ye]}),n})(),$c=(()=>{class n extends Uc{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[tt([{provide:Uc,useExisting:n},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ye]}),n})(),Gc=(()=>{class n extends uS{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[ye]}),n})(),Wc=(()=>{class n extends hS{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[ye]}),n})(),Ul=(()=>{class n extends Eg{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[tt([{provide:Eg,useExisting:n}]),ye]}),n})(),Hl=(()=>{class n extends yy{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[tt([{provide:yy,useExisting:n}]),ye]}),n})(),zl=(()=>{class n extends pS{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[tt([{provide:pS,useExisting:n}]),ye],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),jl=(()=>{class n extends _S{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[tt([{provide:_S,useExisting:n}]),ye],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),kue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,hue,Ft]}),n})();class Tue extends yT{get data(){return this._data.value}set data(t){t=Array.isArray(t)?t:[],this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}constructor(t=[]){super(),this._renderData=new Ti([]),this._filter=new Ti(""),this._internalPageChanges=new Me,this._renderChangesSubscription=null,this.sortingDataAccessor=(e,i)=>{const r=e[i];if($B(r)){const o=Number(r);return o<9007199254740991?o:r}return r},this.sortData=(e,i)=>{const r=i.active,o=i.direction;return r&&""!=o?e.sort((s,a)=>{let c=this.sortingDataAccessor(s,r),l=this.sortingDataAccessor(a,r);const d=typeof c,u=typeof l;d!==u&&("number"===d&&(c+=""),"number"===u&&(l+=""));let h=0;return null!=c&&null!=l?c>l?h=1:c{const r=Object.keys(e).reduce((s,a)=>s+e[a]+"\u25ec","").toLowerCase(),o=i.trim().toLowerCase();return-1!=r.indexOf(o)},this._data=new Ti(t),this._updateChangeSubscription()}_updateChangeSubscription(){const t=this._sort?oi(this._sort.sortChange,this._sort.initialized):nt(null),e=this._paginator?oi(this._paginator.page,this._internalPageChanges,this._paginator.initialized):nt(null),r=Cl([this._data,this._filter]).pipe(ct(([a])=>this._filterData(a))),o=Cl([r,t]).pipe(ct(([a])=>this._orderData(a))),s=Cl([o,e]).pipe(ct(([a])=>this._pageData(a)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(a=>this._renderData.next(a))}_filterData(t){return this.filteredData=null==this.filter||""===this.filter?t:t.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;const e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){const i=Math.ceil(e.length/e.pageSize)-1||0,r=Math.min(e.pageIndex,i);r!==e.pageIndex&&(e.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}class uu extends Tue{}let aV=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(y(Cc),y(Ne))},n.\u0275dir=X({type:n}),n})(),hu=(()=>{class n extends aV{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,features:[ye]}),n})();const Hr=new ae("NgValueAccessor"),Due={provide:Hr,useExisting:hn(()=>Us),multi:!0},Iue=new ae("CompositionEventMode");let Us=(()=>{class n extends aV{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Aue(){const n=Ac()?Ac().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Cc),y(Ne),y(Iue,8))},n.\u0275dir=X({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&z("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[tt([Due]),ye]}),n})();const Mue=!1;function $l(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function lV(n){return null!=n&&"number"==typeof n.length}const Sr=new ae("NgValidators"),Gl=new ae("NgAsyncValidators"),Rue=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[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])?)*$/;class Ff{static min(t){return function dV(n){return t=>{if($l(t.value)||$l(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if($l(t.value)||$l(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return hV(t)}static requiredTrue(t){return function fV(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function mV(n){return $l(n.value)||Rue.test(n.value)?null:{email:!0}}(t)}static minLength(t){return pV(t)}static maxLength(t){return function gV(n){return t=>lV(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return _V(t)}static nullValidator(t){return null}static compose(t){return CV(t)}static composeAsync(t){return kV(t)}}function hV(n){return $l(n.value)?{required:!0}:null}function pV(n){return t=>$l(t.value)||!lV(t.value)?null:t.value.length{if($l(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Dy(n){return null}function bV(n){return null!=n}function vV(n){const t=Ep(n)?Pi(n):n;if(Mue&&!Tk(t)){let e="Expected async validator to return Promise or Observable.";throw"object"==typeof n&&(e+=" Are you using a synchronous validator where an async validator is expected?"),new pe(-1101,e)}return t}function yV(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function xV(n,t){return t.map(e=>e(n))}function wV(n){return n.map(t=>function Fue(n){return!n.validate}(t)?t:e=>t.validate(e))}function CV(n){if(!n)return null;const t=n.filter(bV);return 0==t.length?null:function(e){return yV(xV(e,t))}}function vS(n){return null!=n?CV(wV(n)):null}function kV(n){if(!n)return null;const t=n.filter(bV);return 0==t.length?null:function(e){return G5(xV(e,t).map(vV)).pipe(ct(yV))}}function yS(n){return null!=n?kV(wV(n)):null}function EV(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function TV(n){return n._rawValidators}function SV(n){return n._rawAsyncValidators}function xS(n){return n?Array.isArray(n)?n:[n]:[]}function Ay(n,t){return Array.isArray(n)?n.includes(t):n===t}function DV(n,t){const e=xS(t);return xS(n).forEach(r=>{Ay(e,r)||e.push(r)}),e}function AV(n,t){return xS(t).filter(e=>!Ay(n,e))}class IV{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=vS(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=yS(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Po extends IV{get formDirective(){return null}get path(){return null}}class Ga extends IV{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class MV{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let qo=(()=>{class n extends MV{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Ga,2))},n.\u0275dir=X({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&ot("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[ye]}),n})(),Sg=(()=>{class n extends MV{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Po,10))},n.\u0275dir=X({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&ot("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[ye]}),n})();function RV(n,t){return n?`with name: '${t}'`:`at index: ${t}`}const kS=!1,Dg="VALID",My="INVALID",Pf="PENDING",Ag="DISABLED";function ES(n){return(Ry(n)?n.validators:n)||null}function TS(n,t){return(Ry(t)?t.asyncValidators:n)||null}function Ry(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function FV(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new pe(1e3,kS?function Lue(n){return`\n There are no form controls registered with this ${n?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(t):"");if(!i[e])throw new pe(1001,kS?function Bue(n,t){return`Cannot find form control ${RV(n,t)}`}(t,e):"")}function PV(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new pe(1002,kS?function Vue(n,t){return`Must supply a value for form control ${RV(n,t)}`}(t,r):"")})}class Fy{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Dg}get invalid(){return this.status===My}get pending(){return this.status==Pf}get disabled(){return this.status===Ag}get enabled(){return this.status!==Ag}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(DV(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(DV(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(AV(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(AV(t,this._rawAsyncValidators))}hasValidator(t){return Ay(this._rawValidators,t)}hasAsyncValidator(t){return Ay(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Pf,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Ag,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Dg,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Dg||this.status===Pf)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ag:Dg}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Pf,this._hasOwnPendingAsyncValidator=!0;const e=vV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new De,this.statusChanges=new De}_calculateStatus(){return this._allControlsDisabled()?Ag:this.errors?My:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Pf)?Pf:this._anyControlsHaveStatus(My)?My:Dg}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Ry(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function Uue(n){return Array.isArray(n)?vS(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Hue(n){return Array.isArray(n)?yS(n):n||null}(this._rawAsyncValidators)}}class Of extends Fy{constructor(t,e,i){super(ES(e),TS(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){PV(this,!0,t),Object.keys(t).forEach(i=>{FV(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class OV extends Of{}const fu=new ae("CallSetDisabledState",{providedIn:"root",factory:()=>Ig}),Ig="always";function Py(n,t){return[...t.path,n]}function Mg(n,t,e=Ig){SS(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function jue(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&NV(n,t)})}(n,t),function Gue(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function $ue(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&NV(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function zue(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Oy(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Ly(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Ny(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function SS(n,t){const e=TV(n);null!==t.validator?n.setValidators(EV(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=SV(n);null!==t.asyncValidator?n.setAsyncValidators(EV(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Ny(t._rawValidators,r),Ny(t._rawAsyncValidators,r)}function Ly(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=TV(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=SV(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return Ny(t._rawValidators,i),Ny(t._rawAsyncValidators,i),e}function NV(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function LV(n,t){SS(n,t)}function AS(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function BV(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function IS(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===Us?e=o:function Que(n){return Object.getPrototypeOf(n.constructor)===hu}(o)?i=o:r=o}),r||i||e||null}const Xue={provide:Po,useExisting:hn(()=>mu)},Rg=(()=>Promise.resolve())();let mu=(()=>{class n extends Po{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new De,this.form=new Of({},vS(e),yS(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Rg.then(()=>{const i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),Mg(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Rg.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Rg.then(()=>{const i=this._findContainer(e.path),r=new Of({});LV(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Rg.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Rg.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,BV(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(y(Sr,10),y(Gl,10),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&z("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[tt([Xue]),ye]}),n})();function VV(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function UV(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Qo=class extends Fy{constructor(t=null,e,i){super(ES(e),TS(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ry(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=UV(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){VV(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){VV(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){UV(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Yue=Qo,ehe={provide:Ga,useExisting:hn(()=>ps)},jV=(()=>Promise.resolve())();let ps=(()=>{class n extends Ga{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Qo,this._registered=!1,this.update=new De,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=IS(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),AS(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Mg(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){jV.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&cf(i);jV.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Py(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(y(Po,9),y(Sr,10),y(Gl,10),y(Hr,10),y(an,8),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[tt([ehe]),ye,jn]}),n})(),Fg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})();const the={provide:Hr,useExisting:hn(()=>By),multi:!0};let By=(()=>{class n extends hu{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&z("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[tt([the]),ye]}),n})(),$V=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const MS=new ae("NgModelWithFormControlWarning"),ohe={provide:Ga,useExisting:hn(()=>Vy)};let Vy=(()=>{class n extends Ga{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=s,this.update=new De,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=IS(0,r)}ngOnChanges(e){if(this._isControlChanged(e)){const i=e.form.previousValue;i&&Oy(i,this,!1),Mg(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}AS(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Oy(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(y(Sr,10),y(Gl,10),y(Hr,10),y(MS,8),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[tt([ohe]),ye,jn]}),n})();const she={provide:Po,useExisting:hn(()=>Wl)};let Wl=(()=>{class n extends Po{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new De,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ly(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Mg(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Oy(e.control||null,e,!1),function Kue(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,BV(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Oy(i||null,e),(n=>n instanceof Qo)(r)&&(Mg(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);LV(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function Wue(n,t){return Ly(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){SS(this.form,this),this._oldForm&&Ly(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(y(Sr,10),y(Gl,10),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&z("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[tt([she]),ye,jn]}),n})();const lhe={provide:Ga,useExisting:hn(()=>Pg)};let Pg=(()=>{class n extends Ga{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new De,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=IS(0,o)}ngOnChanges(e){this._added||this._setUpControl(),AS(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Py(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(y(Po,13),y(Sr,10),y(Gl,10),y(Hr,10),y(MS,8))},n.\u0275dir=X({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[tt([lhe]),ye,jn]}),n})();let pu=(()=>{class n{constructor(){this._validator=Dy}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Dy,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,features:[jn]}),n})();const bhe={provide:Sr,useExisting:hn(()=>Uy),multi:!0};let Uy=(()=>{class n extends pu{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=cf,this.createValidator=e=>hV}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&vt("required",i._enabled?"":null)},inputs:{required:"required"},features:[tt([bhe]),ye]}),n})();const xhe={provide:Sr,useExisting:hn(()=>NS),multi:!0};let NS=(()=>{class n extends pu{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>function XV(n){return"number"==typeof n?n:parseInt(n,10)}(e),this.createValidator=e=>pV(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&vt("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[tt([xhe]),ye]}),n})();const Che={provide:Sr,useExisting:hn(()=>zy),multi:!0};let zy=(()=>{class n extends pu{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>_V(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&vt("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[tt([Che]),ye]}),n})(),n8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[$V]}),n})();class i8 extends Fy{constructor(t,e,i){super(ES(e),TS(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){PV(this,!1,t),t.forEach((i,r)=>{FV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function r8(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let o8=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return r8(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Of(r,o)}record(e,i=null){const r=this._reduceControls(e);return new OV(r,i)}control(e,i,r){let o={};return this.useNonNullable?(r8(i)?o=i:(o.validators=i,o.asyncValidators=r),new Qo(e,{...o,nonNullable:!0})):new Qo(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new i8(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Qo||e instanceof Fy?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),LS=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:fu,useValue:e.callSetDisabledState??Ig}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[n8]}),n})(),khe=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:MS,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:fu,useValue:e.callSetDisabledState??Ig}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[n8]}),n})();const Ehe=["matFormFieldNotchedOutline",""],The=["*"],She=["textField"],Dhe=["iconPrefixContainer"],Ahe=["textPrefixContainer"];function Ihe(n,t){1&n&&_e(0,"span",19)}function Mhe(n,t){if(1&n){const e=Le();_(0,"label",17),z("cdkObserveContent",function(){return he(e),fe(O(2)._refreshOutlineNotchWidth())}),dt(1,1),A(2,Ihe,1,0,"span",18),v()}if(2&n){const e=O(2);E("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),vt("for",e._control.id)("aria-owns",e._control.id),w(2),E("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Rhe(n,t){1&n&&A(0,Mhe,3,6,"label",16),2&n&&E("ngIf",O()._hasFloatingLabel())}function Fhe(n,t){1&n&&_e(0,"div",20)}function Phe(n,t){}function Ohe(n,t){1&n&&A(0,Phe,0,0,"ng-template",22),2&n&&(O(2),E("ngTemplateOutlet",Pt(1)))}function Nhe(n,t){if(1&n&&(_(0,"div",21),A(1,Ohe,1,1,"ng-template",9),v()),2&n){const e=O();E("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),w(1),E("ngIf",!e._forceDisplayInfixLabel())}}function Lhe(n,t){1&n&&(_(0,"div",23,24),dt(2,2),v())}function Bhe(n,t){1&n&&(_(0,"div",25,26),dt(2,3),v())}function Vhe(n,t){}function Uhe(n,t){1&n&&A(0,Vhe,0,0,"ng-template",22),2&n&&(O(),E("ngTemplateOutlet",Pt(1)))}function Hhe(n,t){1&n&&(_(0,"div",27),dt(1,4),v())}function zhe(n,t){1&n&&(_(0,"div",28),dt(1,5),v())}function jhe(n,t){1&n&&_e(0,"div",29)}function $he(n,t){1&n&&(_(0,"div",30),dt(1,6),v()),2&n&&E("@transitionMessages",O()._subscriptAnimationState)}function Ghe(n,t){if(1&n&&(_(0,"mat-hint",34),k(1),v()),2&n){const e=O(2);E("id",e._hintLabelId),w(1),Ze(e.hintLabel)}}function Whe(n,t){if(1&n&&(_(0,"div",31),A(1,Ghe,2,2,"mat-hint",32),dt(2,7),_e(3,"div",33),dt(4,8),v()),2&n){const e=O();E("@transitionMessages",e._subscriptAnimationState),w(1),E("ngIf",e.hintLabel)}}const qhe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Qhe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let gs=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-label"]]}),n})(),Khe=0;const s8=new ae("MatError");let a8=(()=>{class n{constructor(e,i){this.id="mat-mdc-error-"+Khe++,e||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(e){return new(e||n)(Ms("aria-live"),y(Ne))},n.\u0275dir=X({type:n,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(e,i){2&e&&Ba("id",i.id)},inputs:{id:"id"},features:[tt([{provide:s8,useExisting:n}])]}),n})(),Xhe=0,gu=(()=>{class n{constructor(){this.align="start",this.id="mat-mdc-hint-"+Xhe++}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(e,i){2&e&&(Ba("id",i.id),vt("align",null),ot("mat-mdc-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"}}),n})();const Yhe=new ae("MatPrefix"),c8=new ae("MatSuffix");let l8=(()=>{class n{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[tt([{provide:c8,useExisting:n}])]}),n})(),d8=(()=>{class n{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Zhe(n){if(null!==n.offsetParent)return n.scrollWidth;const e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);const i=e.scrollWidth;return e.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return n.\u0275fac=function(e){return new(e||n)(y(Ne))},n.\u0275dir=X({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mdc-floating-label--float-above",i.floating)},inputs:{floating:"floating"}}),n})();const u8="mdc-line-ripple--active",jy="mdc-line-ripple--deactivating";let h8=(()=>{class n{constructor(e,i){this._elementRef=e,this._handleTransitionEnd=r=>{const o=this._elementRef.nativeElement.classList,s=o.contains(jy);"opacity"===r.propertyName&&s&&o.remove(u8,jy)},i.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(jy),e.add(u8)}deactivate(){this._elementRef.nativeElement.classList.add(jy)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Xe))},n.\u0275dir=X({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),n})(),f8=(()=>{class n{constructor(e,i){this._elementRef=e,this._ngZone=i,this.labelWidth=0,this.open=!1}ngAfterViewInit(){const e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Xe))},n.\u0275cmp=Ve({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mdc-notched-outline--notched",i.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:Ehe,ngContentSelectors:The,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(e,i){1&e&&(Rn(),_e(0,"div",0),_(1,"div",1),dt(2),v(),_e(3,"div",2)),2&e&&(w(1),Ai("width",i._getNotchWidth()))},encapsulation:2,changeDetection:0}),n})();const Jhe={transitionMessages:$n("transitionMessages",[pn("enter",ze({opacity:1,transform:"translateY(0%)"})),Qt("void => enter",[ze({opacity:0,transform:"translateY(-5px)"}),Gt("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let $y=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n}),n})();const Gy=new ae("MatFormField"),efe=new ae("MAT_FORM_FIELD_DEFAULT_OPTIONS");let m8=0,ba=(()=>{class n{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Qe(e)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(e){const i=this._appearance;this._appearance=e||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}constructor(e,i,r,o,s,a,c,l){this._elementRef=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=o,this._platform=s,this._defaults=a,this._animationMode=c,this._document=l,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+m8++,this._hintLabelId="mat-mdc-hint-"+m8++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Me,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,a&&(a.appearance&&(this.appearance=a.appearance),this._hideRequiredMarker=Boolean(a?.hideRequiredMarker),a.color&&(this.color=a.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${e.controlType}`),e.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(St(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),oi(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(St(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(St(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(e){const i=this._control?this._control.ngControl:null;return i&&i[e]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(o=>"start"===o.align):null,r=this._hintChildren?this._hintChildren.find(o=>"end"===o.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const e=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(e.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,o=i?.getBoundingClientRect().width??0,s=r?.getBoundingClientRect().width??0;e.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${o+s}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const e=this._elementRef.nativeElement;if(e.getRootNode){const i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(Xe),y(Hi),y(Hn),y(efe,8),y(Jn,8),y(gt))},n.\u0275cmp=Ve({type:n,selectors:[["mat-form-field"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,gs,5),qt(r,gs,7),qt(r,$y,5),qt(r,Yhe,5),qt(r,c8,5),qt(r,s8,5),qt(r,gu,5)),2&e){let o;Ae(o=Ie())&&(i._labelChildNonStatic=o.first),Ae(o=Ie())&&(i._labelChildStatic=o.first),Ae(o=Ie())&&(i._formFieldControl=o.first),Ae(o=Ie())&&(i._prefixChildren=o),Ae(o=Ie())&&(i._suffixChildren=o),Ae(o=Ie())&&(i._errorChildren=o),Ae(o=Ie())&&(i._hintChildren=o)}},viewQuery:function(e,i){if(1&e&&(pt(She,5),pt(Dhe,5),pt(Ahe,5),pt(d8,5),pt(f8,5),pt(h8,5)),2&e){let r;Ae(r=Ie())&&(i._textField=r.first),Ae(r=Ie())&&(i._iconPrefixContainer=r.first),Ae(r=Ie())&&(i._textPrefixContainer=r.first),Ae(r=Ie())&&(i._floatingLabel=r.first),Ae(r=Ie())&&(i._notchedOutline=r.first),Ae(r=Ie())&&(i._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,i){2&e&&ot("mat-mdc-form-field-label-always-float",i._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",i._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",i._hasIconSuffix)("mat-form-field-invalid",i._control.errorState)("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===i._animationMode)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-hide-placeholder",i._hasFloatingLabel()&&!i._shouldLabelFloat())("mat-focused",i._control.focused)("mat-primary","accent"!==i.color&&"warn"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("ng-untouched",i._shouldForward("untouched"))("ng-touched",i._shouldForward("touched"))("ng-pristine",i._shouldForward("pristine"))("ng-dirty",i._shouldForward("dirty"))("ng-valid",i._shouldForward("valid"))("ng-invalid",i._shouldForward("invalid"))("ng-pending",i._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[tt([{provide:Gy,useExisting:n}])],ngContentSelectors:Qhe,decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(e,i){1&e&&(Rn(qhe),A(0,Rhe,1,1,"ng-template",null,0,Xd),_(2,"div",1,2),z("click",function(o){return i._control.onContainerClick&&i._control.onContainerClick(o)}),A(4,Fhe,1,0,"div",3),_(5,"div",4),A(6,Nhe,2,3,"div",5),A(7,Lhe,3,0,"div",6),A(8,Bhe,3,0,"div",7),_(9,"div",8),A(10,Uhe,1,1,"ng-template",9),dt(11),v(),A(12,Hhe,2,0,"div",10),A(13,zhe,2,0,"div",11),v(),A(14,jhe,1,0,"div",12),v(),_(15,"div",13),A(16,$he,2,1,"div",14),A(17,Whe,5,2,"div",15),v()),2&e&&(w(2),ot("mdc-text-field--filled",!i._hasOutline())("mdc-text-field--outlined",i._hasOutline())("mdc-text-field--no-label",!i._hasFloatingLabel())("mdc-text-field--disabled",i._control.disabled)("mdc-text-field--invalid",i._control.errorState),w(2),E("ngIf",!i._hasOutline()&&!i._control.disabled),w(2),E("ngIf",i._hasOutline()),w(1),E("ngIf",i._hasIconPrefix),w(1),E("ngIf",i._hasTextPrefix),w(2),E("ngIf",!i._hasOutline()||i._forceDisplayInfixLabel()),w(2),E("ngIf",i._hasTextSuffix),w(1),E("ngIf",i._hasIconSuffix),w(1),E("ngIf",!i._hasOutline()),w(1),ot("mat-mdc-form-field-subscript-dynamic-size","dynamic"===i.subscriptSizing),E("ngSwitch",i._getDisplayedMessages()),w(1),E("ngSwitchCase","error"),w(1),E("ngSwitchCase","hint"))},dependencies:[ri,pv,Vp,TE,BT,gu,d8,f8,h8],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[Jhe.transitionMessages]},changeDetection:0}),n})(),Wy=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Br,Jv,Ft]}),n})();const ife=["panel"];function rfe(n,t){if(1&n&&(_(0,"div",0,1),dt(2),v()),2&n){const e=t.id,i=O();E("id",i.id)("ngClass",i._classList)("@panelAnimation",i.isOpen?"visible":"hidden"),vt("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}const ofe=["*"],sfe=$n("panelAnimation",[pn("void, hidden",ze({opacity:0,transform:"scaleY(0.8)"})),Qt(":enter, hidden => visible",[XT([Gt("0.03s linear",ze({opacity:1})),Gt("0.12s cubic-bezier(0, 0, 0.2, 1)",ze({transform:"scaleY(1)"}))])]),Qt(":leave, visible => hidden",[Gt("0.075s linear",ze({opacity:0}))])]);let afe=0;class cfe{constructor(t,e){this.source=t,this.option=e}}const lfe=Ol(class{}),_8=new ae("mat-autocomplete-default-options",{providedIn:"root",factory:function dfe(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1}}});let ufe=(()=>{class n extends lfe{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._setThemeClasses(this._classList)}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=Qe(e)}get autoSelectActiveOption(){return this._autoSelectActiveOption}set autoSelectActiveOption(e){this._autoSelectActiveOption=Qe(e)}set classList(e){this._classList=e&&e.length?function zae(n,t=/\s+/){const e=[];if(null!=n){const i=Array.isArray(n)?n:`${n}`.split(t);for(const r of i){const o=`${r}`.trim();o&&e.push(o)}}return e}(e).reduce((i,r)=>(i[r]=!0,i),{}):{},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}constructor(e,i,r,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._defaults=r,this._activeOptionChanges=lt.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this._autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this._autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.optionSelected=new De,this.opened=new De,this.closed=new De,this.optionActivated=new De,this._classList={},this.id="mat-autocomplete-"+afe++,this.inertGroups=o?.SAFARI||!1}ngAfterContentInit(){this._keyManager=new JB(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){const i=new cfe(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){return this.ariaLabel?null:this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}_setThemeClasses(e){e["mat-primary"]="primary"===this._color,e["mat-warn"]="warn"===this._color,e["mat-accent"]="accent"===this._color}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(Ne),y(_8),y(Hn))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&(pt(Un,7),pt(ife,5)),2&e){let r;Ae(r=Ie())&&(i.template=r.first),Ae(r=Ie())&&(i.panel=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",autoSelectActiveOption:"autoSelectActiveOption",panelWidth:"panelWidth",classList:["class","classList"]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[ye]}),n})(),hfe=(()=>{class n extends ufe{constructor(){super(...arguments),this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=Qe(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,QT,5),qt(r,Ll,5)),2&e){let o;Ae(o=Ie())&&(i.optionGroups=o),Ae(o=Ie())&&(i.options=o)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{disableRipple:"disableRipple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matAutocomplete"],features:[tt([{provide:qT,useExisting:n}]),ye],ngContentSelectors:ofe,decls:1,vars:0,consts:[["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"],["panel",""]],template:function(e,i){1&e&&(Rn(),A(0,rfe,3,5,"ng-template"))},dependencies:[ha],styles:[".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mdc-menu-surface.mat-mdc-autocomplete-panel{width:100%;max-height:256px;position:static;visibility:hidden;transform-origin:center top;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-autocomplete-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) .mdc-menu-surface.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above .mdc-menu-surface.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[sfe]},changeDetection:0}),n})();const ffe={provide:Hr,useExisting:hn(()=>v8),multi:!0},b8=new ae("mat-autocomplete-scroll-strategy"),pfe={provide:b8,deps:[ao],useFactory:function mfe(n){return()=>n.scrollStrategies.reposition()}};let gfe=(()=>{class n{get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=Qe(e)}constructor(e,i,r,o,s,a,c,l,d,u,h){this._element=e,this._overlay=i,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=s,this._dir=c,this._formField=l,this._document=d,this._viewportRuler=u,this._defaults=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=lt.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Me,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=df(()=>{const f=this.autocomplete?this.autocomplete.options:null;return f?f.changes.pipe(er(f),Ji(()=>oi(...f.map(m=>m.onSelectionChange)))):this._zone.onStable.pipe(An(1),Ji(()=>this.optionSelections))}),this._scrollStrategy=a}ngAfterViewInit(){const e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return oi(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(mn(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(mn(()=>this._overlayAttached)):nt()).pipe(ct(e=>e instanceof _5?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return oi(ga(this._document,"click"),ga(this._document,"auxclick"),ga(this._document,"touchend")).pipe(mn(e=>{const i=fs(e),r=this._formField?this._formField._elementRef.nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&i!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(i))&&(!o||!o.contains(i))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(i)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){const i=e.keyCode,r=so(e);if(27===i&&!r&&e.preventDefault(),this.activeOption&&13===i&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){const o=this.autocomplete._keyManager.activeItem,s=38===i||40===i;9===i||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this.openPanel(),(s||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._element.nativeElement.value),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,r=i.value;"number"===i.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r&&(this._previousValue=r,this._pendingAutoselectedOption=null,this._onChange(r),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this.openPanel()}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return oi(this._zone.onStable.pipe(An(1)),this.autocomplete.options.changes.pipe(gi(()=>this._positionStrategy.reapplyLastPosition()),sS(0))).pipe(Ji(()=>(this._zone.run(()=>{const r=this.panelOpen;this._resetActiveItem(),this.autocomplete._setVisibility(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this.autocomplete.opened.emit():this.autocomplete.closed.emit())}),this.panelClosingActions)),An(1)).subscribe(r=>this._setValueAndClose(r))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_assignOptionValue(e){const i=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e;this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){const i=e?e.source:this._pendingAutoselectedOption;i&&(this._clearPreviousSelectedOption(i),this._assignOptionValue(i.value),this._onChange(i.value),this.autocomplete._emitSelectEvent(i),this._element.nativeElement.focus()),this.closePanel()}_clearPreviousSelectedOption(e){this.autocomplete.options.forEach(i=>{i!==e&&i.selected&&i.deselect()})}_attachOverlay(){let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new Lc(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,this._handleOverlayEvents(e),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})})),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new Df({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){const e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){const i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];let s;s="above"===this.position?o:"below"===this.position?i:[...i,...o],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const e=this.autocomplete;e.autoActiveFirstOption?e._keyManager.setFirstItemActive():e._keyManager.setActiveItem(-1)}_canOpen(){const e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(e){const i=this.autocomplete,r=b5(e,i.options,i.optionGroups);if(0===e&&1===r)i._setScrollTop(0);else if(i.panel){const o=i.options.toArray()[e];if(o){const s=o._getHostElement(),a=v5(s.offsetTop,s.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(a)}}}_handleOverlayEvents(e){e.keydownEvents().subscribe(i=>{(27===i.keyCode&&!so(i)||38===i.keyCode&&so(i,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),i.stopPropagation(),i.preventDefault())}),e.outsidePointerEvents().subscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ao),y(ii),y(Xe),y(an),y(b8),y(Hi,8),y(Gy,9),y(gt,8),y(_a),y(_8,8))},n.\u0275dir=X({type:n,inputs:{autocomplete:["matAutocomplete","autocomplete"],position:["matAutocompletePosition","position"],connectedTo:["matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"]},features:[jn]}),n})(),v8=(()=>{class n extends gfe{constructor(){super(...arguments),this._aboveClass="mat-mdc-autocomplete-panel-above"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(e,i){1&e&&z("focusin",function(){return i._handleFocus()})("blur",function(){return i._onTouched()})("input",function(o){return i._handleInput(o)})("keydown",function(o){return i._handleKeydown(o)})("click",function(){return i._handleClick()}),2&e&&vt("autocomplete",i.autocompleteAttribute)("role",i.autocompleteDisabled?null:"combobox")("aria-autocomplete",i.autocompleteDisabled?null:"list")("aria-activedescendant",i.panelOpen&&i.activeOption?i.activeOption.id:null)("aria-expanded",i.autocompleteDisabled?null:i.panelOpen.toString())("aria-owns",i.autocompleteDisabled||!i.panelOpen||null==i.autocomplete?null:i.autocomplete.id)("aria-haspopup",i.autocompleteDisabled?null:"listbox")},exportAs:["matAutocompleteTrigger"],features:[tt([ffe]),ye]}),n})(),_fe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[pfe],imports:[au,sy,Ft,Br,Vc,sy,Ft]}),n})();const y8=pa({passive:!0});let bfe=(()=>{class n{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return ns;const i=Mi(e),r=this._monitoredElements.get(i);if(r)return r.subject;const o=new Me,s="cdk-text-field-autofilled",a=c=>{"cdk-text-field-autofill-start"!==c.animationName||i.classList.contains(s)?"cdk-text-field-autofill-end"===c.animationName&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!1}))):(i.classList.add(s),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,y8),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",a,y8)}}),o}stopMonitoring(e){const i=Mi(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(Xe))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),vfe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const yfe=new ae("MAT_INPUT_VALUE_ACCESSOR"),xfe=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let wfe=0;const Cfe=l5(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new Me}});let ql=(()=>{class n extends Cfe{get disabled(){return this._disabled}set disabled(e){this._disabled=Qe(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(Ff.required)??!1}set required(e){this._required=Qe(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&HB().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Qe(e)}constructor(e,i,r,o,s,a,c,l,d,u){super(a,o,s,r),this._elementRef=e,this._platform=i,this._autofillMonitor=l,this._formField=u,this._uid="mat-input-"+wfe++,this.focused=!1,this.stateChanges=new Me,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(m=>HB().has(m)),this._iOSKeyupListener=m=>{const g=m.target;!g.value&&0===g.selectionStart&&0===g.selectionEnd&&(g.setSelectionRange(1,1),g.setSelectionRange(0,0))};const h=this._elementRef.nativeElement,f=h.nodeName.toLowerCase();this._inputValueAccessor=c||h,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&d.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===f,this._isTextarea="textarea"===f,this._isInFormField=!!u,this._isNativeSelect&&(this.controlType=h.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){const e=this._getPlaceholder();if(e!==this._previousPlaceholder){const i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){xfe.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Ga,10),y(mu,8),y(Wl,8),y(d5),y(yfe,10),y(bfe),y(Xe),y(Gy,8))},n.\u0275dir=X({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(e,i){1&e&&z("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&e&&(Ba("id",i.id)("disabled",i.disabled)("required",i.required),vt("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),ot("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[tt([{provide:$y,useExisting:n}]),ye,jn]}),n})(),kfe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Wy,Wy,vfe,Ft]}),n})();function Efe(n,t){if(1&n&&(_(0,"mat-label"),k(1),v()),2&n){const e=O();w(1),Ze(e.binding.title)}}function Tfe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){return he(e),fe(O().clearInput())}),_(1,"mat-icon"),k(2,"close"),v()()}}function Sfe(n,t){1&n&&(_(0,"mat-option",8),_e(1,"mat-spinner",9),v())}function Dfe(n,t){if(1&n&&(_(0,"mat-option",10)(1,"span",11),k(2),v(),k(3),v()),2&n){const e=t.$implicit;E("value",e),w(2),Ze(e.code),w(1),it("",e.display," ")}}let Og=(()=>{class n{static#e=this.nextId=0;constructor(e){this.terminologyService=e,this.term="",this.selectionChange=new De,this.formControl=new Yue,this.loading=!1,this.selectedConcept={},this.stateChanges=new Me,this.focused=!1,this.ngControl=null,this.errorState=!1,this.controlType="app-autocomplete-binding",this.id="app-autocomplete-binding-"+n.nextId++,this.describedBy="",this.onChange=()=>{},this.onTouched=()=>{}}get empty(){return!this.formControl.value}setDescribedByIds(e){this.describedBy=e.join(" ")}onContainerClick(e){}writeValue(e){this.formControl.setValue(e&&"object"==typeof e&&e.display?e.display:e,{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}ngOnChanges(e){e.term&&(this.term=e.term.currentValue,this.formControl.setValue(this.term&&"object"==typeof this.term&&this.term.display?this.term.display:this.term))}ngOnInit(){this.autoFilter=this.formControl.valueChanges.pipe(Pc(300),ja(),Ji(e=>e?.length>=3?(this.loading=!0,this.terminologyService.expandValueSet(this.binding.ecl,e,0,50)):nt([])),gi(e=>{this.loading=!1}))}onTermChange(){this.formControl.setValue(this.term)}optionSelected(e){this.selectedConcept=e,this.selectionChange.emit(e),this.onChange(e)}clearInput(){this.formControl.reset(),this.selectedConcept={code:"",display:""},this.selectionChange.emit(this.selectedConcept)}change(e){const i=e?.option?.value;i&&(this.optionSelected({code:i.code,display:i.display}),this.formControl.setValue(i.display))}static#t=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#n=this.\u0275cmp=Ve({type:n,selectors:[["app-autocomplete-binding"]],inputs:{binding:"binding",term:"term"},outputs:{selectionChange:"selectionChange"},features:[tt([{provide:Hr,useExisting:hn(()=>n),multi:!0},{provide:$y,useExisting:n}]),jn],decls:11,vars:10,consts:[[4,"ngIf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["auto","matAutocomplete"],["disabled","","class","loading",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["disabled","",1,"loading"],["diameter","35"],[3,"value"],[1,"code"]],template:function(i,r){if(1&i&&(_(0,"mat-form-field"),A(1,Efe,2,1,"mat-label",0),_e(2,"input",1),_(3,"mat-hint"),k(4),v(),A(5,Tfe,3,0,"button",2),_(6,"mat-autocomplete",3,4),z("optionSelected",function(s){return r.change(s)}),A(8,Sfe,2,0,"mat-option",5),A(9,Dfe,4,3,"mat-option",6),no(10,"async"),v()()),2&i){const o=Pt(7);let s;w(1),E("ngIf",r.binding.title),w(1),Xh("placeholder",(null==r.formControl.value?null:r.formControl.value.display)||r.binding.title||"Search..."),E("formControl",r.formControl)("matAutocomplete",o),w(2),Ze(r.binding.note),w(1),E("ngIf",r.formControl.value),w(3),E("ngIf",r.loading),w(1),E("ngForOf",null==(s=Va(10,8,r.autoFilter))||null==s.expansion?null:s.expansion.contains)}},dependencies:[io,ri,Vs,co,ba,gs,gu,l8,hfe,Ll,v8,Bl,ql,Us,qo,Vy,SE],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}.id-icon[_ngcontent-%COMP%]{margin-left:10px;color:#2e8b57}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();function Afe(n,t){1&n&&_e(0,"mat-spinner",20)}function Ife(n,t){1&n&&(_(0,"th",21),k(1," Date "),v())}function Mfe(n,t){if(1&n&&(_(0,"td",22),k(1),no(2,"date"),v()),2&n){const e=t.$implicit;w(1),it(" ",Kd(2,1,e.date,"yyyy-MM-dd")," ")}}function Rfe(n,t){1&n&&(_(0,"th",21),k(1," ConceptId "),v())}function Ffe(n,t){if(1&n&&(_(0,"td",22),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.code," ")}}function Pfe(n,t){1&n&&(_(0,"th",21),k(1," Term "),v())}function Ofe(n,t){1&n&&(_(0,"span",24),k(1,"Allergy / Intolerance condition"),v())}function Nfe(n,t){if(1&n&&(_(0,"td",22),A(1,Ofe,2,0,"span",23),k(2),v()),2&n){const e=t.$implicit;w(1),E("ngIf",e.allergy),w(1),it(" ",e.display," ")}}function Lfe(n,t){1&n&&_e(0,"tr",25)}function Bfe(n,t){1&n&&_e(0,"tr",26)}function Vfe(n,t){1&n&&(_(0,"th",21),k(1," ConceptId "),v())}function Ufe(n,t){if(1&n&&(_(0,"td",22),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.code," ")}}function Hfe(n,t){1&n&&(_(0,"th",21),k(1," Term "),v())}function zfe(n,t){if(1&n&&(_(0,"td",22),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.display," ")}}function jfe(n,t){1&n&&_e(0,"tr",25)}function $fe(n,t){1&n&&_e(0,"tr",26)}const Gfe=[],Wfe=[];let x8=(()=>{class n{constructor(e){this.terminologyService=e,this.problemBinding={ecl:"< 404684003 |Clinical finding|",title:"Search..."},this.eclProblem="< 404684003 |Clinical finding|",this.term="",this.displayedColumns=["date","code","display"],this.dataToDisplay=[...Gfe],this.dataSource=new qfe(this.dataToDisplay),this.loading=!1,this.displayedColumns2=["code","display"],this.dataToDisplay2=[...Wfe],this.dataSource2=new Qfe(this.dataToDisplay2)}updateProblem(e){var i=this;return xe(function*(){i.selectedProblemSct=e})()}addProblem(e){var i=this;return xe(function*(){if(i.selectedProblemSct||e){let r=e||i.selectedProblemSct;if(i.loading=!0,i.term=r.display,r.date=new Date,r.code.indexOf(":")>-1){r.allergy=!0;let o=r.substance;i.dataToDisplay2.find(s=>s.code===o.code)||(i.dataToDisplay2=[...i.dataToDisplay2,o],i.dataSource2.setData(i.dataToDisplay2))}else(yield i.getAllergyData(r))?.expansion?.contains?.length>0&&(r.allergy=!0,i.addAllergySubstanceToList(r));i.dataToDisplay.find(o=>o.code===r.code)||(i.dataToDisplay=[...i.dataToDisplay,r],i.dataSource.setData(i.dataToDisplay)),i.loading=!1,i.term=""}})()}addAllergySubstanceToList(e){var i=this;return xe(function*(){(yield i.getAllergySubstance(e))?.expansion?.contains?.forEach(o=>{i.dataToDisplay2.find(s=>s.code===o.code)||(i.dataToDisplay2=[...i.dataToDisplay2,o],i.dataSource2.setData(i.dataToDisplay2))})})()}getAllergyData(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet("<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",e.code,0,1)).pipe(ct(o=>o)))})()}getAllergySubstance(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`${e.code} |${e.display}| . (246075003 |Causative agent (attribute)| OR 47429007 |Associated with (attribute)|)`,"")).pipe(ct(o=>o)))})()}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies-problem-list"]],decls:60,vars:11,consts:[["id","main-card"],[1,"container-space"],[1,"problem-list"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",1,"long-tooltip",3,"disableRipple","click"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],[1,"container"],[1,"item"],[3,"binding","term","selectionChange"],["mat-flat-button","","color","primary",3,"click"],["diameter","35",4,"ngIf"],["mat-table","",3,"dataSource"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","code"],["matColumnDef","display"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35"],["mat-header-cell",""],["mat-cell",""],["class","tag pill",4,"ngIf"],[1,"tag","pill"],["mat-header-row",""],["mat-row",""]],template:function(i,r){if(1&i&&(_(0,"mat-card",0)(1,"div",1)(2,"div",2)(3,"h4"),k(4,"Problem List "),_(5,"button",3)(6,"mat-icon"),k(7,"info"),v()(),_(8,"mat-menu",null,4)(10,"span",5),z("click",function(s){return s.stopPropagation()}),_(11,"h4"),k(12,"Problem list"),v(),_(13,"p"),k(14,"Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),v(),_(15,"p"),k(16,"For practical guidance using SNOMED CT to document hypersensitivity to specific substances in a problem list, it is suggested to map to the appropriate concepts under the 473011001 |Allergic condition (finding)|hierarchies. This is due to the lack of sufficient content under 609433001 |Hypersensitivity disposition (finding)|and 421961002 |Hypersensitivity reaction (disorder)| and that many of the concepts under 609328004 |Allergic disposition (finding)|and 419076005 |Allergic reaction (disorder)| have unclear mechanisms which may actually represent non-allergic hypersensitivity. Please note that SNOMED international does not plan to create new children concepts of hypersensitivity disposition to specific substances unless more than one Member country would submit a request for them to answer to an active use-case."),v(),_(17,"p"),k(18,"Almost all allergy concepts are modeled by substances in SNOMED CT. A very small number of allergy concepts are modeled by products but with explicit description for the specific intended meaning. Records of allergy to multiple substances or to multi-ingredient products should be recoded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),v(),_(19,"p"),k(20,"Vaccine allergy is an example where allergy concepts are modeled using a product concept. For example, \u2018Allergy to component of vaccine product (finding)\u2019 with a synonym \u2018vaccine allergy\u2019 has been modeled by vaccine product. The concept represents that allergy is caused by any substance in a vaccine product."),v(),_(21,"p"),k(22,"To record the level of certainty or verification status, it is recommended to use additional data elements in the EHR information model. Even though it is possible to utilize the SNOMED CT model for \u2018situation with explicit context\u2019 to express certainty, this is not recommended due to potential ambiguity. For example, \u201csuspected penicillin allergy\u201d can mean uncertainty with the condition (is it real allergy?) or with the causative agent (is it penicillin?). Even though SNOMED CT editorial guideline is clear that the first interpretation is correct, it is better to use other methods to represent the uncertainty to avoid confusion."),v(),_(23,"p"),k(24,"For more information check the "),_(25,"a",6),k(26,"Implementation Guide"),v(),k(27," developed by the SNOMED International Allergy Clinical Reference Group."),v()()()(),_(28,"div",7)(29,"div",8)(30,"app-autocomplete-binding",9),z("selectionChange",function(s){return r.updateProblem(s)}),v()(),_(31,"div",8)(32,"button",10),z("click",function(){return r.addProblem()}),k(33,"Add problem"),v()(),_(34,"div",8),A(35,Afe,1,0,"mat-spinner",11),v()(),_(36,"table",12),zt(37,13),A(38,Ife,2,0,"th",14),A(39,Mfe,3,4,"td",15),jt(),zt(40,16),A(41,Rfe,2,0,"th",14),A(42,Ffe,2,1,"td",15),jt(),zt(43,17),A(44,Pfe,2,0,"th",14),A(45,Nfe,3,2,"td",15),jt(),A(46,Lfe,1,0,"tr",18),A(47,Bfe,1,0,"tr",19),v()(),_(48,"div",2)(49,"h4"),k(50,"Substances the patient is allergic to:"),v(),_(51,"table",12),zt(52,16),A(53,Vfe,2,0,"th",14),A(54,Ufe,2,1,"td",15),jt(),zt(55,17),A(56,Hfe,2,0,"th",14),A(57,zfe,2,1,"td",15),jt(),A(58,jfe,1,0,"tr",18),A(59,$fe,1,0,"tr",19),v()()()()),2&i){const o=Pt(9);w(5),E("matMenuTriggerFor",o),w(5),E("disableRipple",!0),w(20),E("binding",r.problemBinding)("term",r.term),w(5),E("ngIf",r.loading),w(1),E("dataSource",r.dataSource),w(10),E("matHeaderRowDef",r.displayedColumns),w(1),E("matRowDefColumns",r.displayedColumns),w(4),E("dataSource",r.dataSource2),w(7),E("matHeaderRowDef",r.displayedColumns2),w(1),E("matRowDefColumns",r.displayedColumns2)}},dependencies:[ri,Fo,Vs,co,lu,$a,du,Bl,cS,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,Og,Jd],styles:["#main-card[_ngcontent-%COMP%]{padding:10px}app-autocomplete-binding[_ngcontent-%COMP%]{display:block;min-width:500px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin:10px 0;gap:10px}.container-space[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin:10px 0;gap:10px}.problem-list[_ngcontent-%COMP%]{width:60%}.tag[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding-left:10px;padding-right:10px;margin-top:5px}td[_ngcontent-%COMP%]{position:relative}.pill[_ngcontent-%COMP%]{display:inline-block;font-size:10px;background-color:orange;color:#fff;padding:4px 8px;border-radius:20px;position:absolute;top:0;right:0;margin-top:1rem}.mat-column-display[_ngcontent-%COMP%]{min-width:350px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return n})();class qfe extends yT{constructor(t){super(),this._dataStream=new TB,this.setData(t)}connect(){return this._dataStream}disconnect(){}setData(t){this._dataStream.next(t)}}class Qfe extends yT{constructor(t){super(),this._dataStream=new TB,this.setData(t)}connect(){return this._dataStream}disconnect(){}setData(t){this._dataStream.next(t)}}function Kfe(n,t){}const Xfe=function(n){return{animationDuration:n}},Yfe=function(n,t){return{value:n,params:t}};function Zfe(n,t){1&n&&dt(0)}const w8=["*"],Jfe=["tabListContainer"],eme=["tabList"],tme=["tabListInner"],nme=["nextPaginator"],ime=["previousPaginator"],rme=["tabBodyWrapper"],ome=["tabHeader"];function sme(n,t){}function ame(n,t){1&n&&A(0,sme,0,0,"ng-template",14),2&n&&E("cdkPortalOutlet",O().$implicit.templateLabel)}function cme(n,t){1&n&&k(0),2&n&&Ze(O().$implicit.textLabel)}function lme(n,t){if(1&n){const e=Le();_(0,"div",6,7),z("click",function(){const r=he(e),o=r.$implicit,s=r.index,a=O(),c=Pt(1);return fe(a._handleClick(o,c,s))})("cdkFocusChange",function(r){const s=he(e).index;return fe(O()._tabFocusChanged(r,s))}),_e(2,"span",8)(3,"div",9),_(4,"span",10)(5,"span",11),A(6,ame,1,1,"ng-template",12),A(7,cme,1,1,"ng-template",null,13,Xd),v()()()}if(2&n){const e=t.$implicit,i=t.index,r=Pt(1),o=Pt(8),s=O();ot("mdc-tab--active",s.selectedIndex===i),E("id",s._getTabLabelId(i))("ngClass",e.labelClass)("disabled",e.disabled)("fitInkBarToContent",s.fitInkBarToContent),vt("tabIndex",s._getTabIndex(i))("aria-posinset",i+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(i))("aria-selected",s.selectedIndex===i)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),w(3),E("matRippleTrigger",r)("matRippleDisabled",e.disabled||s.disableRipple),w(3),E("ngIf",e.templateLabel)("ngIfElse",o)}}function dme(n,t){if(1&n){const e=Le();_(0,"mat-tab-body",15),z("_onCentered",function(){return he(e),fe(O()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return he(e),fe(O()._setTabBodyWrapperHeight(r))}),v()}if(2&n){const e=t.$implicit,i=t.index,r=O();ot("mat-mdc-tab-body-active",r.selectedIndex===i),E("id",r._getTabContentId(i))("ngClass",e.bodyClass)("content",e.content)("position",e.position)("origin",e.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),vt("tabindex",null!=r.contentTabIndex&&r.selectedIndex===i?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(i))}}const ume={translateTab:$n("translateTab",[pn("center, void, left-origin-center, right-origin-center",ze({transform:"none"})),pn("left",ze({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),pn("right",ze({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Qt("* => left, * => right, left => center, right => center",Gt("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Qt("void => left-origin-center",[ze({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Gt("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Qt("void => right-origin-center",[ze({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Gt("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let hme=(()=>{class n extends Bc{constructor(e,i,r,o){super(e,i,o),this._host=r,this._centeringSub=lt.EMPTY,this._leavingSub=lt.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(er(this._host._isCenterPosition(this._host._position))).subscribe(e=>{e&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(bl),y(ii),y(hn(()=>C8)),y(gt))},n.\u0275dir=X({type:n,selectors:[["","matTabBodyHost",""]],features:[ye]}),n})(),fme=(()=>{class n{set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(e,i,r){this._elementRef=e,this._dir=i,this._dirChangeSubscription=lt.EMPTY,this._translateTabComplete=new Me,this._onCentering=new De,this._beforeCentering=new De,this._afterLeavingCenter=new De,this._onCentered=new De(!0),this.animationDuration="500ms",this.preserveContent=!1,i&&(this._dirChangeSubscription=i.change.subscribe(o=>{this._computePositionAnimationState(o),r.markForCheck()})),this._translateTabComplete.pipe(ja((o,s)=>o.fromState===s.fromState&&o.toState===s.toState)).subscribe(o=>{this._isCenterPosition(o.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(o.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(e){const i=this._isCenterPosition(e.toState);this._beforeCentering.emit(i),i&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(e){return"center"==e||"left-origin-center"==e||"right-origin-center"==e}_computePositionAnimationState(e=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==e?"left":"right":this._positionIndex>0?"ltr"==e?"right":"left":"center"}_computePositionFromOrigin(e){const i=this._getLayoutDirection();return"ltr"==i&&e<=0||"rtl"==i&&e>0?"left-origin-center":"right-origin-center"}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hi,8),y(an))},n.\u0275dir=X({type:n,inputs:{_content:["content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),n})(),C8=(()=>{class n extends fme{constructor(e,i,r){super(e,i,r)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hi,8),y(an))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tab-body"]],viewQuery:function(e,i){if(1&e&&pt(Bc,5),2&e){let r;Ae(r=Ie())&&(i._portalHost=r.first)}},hostAttrs:[1,"mat-mdc-tab-body"],features:[ye],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-mdc-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(e,i){1&e&&(_(0,"div",0,1),z("@translateTab.start",function(o){return i._onTranslateTabStarted(o)})("@translateTab.done",function(o){return i._translateTabComplete.next(o)}),A(2,Kfe,0,0,"ng-template",2),v()),2&e&&E("@translateTab",Uk(3,Yfe,i._position,la(1,Xfe,i.animationDuration)))},dependencies:[hme],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[ume.translateTab]}}),n})();const mme=new ae("MatTabContent");let pme=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","matTabContent",""]],features:[tt([{provide:mme,useExisting:n}])]}),n})();const gme=new ae("MatTabLabel"),k8=new ae("MAT_TAB");let _me=(()=>{class n extends Yce{constructor(e,i,r){super(e,i),this._closestTab=r}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(ii),y(k8,8))},n.\u0275dir=X({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[tt([{provide:gme,useExisting:n}]),ye]}),n})();const BS="mdc-tab-indicator--active",E8="mdc-tab-indicator--no-transition";class bme{constructor(t){this._items=t}hide(){this._items.forEach(t=>t.deactivateInkBar())}alignToElement(t){const e=this._items.find(r=>r.elementRef.nativeElement===t),i=this._currentItem;if(i?.deactivateInkBar(),e){const r=i?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(r),this._currentItem=e}}}function vme(n){return class extends n{constructor(...t){super(...t),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){const e=Qe(t);this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){const e=this.elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement)return void e.classList.add(BS);const i=e.getBoundingClientRect(),r=t.width/i.width,o=t.left-i.left;e.classList.add(E8),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${r})`),e.getBoundingClientRect(),e.classList.remove(E8),e.classList.add(BS),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this.elementRef.nativeElement.classList.remove(BS)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){const t=this.elementRef.nativeElement.ownerDocument||document;this._inkBarElement=t.createElement("span"),this._inkBarContentElement=t.createElement("span"),this._inkBarElement.className="mdc-tab-indicator",this._inkBarContentElement.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",this._inkBarElement.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this.elementRef.nativeElement.querySelector(".mdc-tab__content"):this.elementRef.nativeElement).appendChild(this._inkBarElement)}}}const xme=Oc(class{}),wme=vme((()=>{class n extends xme{constructor(e){super(),this.elementRef=e}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}}return n.\u0275fac=function(e){return new(e||n)(y(Ne))},n.\u0275dir=X({type:n,features:[ye]}),n})());let T8=(()=>{class n extends wme{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){2&e&&(vt("aria-disabled",!!i.disabled),ot("mat-mdc-tab-disabled",i.disabled))},inputs:{disabled:"disabled",fitInkBarToContent:"fitInkBarToContent"},features:[ye]}),n})();const Cme=Oc(class{}),S8=new ae("MAT_TAB_GROUP");let kme=(()=>{class n extends Cme{get content(){return this._contentPortal}constructor(e,i){super(),this._viewContainerRef=e,this._closestTabGroup=i,this.textLabel="",this._contentPortal=null,this._stateChanges=new Me,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Lc(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(S8,8))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(Un,7),2&e){let r;Ae(r=Ie())&&(i._implicitContent=r.first)}},inputs:{textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},features:[ye,jn]}),n})(),qy=(()=>{class n extends kme{get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-tab"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,pme,7,Un),qt(r,_me,5)),2&e){let o;Ae(o=Ie())&&(i._explicitContent=o.first),Ae(o=Ie())&&(i.templateLabel=o.first)}},inputs:{disabled:"disabled"},exportAs:["matTab"],features:[tt([{provide:k8,useExisting:n}]),ye],ngContentSelectors:w8,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),A(0,Zfe,1,0,"ng-template"))},encapsulation:2}),n})();const D8=pa({passive:!0});let Sme=(()=>{class n{get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Qe(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=gr(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}constructor(e,i,r,o,s,a,c){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=o,this._ngZone=s,this._platform=a,this._animationMode=c,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Me,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Me,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new De,this.indexFocused=new De,s.runOutsideAngular(()=>{ga(e.nativeElement,"mouseleave").pipe(St(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){ga(this._previousPaginator.nativeElement,"touchstart",D8).pipe(St(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),ga(this._nextPaginator.nativeElement,"touchstart",D8).pipe(St(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const e=this._dir?this._dir.change:nt("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new zT(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(An(1)).subscribe(r),oi(e,i,this._items.changes,this._itemsResized()).pipe(St(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return"function"!=typeof ResizeObserver?ns:this._items.changes.pipe(er(this._items),Ji(e=>new Dn(i=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(o=>i.next(o));return e.forEach(o=>r.observe(o.elementRef.nativeElement)),()=>{r.disconnect()}}))),LT(1),mn(e=>e.some(i=>i.contentRect.width>0&&i.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!so(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){const i=this._items.get(this.focusIndex);i&&!i.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){const e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return!this._items||!!this._items.toArray()[e]}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();const i=this._tabListContainer.nativeElement;i.scrollLeft="ltr"==this._getLayoutDirection()?0:i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const e=this.scrollDistance,i="ltr"===this._getLayoutDirection()?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){return this._scrollTo(this._scrollDistance+("before"==e?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;const i=this._items?this._items.toArray()[e]:null;if(!i)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:s}=i.elementRef.nativeElement;let a,c;"ltr"==this._getLayoutDirection()?(a=o,c=a+s):(c=this._tabListInner.nativeElement.offsetWidth-o,a=c-s);const l=this.scrollDistance,d=this.scrollDistance+r;ad&&(this.scrollDistance+=Math.min(c-d,a-l))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const e=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=e}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&null!=i.button&&0!==i.button||(this._stopInterval(),yg(650,100).pipe(St(oi(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:o}=this._scrollHeader(e);(0===o||o>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(_a),y(Hi,8),y(Xe),y(Hn),y(Jn,8))},n.\u0275dir=X({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),Dme=(()=>{class n extends Sme{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Qe(e)}constructor(e,i,r,o,s,a,c){super(e,i,r,o,s,a,c),this._disableRipple=!1}_itemSelected(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(_a),y(Hi,8),y(Xe),y(Hn),y(Jn,8))},n.\u0275dir=X({type:n,inputs:{disableRipple:"disableRipple"},features:[ye]}),n})(),Ame=(()=>{class n extends Dme{constructor(e,i,r,o,s,a,c){super(e,i,r,o,s,a,c)}ngAfterContentInit(){this._inkBar=new bme(this._items),super.ngAfterContentInit()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(_a),y(Hi,8),y(Xe),y(Hn),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,i,r){if(1&e&&qt(r,T8,4),2&e){let o;Ae(o=Ie())&&(i._items=o)}},viewQuery:function(e,i){if(1&e&&(pt(Jfe,7),pt(eme,7),pt(tme,7),pt(nme,5),pt(ime,5)),2&e){let r;Ae(r=Ie())&&(i._tabListContainer=r.first),Ae(r=Ie())&&(i._tabList=r.first),Ae(r=Ie())&&(i._tabListInner=r.first),Ae(r=Ie())&&(i._nextPaginator=r.first),Ae(r=Ie())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-mdc-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==i._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[ye],ngContentSelectors:w8,decls:13,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-mdc-tab-labels"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(Rn(),_(0,"button",0,1),z("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),_e(2,"div",2),v(),_(3,"div",3,4),z("keydown",function(o){return i._handleKeydown(o)}),_(5,"div",5,6),z("cdkObserveContent",function(){return i._onContentChanges()}),_(7,"div",7,8),dt(9),v()()(),_(10,"button",9,10),z("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),_e(12,"div",2),v()),2&e&&(ot("mat-mdc-tab-header-pagination-disabled",i._disableScrollBefore),E("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),w(3),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode),w(7),ot("mat-mdc-tab-header-pagination-disabled",i._disableScrollAfter),E("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[Bs,BT],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2}),n})();const A8=new ae("MAT_TABS_CONFIG");let Ime=0;const Mme=Pl(Ol(class{constructor(n){this._elementRef=n}}),"primary");let Rme=(()=>{class n extends Mme{get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(e){this._dynamicHeight=Qe(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=gr(e,null)}get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e+"")?e+"ms":e}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=gr(e,null)}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Qe(e)}get preserveContent(){return this._preserveContent}set preserveContent(e){this._preserveContent=Qe(e)}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){const i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,i,r,o){super(e),this._changeDetectorRef=i,this._animationMode=o,this._tabs=new yl,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=lt.EMPTY,this._tabLabelSubscription=lt.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this._disablePagination=!1,this._preserveContent=!1,this.selectedIndexChange=new De,this.focusChange=new De,this.animationDone=new De,this.selectedTabChange=new De(!0),this._groupId=Ime++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,this.contentTabIndex=r?.contentTabIndex??null,this.preserveContent=!!r?.preserveContent}ngAfterContentChecked(){const e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){const i=null==this._selectedIndex;if(!i){this.selectedTabChange.emit(this._createChangeEvent(e));const r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,o)=>r.isActive=o===e),i||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((i,r)=>{i.position=r-e,null!=this._selectedIndex&&0==i.position&&!i.origin&&(i.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{const e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){const i=this._tabs.toArray();let r;for(let o=0;o{i[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(er(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(i=>i._closestTabGroup===this||!i._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){const i=this._tabHeader;i&&(i.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){const i=new Fme;return i.index=e,this._tabs&&this._tabs.length&&(i.tab=this._tabs.toArray()[e]),i}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=oi(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e){return`mat-tab-label-${this._groupId}-${e}`}_getTabContentId(e){return`mat-tab-content-${this._groupId}-${e}`}_setTabBodyWrapperHeight(e){if(!this._dynamicHeight||!this._tabBodyWrapperHeight)return;const i=this._tabBodyWrapper.nativeElement;i.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(i.style.height=e+"px")}_removeTabBodyWrapperHeight(){const e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this.animationDone.emit()}_handleClick(e,i,r){i.focusIndex=r,e.disabled||(this.selectedIndex=r)}_getTabIndex(e){return e===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(e,i){e&&"mouse"!==e&&"touch"!==e&&(this._tabHeader.focusIndex=i)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(A8,8),y(Jn,8))},n.\u0275dir=X({type:n,inputs:{dynamicHeight:"dynamicHeight",selectedIndex:"selectedIndex",headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:"contentTabIndex",disablePagination:"disablePagination",preserveContent:"preserveContent",backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},features:[ye]}),n})(),Ng=(()=>{class n extends Rme{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=Qe(e),this._changeDetectorRef.markForCheck()}get stretchTabs(){return this._stretchTabs}set stretchTabs(e){this._stretchTabs=Qe(e)}constructor(e,i,r,o){super(e,i,r,o),this._fitInkBarToContent=!1,this._stretchTabs=!0,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(A8,8),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tab-group"]],contentQueries:function(e,i,r){if(1&e&&qt(r,qy,5),2&e){let o;Ae(o=Ie())&&(i._allTabs=o)}},viewQuery:function(e,i){if(1&e&&(pt(rme,5),pt(ome,5)),2&e){let r;Ae(r=Ie())&&(i._tabBodyWrapper=r.first),Ae(r=Ie())&&(i._tabHeader=r.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:6,hostBindings:function(e,i){2&e&&ot("mat-mdc-tab-group-dynamic-height",i.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===i.headerPosition)("mat-mdc-tab-group-stretch-tabs",i.stretchTabs)},inputs:{color:"color",disableRipple:"disableRipple",fitInkBarToContent:"fitInkBarToContent",stretchTabs:["mat-stretch-tabs","stretchTabs"]},exportAs:["matTabGroup"],features:[tt([{provide:S8,useExisting:n}]),ye],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mdc-tab mat-mdc-tab mat-mdc-focus-indicator","role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",3,"id","mdc-tab--active","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange",4,"ngFor","ngForOf"],[1,"mat-mdc-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-mdc-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange"],["tabNode",""],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"ngIf","ngIfElse"],["tabTextLabel",""],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering"]],template:function(e,i){1&e&&(_(0,"mat-tab-header",0,1),z("indexFocused",function(o){return i._focusChanged(o)})("selectFocusedIndex",function(o){return i.selectedIndex=o}),A(2,lme,9,17,"div",2),v(),_(3,"div",3,4),A(5,dme,1,11,"mat-tab-body",5),v()),2&e&&(E("selectedIndex",i.selectedIndex||0)("disableRipple",i.disableRipple)("disablePagination",i.disablePagination),w(2),E("ngForOf",i._tabs),w(1),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode),w(2),E("ngForOf",i._tabs))},dependencies:[ha,io,ri,Bc,Bs,pce,C8,T8,Ame],styles:['.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-tab.mdc-tab{height:48px;flex-grow:0}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.mat-mdc-tab .mdc-tab__text-label{display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-disabled{opacity:.4}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-mdc-tab-header-with-background-background-color, transparent)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2}),n})();class Fme{}let Pme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft,ru,Nl,Jv,GT,Ft]}),n})();var Wa=Qr(327);class Ome{constructor(t,e){this._document=e;const i=this._textarea=this._document.createElement("textarea"),r=i.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",i.setAttribute("aria-hidden","true"),i.value=t,i.readOnly=!0,this._document.body.appendChild(i)}copy(){const t=this._textarea;let e=!1;try{if(t){const i=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),i&&i.focus()}}catch{}return e}destroy(){const t=this._textarea;t&&(t.remove(),this._textarea=void 0)}}let VS=(()=>{class n{constructor(e){this._document=e}copy(e){const i=this.beginCopy(e),r=i.copy();return i.destroy(),r}beginCopy(e){return new Ome(e,this._document)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Nme=new ae("HighlightJs-Config");let Qy=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.ngModel=i,this.doc=r,this.ngZone=s,this.lang="html",this.mode="simple",Object.assign(this,o)}escapeHTML(e){return(e||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}init(){this.ngZone.runOutsideAngular(()=>{this.destroy();const e=this.el.nativeElement,i=this.code||""+e.innerHTML.trim();if(this.codeEl=this.doc.createElement("default"===this.mode?"div":"pre"),null==this.codeEl)return;const r="simple"===this.mode;r?(this.lang&&(this.codeEl.className=this.lang),this.parentEl=e.parentNode,this.parentEl.insertBefore(this.codeEl,e.nextSibling)):(this.parentEl=e,this.parentEl.innerHTML="",this.parentEl.appendChild(this.codeEl)),this.codeEl.innerHTML=i,hljs.configure({...this.options}),r?hljs.highlightElement(this.codeEl):this.codeEl.querySelectorAll("pre code").forEach(o=>{hljs.highlightElement(o)})})}destroy(){this.codeEl&&this.parentEl&&(this.parentEl.removeChild(this.codeEl),this.codeEl=void 0)}ngAfterViewInit(){this.init(),this.ngModel?this.modelValue$=this.ngModel.valueChanges?.subscribe(e=>{this.code=this.escapeHTML(e),this.init()}):this.initMutation()}ngOnDestroy(){this.destroy(),this.destroyMutation(),this.modelValue$&&this.modelValue$.unsubscribe()}initMutation(){typeof MutationObserver>"u"||this.ngZone.runOutsideAngular(()=>{this.observer=new MutationObserver(this.init.bind(this)),this.observer.observe(this.el.nativeElement,{characterData:!0,childList:!0,subtree:!0})})}destroyMutation(){this.observer&&this.observer.disconnect()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ps,8),y(gt),y(Nme,8),y(Xe))},n.\u0275dir=X({type:n,selectors:[["","highlight-js",""]],hostVars:2,hostBindings:function(e,i){2&e&&Ai("display","simple"===i.mode?"none":null)},inputs:{options:"options",lang:"lang",code:"code",mode:"mode"},exportAs:["highlightJs"],standalone:!0}),n})(),Lme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[LS]}),n})();const Bme=["trigger"],Vme=["panel"];function Ume(n,t){if(1&n&&(_(0,"span",10),k(1),v()),2&n){const e=O();w(1),Ze(e.placeholder)}}function Hme(n,t){if(1&n&&(_(0,"span",14),k(1),v()),2&n){const e=O(2);w(1),Ze(e.triggerValue)}}function zme(n,t){1&n&&dt(0,0,["*ngSwitchCase","true"])}function jme(n,t){1&n&&(_(0,"span",11),A(1,Hme,2,1,"span",12),A(2,zme,1,0,"ng-content",13),v()),2&n&&(E("ngSwitch",!!O().customTrigger),w(2),E("ngSwitchCase",!0))}function $me(n,t){if(1&n){const e=Le();xc(),Eh(),_(0,"div",15,16),z("@transformPanel.done",function(r){return he(e),fe(O()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return he(e),fe(O()._handleKeydown(r))}),dt(2,1),v()}if(2&n){const e=O();(function g4(n,t,e){ca(as,La,zh(we(),n,t,e),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),E("ngClass",e.panelClass)("@transformPanel","showing"),vt("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const Gme=[[["mat-select-trigger"]],"*"],Wme=["mat-select-trigger","*"],qme={transformPanelWrap:$n("transformPanelWrap",[Qt("* => void",cy("@transformPanel",[ay()],{optional:!0}))]),transformPanel:$n("transformPanel",[pn("void",ze({opacity:0,transform:"scale(1, 0.8)"})),Qt("void => showing",Gt("120ms cubic-bezier(0, 0, 0.2, 1)",ze({opacity:1,transform:"scale(1, 1)"}))),Qt("* => void",Gt("100ms linear",ze({opacity:0})))])};let I8=0;const M8=new ae("mat-select-scroll-strategy"),Kme=new ae("MAT_SELECT_CONFIG"),Xme={provide:M8,deps:[ao],useFactory:function Qme(n){return()=>n.scrollStrategies.reposition()}},Yme=new ae("MatSelectTrigger");class Zme{constructor(t,e){this.source=t,this.value=e}}const Jme=Ol(gg(Oc(l5(class{constructor(n,t,e,i,r){this._elementRef=n,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Me}}))));let epe=(()=>{class n extends Jme{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ff.required)??!1}set required(e){this._required=Qe(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=Qe(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=Qe(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=gr(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,i,r,o,s,a,c,l,d,u,h,f,m,g){super(s,o,c,l,u),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=d,this._liveAnnouncer=m,this._defaultOptions=g,this._panelOpen=!1,this._compareWith=(p,b)=>p===b,this._uid="mat-select-"+I8++,this._triggerAriaLabelledBy=null,this._destroy=new Me,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+I8++,this._panelDoneAnimatingStream=new Me,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=df(()=>{const p=this.options;return p?p.changes.pipe(er(p),Ji(()=>oi(...p.map(b=>b.onSelectionChange)))):this._ngZone.onStable.pipe(An(1),Ji(()=>this.optionSelectionChanges))}),this.openedChange=new De,this._openedStream=this.openedChange.pipe(mn(p=>p),ct(()=>{})),this._closedStream=this.openedChange.pipe(mn(p=>!p),ct(()=>{})),this.selectionChange=new De,this.valueChange=new De,this.ngControl&&(this.ngControl.valueAccessor=this),null!=g?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=g.typeaheadDebounceInterval),this._scrollStrategyFactory=f,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(h)||0,this.id=this.id}ngOnInit(){this._selectionModel=new wT(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ja(),St(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(St(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(er(null),St(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,r=40===i||38===i||37===i||39===i,o=13===i||32===i,s=this._keyManager;if(!s.isTyping()&&o&&!so(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;s.onKeydown(e);const c=this.selected;c&&a!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,r=e.keyCode,o=40===r||38===r,s=i.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(s||13!==r&&32!==r||!i.activeItem||so(e))if(!s&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();const a=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(a?c.select():c.deselect())})}else{const a=i.activeItemIndex;i.onKeydown(e),this._multiple&&o&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(An(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new JB(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=oi(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(St(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),oi(...this.options.map(i=>i._stateChanges)).pipe(St(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){const r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();let i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(e){return new(e||n)(y(_a),y(an),y(Xe),y(d5),y(Ne),y(Hi,8),y(mu,8),y(Wl,8),y(Gy,8),y(Ga,10),Ms("tabindex"),y(M8),y(jT),y(Kme,8))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&(pt(Bme,5),pt(Vme,5),pt(z5,5)),2&e){let r;Ae(r=Ie())&&(i.trigger=r.first),Ae(r=Ie())&&(i.panel=r.first),Ae(r=Ie())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[ye,jn]}),n})(),Lg=(()=>{class n extends epe{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(St(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(e){const i=this.options.toArray()[e];if(i){const r=this.panel.nativeElement,o=b5(e,this.options,this.optionGroups),s=i._getHostElement();r.scrollTop=0===e&&1===o?0:v5(s.offsetTop,s.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Zme(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof rS?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=Qe(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,Yme,5),qt(r,Ll,5),qt(r,QT,5)),2&e){let o;Ae(o=Ie())&&(i.customTrigger=o.first),Ae(o=Ie())&&(i.options=o),Ae(o=Ie())&&(i.optionGroups=o)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,i){1&e&&z("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(vt("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),ot("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[tt([{provide:$y,useExisting:n},{provide:qT,useExisting:n}]),ye],ngContentSelectors:Wme,decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(Rn(Gme),_(0,"div",0,1),z("click",function(){return i.toggle()}),_(3,"div",2),A(4,Ume,2,1,"span",3),A(5,jme,3,2,"span",4),v(),_(6,"div",5)(7,"div",6),xc(),_(8,"svg",7),_e(9,"path",8),v()()()(),A(10,$me,3,9,"ng-template",9),z("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){const r=Pt(1);vt("aria-owns",i.panelOpen?i.id+"-panel":null),w(3),E("ngSwitch",i.empty),vt("id",i._valueId),w(1),E("ngSwitchCase",!0),w(1),E("ngSwitchCase",!1),w(5),E("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[ha,Vp,TE,FL,z5,rS],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[qme.transformPanel]},changeDetection:0}),n})(),tpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[Xme],imports:[Br,au,sy,Ft,Vc,Wy,sy,Ft]}),n})();const npe=["tooltip"],R8=new ae("mat-tooltip-scroll-strategy"),ope={provide:R8,deps:[ao],useFactory:function rpe(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},ape=new ae("mat-tooltip-default-options",{providedIn:"root",factory:function spe(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),F8="tooltip-panel",P8=pa({passive:!0});let fpe=(()=>{class n{get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=Qe(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=Qe(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=gr(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=gr(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=e?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(e,i,r,o,s,a,c,l,d,u,h,f){this._overlay=e,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=o,this._ngZone=s,this._platform=a,this._ariaDescriber=c,this._focusMonitor=l,this._dir=u,this._defaultOptions=h,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Me,this._scrollStrategy=d,this._document=f,h&&(h.position&&(this.position=h.position),h.positionAtOrigin&&(this.positionAtOrigin=h.positionAtOrigin),h.touchGestures&&(this.touchGestures=h.touchGestures)),u.change.pipe(St(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(St(this._destroyed)).subscribe(e=>{e?"keyboard"===e&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const e=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{e.removeEventListener(i,r,P8)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(i);this._detach(),this._portal=this._portal||new Sf(this._tooltipComponent,this._viewContainerRef);const o=this._tooltipInstance=r.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(St(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(e)}hide(e=this.hideDelay){const i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){const o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof Ne)return this._overlayRef;this._detach()}const i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&e||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(St(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${F8}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(St(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(St(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(St(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&27===o.keyCode&&!so(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){const i=e.getConfig().positionStrategy,r=this._getOrigin(),o=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...o.main}),this._addOffset({...r.fallback,...o.fallback})])}_addOffset(e){return e}_getOrigin(){const e=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={originX:"end",originY:"center"});const{x:o,y:s}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:s}}}_getOverlayPosition(){const e=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={overlayX:"start",overlayY:"center"});const{x:o,y:s}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(An(1),St(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){const{overlayY:i,originX:r,originY:o}=e;let s;if(s="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===o?"above":"below",s!==this._currentPosition){const a=this._overlayRef;if(a){const c=`${this._cssClassPrefix}-${F8}-`;a.removePanelClass(c+this._currentPosition),a.addPanelClass(c+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{let i;this._setupPointerExitEventsIfNeeded(),void 0!==e.x&&void 0!==e.y&&(i=e),this.show(void 0,i)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{const i=e.targetTouches?.[0],r=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{const r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,P8)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){const i=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){const e=this.touchGestures;if("off"!==e){const i=this._elementRef.nativeElement,r=i.style;("on"===e||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===e||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),_u=(()=>{class n extends fpe{constructor(e,i,r,o,s,a,c,l,d,u,h,f){super(e,i,r,o,s,a,c,l,d,u,h,f),this._tooltipComponent=ppe,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(e){const r=!this._dir||"ltr"==this._dir.value;return"top"===e.originY?e.offsetY=-8:"bottom"===e.originY?e.offsetY=8:"start"===e.originX?e.offsetX=r?-8:8:"end"===e.originX&&(e.offsetX=r?8:-8),e}}return n.\u0275fac=function(e){return new(e||n)(y(ao),y(Ne),y(ou),y(ii),y(Xe),y(Hn),y(XB),y(ms),y(R8),y(Hi,8),y(ape,8),y(gt))},n.\u0275dir=X({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[ye]}),n})(),mpe=(()=>{class n{constructor(e,i){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Me,this._animationsDisabled="NoopAnimations"===i}show(e){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){const i=this._tooltip.nativeElement,r=this._showAnimation,o=this._hideAnimation;if(i.classList.remove(e?o:r),i.classList.add(e?r:o),this._isVisible=e,e&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const s=getComputedStyle(i);("0s"===s.getPropertyValue("animation-duration")||"none"===s.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(Jn,8))},n.\u0275dir=X({type:n}),n})(),ppe=(()=>{class n extends mpe{constructor(e,i,r){super(e,r),this._elementRef=i,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>24&&e.width>=200}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(Ne),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(1&e&&pt(npe,7),2&e){let r;Ae(r=Ie())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,i){1&e&&z("mouseleave",function(o){return i._handleMouseLeave(o)}),2&e&&Ai("zoom",i.isVisible()?1:null)},features:[ye],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(e,i){1&e&&(_(0,"div",0,1),z("animationend",function(o){return i._handleAnimationEnd(o)}),_(2,"div",2),k(3),v()()),2&e&&(ot("mdc-tooltip--multiline",i._isMultiline),E("ngClass",i.tooltipClass),w(3),Ze(i.message))},dependencies:[ha],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0}),n})(),gpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[ope],imports:[GT,Br,au,Ft,Ft,Vc]}),n})();const _pe=["switch"],bpe=["*"],vpe=new ae("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})}),ype={provide:Hr,useExisting:hn(()=>N8),multi:!0};class O8{constructor(t,e){this.source=t,this.checked=e}}let xpe=0;const wpe=gg(Pl(Ol(Oc(class{constructor(n){this._elementRef=n}}))));let Cpe=(()=>{class n extends wpe{get required(){return this._required}set required(e){this._required=Qe(e)}get checked(){return this._checked}set checked(e){this._checked=Qe(e),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,r,o,s,a,c){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this.defaults=s,this._onChange=l=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new De,this.toggleChange=new De,this.tabIndex=parseInt(o)||0,this.color=this.defaultColor=s.color||"accent",this._noopAnimations="NoopAnimations"===a,this.id=this._uniqueId=`${c}${++xpe}`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{"keyboard"===e||"program"===e?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[ye]}),n})(),N8=(()=>{class n extends Cpe{get buttonId(){return`${this.id||this._uniqueId}-button`}constructor(e,i,r,o,s,a){super(e,i,r,o,s,a,"mat-mdc-slide-toggle-"),this._labelId=this._uniqueId+"-label"}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new O8(this,this.checked)))}focus(){this._switchElement.nativeElement.focus()}_createChangeEvent(e){return new O8(this,e)}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ms),y(an),Ms("tabindex"),y(vpe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-slide-toggle"]],viewQuery:function(e,i){if(1&e&&pt(_pe,5),2&e){let r;Ae(r=Ie())&&(i._switchElement=r.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:11,hostBindings:function(e,i){2&e&&(Ba("id",i.id),vt("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),ot("mat-mdc-slide-toggle-focused",i._focused)("mat-mdc-slide-toggle-checked",i.checked)("_mat-animation-noopable",i._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[tt([ype]),ye],ngContentSelectors:bpe,decls:17,vars:24,consts:[[1,"mdc-form-field"],["role","switch","type","button",1,"mdc-switch",3,"tabIndex","disabled","click"],["switch",""],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"],[3,"for","click"]],template:function(e,i){if(1&e&&(Rn(),_(0,"div",0)(1,"button",1,2),z("click",function(){return i._handleClick()}),_e(3,"div",3),_(4,"div",4)(5,"div",5)(6,"div",6),_e(7,"div",7),v(),_(8,"div",8),_e(9,"div",9),v(),_(10,"div",10),xc(),_(11,"svg",11),_e(12,"path",12),v(),_(13,"svg",13),_e(14,"path",14),v()()()()(),Eh(),_(15,"label",15),z("click",function(o){return o.stopPropagation()}),dt(16),v()()),2&e){const r=Pt(2);ot("mdc-form-field--align-end","before"==i.labelPosition),w(1),ot("mdc-switch--selected",i.checked)("mdc-switch--unselected",!i.checked)("mdc-switch--checked",i.checked)("mdc-switch--disabled",i.disabled),E("tabIndex",i.tabIndex)("disabled",i.disabled),vt("id",i.buttonId)("name",i.name)("aria-label",i.ariaLabel)("aria-labelledby",i._getAriaLabelledBy())("aria-describedby",i.ariaDescribedby)("aria-required",i.required||null)("aria-checked",i.checked),w(8),E("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0),w(6),E("for",i.buttonId),vt("id",i._labelId)}},dependencies:[Bs],styles:['.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mdc-switch{width:var(--mdc-switch-track-width, 36px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, #616161)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color, var(--mdc-theme-surface, #fff))}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__focus-ring-wrapper,.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height, 20px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__handle::after{opacity:var(--mdc-switch-disabled-handle-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape, 10px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width, 20px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width, 20px))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 18px);height:var(--mdc-switch-selected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 18px);height:var(--mdc-switch-unselected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size, 48px);width:var(--mdc-switch-state-layer-size, 48px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height, 14px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape, 7px)}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}'],encapsulation:2,changeDetection:0}),n})(),L8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})(),Tpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[L8,Ft,Nl,Br,L8,Ft]}),n})();function Spe(n,t){if(1&n){const e=Le();_(0,"button",14),z("click",function(){he(e);const r=O().index;return fe(O().removeReaction(r))}),_(1,"mat-icon"),k(2,"close"),v()()}}function Dpe(n,t){if(1&n){const e=Le();_(0,"mat-option",15),z("click",function(){const o=he(e).$implicit,s=O().$implicit;return fe(O().reactionSeveritySelected(s,o))}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),Ze(e.display)}}function Ape(n,t){if(1&n){const e=Le();_(0,"div",2)(1,"div",3),A(2,Spe,3,0,"button",4),v(),_(3,"div",5)(4,"div",6)(5,"app-autocomplete-binding",7),z("selectionChange",function(r){const s=he(e).$implicit;return fe(O().reactionManifestationSelected(s,r))}),v()(),_(6,"button",8)(7,"mat-icon"),k(8,"info"),v()(),_(9,"mat-menu",null,9)(11,"span",10),z("click",function(r){return r.stopPropagation()}),_(12,"p"),k(13,"Terminology binding:"),v(),_(14,"pre"),k(15),v()()()(),_(16,"mat-form-field",11)(17,"mat-label"),k(18,"Reaction Severity"),v(),_(19,"mat-select"),A(20,Dpe,2,2,"mat-option",12),v()(),_(21,"div",5)(22,"div",6)(23,"app-autocomplete-binding",7),z("selectionChange",function(r){const s=he(e).$implicit;return fe(O().reactionRouteSelected(s,r))}),v()(),_(24,"button",8)(25,"mat-icon"),k(26,"info"),v()(),_(27,"mat-menu",null,13)(29,"span",10),z("click",function(r){return r.stopPropagation()}),_(30,"p"),k(31,"Terminology binding:"),v(),_(32,"pre"),k(33),v()()()()()}if(2&n){const e=t.index,i=Pt(10),r=Pt(28),o=O();w(2),E("ngIf",e>0),w(3),E("binding",o.reactionManifestationBinding),w(1),E("matMenuTriggerFor",i),w(5),E("disableRipple",!0),w(4),Ze(o.reactionManifestationBinding.ecl),w(5),E("ngForOf",o.severityOptions),w(3),E("binding",o.routeBinding),w(1),E("matMenuTriggerFor",r),w(5),E("disableRipple",!0),w(4),Ze(o.routeBinding.ecl)}}let Ipe=(()=>{class n{constructor(){this.reactions=[],this.newManifestation=new De,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.reaction={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}writeValue(e){void 0!==e&&(this.reactions=e)}setDisabledState(e){}addNewReaction(){this.reactions.push(this.reaction),this.reaction={},this.onChangeCallback(this.reactions)}removeReaction(e){this.reactions.splice(e,1),this.onChangeCallback(this.reactions)}reactionManifestationSelected(e,i){e.manifestation=i,this.newManifestation.emit(i),this.onChangeCallback(this.reactions)}reactionSeveritySelected(e,i){e.severity=i,this.onChangeCallback(this.reactions)}reactionRouteSelected(e,i){e.route=i,this.onChangeCallback(this.reactions)}registerOnChange(e){this.onChangeCallback=e}registerOnTouched(e){this.onTouchedCallback=e}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies-allergy-list-reaction"]],inputs:{reactions:"reactions"},outputs:{newManifestation:"newManifestation"},features:[tt([{provide:Hr,useExisting:hn(()=>n),multi:!0}])],decls:5,vars:1,consts:[["class","reaction",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Add reaction",3,"click"],[1,"reaction"],[1,"button-container"],["mat-icon-button","","color","primary","class","remove","matTooltip","Remove reaction",3,"click",4,"ngIf"],[1,"row-centered"],[1,"small-form-field"],[3,"binding","selectionChange"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["reactionPopoverMenu","matMenu"],["mat-menu-item","",3,"disableRipple","click"],[1,"form-field"],[3,"value","click",4,"ngFor","ngForOf"],["routePopoverMenu","matMenu"],["mat-icon-button","","color","primary","matTooltip","Remove reaction",1,"remove",3,"click"],[3,"value","click"]],template:function(i,r){1&i&&(A(0,Ape,34,10,"div",0),_(1,"div")(2,"button",1),z("click",function(){return r.addNewReaction()}),_(3,"mat-icon"),k(4,"add"),v()()()),2&i&&E("ngForOf",r.reactions)},dependencies:[io,ri,Vs,co,lu,$a,du,ba,gs,Ll,Lg,_u,Og],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px;margin-bottom:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}"]})}return n})();function Mpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),Ze(e.display)}}function Rpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),Ze(e.display)}}function Fpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),Ze(e.display)}}function Ppe(n,t){if(1&n){const e=Le();_(0,"app-autocomplete-binding",10),z("selectionChange",function(r){return he(e),fe(O().substanceSelected(r,!0))}),v()}if(2&n){const e=O();E("binding",e.substanceBinding)("term",e.selectedSubstanceTerm)}}function Ope(n,t){if(1&n){const e=Le();_(0,"app-autocomplete-binding",10),z("selectionChange",function(r){return he(e),fe(O().substanceSelected(r))}),v()}if(2&n){const e=O();E("binding",e.refinedSubstanceBinding)("term",e.selectedSubstanceTerm)}}function Npe(n,t){if(1&n&&(_(0,"pre"),k(1),v()),2&n){const e=O();w(1),Ze(e.substanceBinding.ecl)}}function Lpe(n,t){if(1&n&&(_(0,"pre"),k(1),v()),2&n){const e=O();w(1),Ze(e.refinedSubstanceBinding.ecl)}}function Bpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),Ze(e.display)}}function Vpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),Ze(e.display)}}const Upe=function(){return{}};let Hpe=(()=>{class n{constructor(e,i,r){this.terminologyService=e,this.clipboard=i,this._snackBar=r,this.newProblem=new De,this.clinicalStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"active",display:"Active"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"inactive",display:"Inactive"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"resolved",display:"Resolved"}],this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.verificationStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"unconfirmed",display:"Unconfirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"presumed",display:"Presumed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"confirmed",display:"Confirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"refuted",display:"Refuted"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"entered-in-error",display:"Entered in Error"}],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.intoleranceTypeOptions=[{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"609433001",display:"Hypersensitivity disposition (finding)",fhirCode:"allergy",fhirDisplay:"Allergy"},{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"782197009",display:"Intolerance to substance (finding)",fhirCode:"intolerance",fhirDisplay:"Intolerance"}],this.selectedIntoleranceType=null,this.intoleranceCategoryOptions=[{code:"food",display:"Food"},{code:"medication",display:"Medication"},{code:"environment",display:"Environment"},{code:"biologic",display:"Biologic"}],this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Qo(this.selectedIntoleranceCategories),this.criticalityOptions=[{code:"low",display:"Low Risk"},{code:"high",display:"High Risk"},{code:"unable-to-assess",display:"Unable to Assess Risk"}],this.selectedCriticality=null,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.codeBinding={ecl:"<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",title:"Allergy/Intolerance by propensity"},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.substanceBinding={ecl:"<<105590001 | Substance (substance) | OR <<373873005 | Pharmaceutical / biologic product (product) |",title:"Allergy/Intolerance substance or product"},this.refinedSubstanceBinding={ecl:"<<105590001 | Substance (substance) |",title:"Allergy/Intolerance substance based on propensity"},this.selectedSubstanceTerm="",this.selectedSubstance=null,this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm="",this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.selectedRoute=null,this.selectedRouteTerm="",this.outputAllergyBase={resourceType:"AllergyIntolerance",id:"medication",text:{},clinicalStatus:{coding:[]},verificationStatus:{coding:[]},type:"",category:[],criticality:"high",code:{coding:[]},reaction:[{substance:[{coding:[]}],manifestation:[{coding:[]}],exposureRoute:{coding:[]},severity:""}],patient:{reference:"Patient/example"},recordedDate:"2010-03-01",participant:[{function:{coding:[{system:"http://terminology.hl7.org/CodeSystem/provenance-participant-type",code:"author",display:"Author"}]},actor:{reference:"Practitioner/example"}}]},this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.outputAllergyStr=""}ngOnInit(){this.updateAllergyStr()}onReactionsChange(e){this.updateAllergyStr()}clear(){this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.selectedIntoleranceType=null,this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Qo(this.selectedIntoleranceCategories),this.selectedCriticality=null,this.selectedSeverity={},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.selectedSubstanceTerm="",this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm=" ",this.selectedRoute=null,this.selectedRouteTerm=" ",this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.updateAllergyStr(),setTimeout(()=>{this.selectedReactionManifestationTerm="",this.selectedRouteTerm=""},100)}updateAllergyStr(){this.outputAllergy.clinicalStatus.coding=[this.selectedClinicalStatus],this.outputAllergy.verificationStatus.coding=[this.selectedVerificationStatus],this.outputAllergy.type=this.selectedIntoleranceType?this.selectedIntoleranceType.fhirCode:"",this.outputAllergy.category=this.selectedIntoleranceCategories.length?this.selectedIntoleranceCategories.map(e=>e.display):[],this.outputAllergy.criticality=this.selectedCriticality?.code?[this.selectedCriticality.code]:{},this.outputAllergy.reaction=[],this.selectedReactions.forEach(e=>{e.manifestation.code&&(e.manifestation.system="http://snomed.info/sct"),e.route.code&&(e.route.system="http://snomed.info/sct"),this.outputAllergy.reaction.push({substance:[{coding:[this.selectedSubstance]}],manifestation:[{coding:e.manifestation?[e.manifestation]:[{}]}],exposureRoute:{coding:e.route?[e.route]:[{}]},severity:e.severity?e.severity.code:""})}),setTimeout(()=>{this.outputAllergyStr=JSON.stringify(this.outputAllergy,null,2)},100)}substanceSelected(e,i){var r=this;return xe(function*(){i&&(r.selectedCodeTerm=""),r.selectedSubstance=e,r.selectedIntoleranceCategories=[],e=Object.assign({system:"http://snomed.info/sct"},e),r.recordPropensity||(r.outputAllergy.code.coding=[e]),r.outputAllergy.reaction[0].substance[0].coding=[e],(yield r.getSubstanceCategories(e))?.expansion?.contains?.forEach(s=>{"762766007"==s.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[0]):"115668003"==s.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[3]):"410942007"==s.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[1]):"57795002"==s.code&&r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[2])}),r.selectedIntoleranceCategoriesControl.setValue(r.selectedIntoleranceCategories),r.updateAllergyStr()})()}propensityRecordChanged(){this.outputAllergy.code.coding=[],this.selectedCode&&this.codeSelected(this.selectedCode)}codeSelected(e){var i=this;return xe(function*(){if(e=Object.assign({system:"http://snomed.info/sct"},e)){i.selectedCodeTerm=e.display,i.selectedCode=e,i.recordPropensity&&(i.outputAllergy.code.coding=[e]);let r=yield i.getTypes(e);if(r.expansion?.contains){const s=r.expansion?.contains[0];i.selectedIntoleranceType=i.intoleranceTypeOptions.find(a=>a.code===s.code)}let o=yield i.getAllergySubstance(e);if(o.expansion.contains||(o=yield i.getIntoleranceSubstance(e)),o.expansion?.contains){const s=o.expansion?.contains[0];i.refinedSubstanceBinding.ecl=`<<${s.code} | ${s.display} |`,i.substanceSelected(s),i.selectedSubstanceTerm=s.display}else i.refinedSubstanceBinding.ecl="<<105590001 | Substance (substance) |"}})()}getIntoleranceSubstance(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`${e.code} |${e.display}| . 47429007 |Associated with (attribute)|`,"")).pipe(ct(o=>o)))})()}getAllergySubstance(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`${e.code} |${e.display}| . 246075003 |Causative agent (attribute)|`,"")).pipe(ct(o=>o)))})()}getSubstanceCategories(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`> ${e.code} |${e.display}| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)`,"")).pipe(ct(o=>o)))})()}getTypes(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`> ${e.code} |${e.display}| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)`,"")).pipe(ct(o=>o)))})()}saveFhirResource(){var e=new Blob([this.outputAllergyStr],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(e,"AllergyIntolerance.json")}copyToClipboard(e){this.clipboard.copy(e)}addToProblemsList(){if(this.selectedCode)this.newProblem.emit(this.selectedCode);else if(this.selectedSubstance&&this.selectedIntoleranceType){let e="";"609433001"===this.selectedIntoleranceType.code?e="Allergy to ":"782197009"===this.selectedIntoleranceType.code&&(e="Intolerance to "),e+=this.selectedSubstance.display,this.newProblem.emit({code:`${this.selectedIntoleranceType.code}:246075003=${this.selectedSubstance.code}`,display:e,substance:this.selectedSubstance})}else this._snackBar.openFromComponent(Si,{duration:1e3,data:"Nothing to add to problem list",panelClass:["yellow-snackbar"]});this.clear()}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(VS),y(Af))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies-allergy-list"]],outputs:{newProblem:"newProblem"},decls:105,vars:30,consts:[["id","main-card"],[1,"row"],[1,"column"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",1,"long-tooltip",3,"disableRipple","click"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-flat-button","","color","accent","id","clear",3,"click"],[1,"row-centered"],[1,"smallest-form-field"],[3,"binding","term","selectionChange"],["codePopoverMenu","matMenu"],["mat-menu-item","",3,"disableRipple","click"],["matTooltip","Defines wether to use a propensity based model or a substance based model. Defines which one is recorded in the code element of the AllergyIntolerance resource.",3,"ngModel","ngModelChange","click"],[1,"form-field"],[3,"ngModel","ngModelChange"],[3,"value","click",4,"ngFor","ngForOf"],[1,"small-form-field"],[3,"binding","term","selectionChange",4,"ngIf"],[4,"ngIf"],[3,"formControl","multiple"],[3,"ngModel","ngModelChange","newManifestation"],["mat-flat-button","","color","accent",3,"click"],["href","https://hl7.org/FHIR/allergyintolerance.html","target","_blank"],["id","output"],["id","save"],["mat-icon-button","","matTooltip","Download FHIR Resource",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy FHIR Resource",3,"click"],["fontIcon","content_copy"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],[3,"value","click"]],template:function(i,r){if(1&i&&(_(0,"mat-card",0)(1,"div",1)(2,"div",2)(3,"h4"),k(4,"Allergy Intolerance Form "),_(5,"button",3)(6,"mat-icon"),k(7,"info"),v()(),_(8,"mat-menu",null,4)(10,"span",5),z("click",function(s){return s.stopPropagation()}),_(11,"h4"),k(12,"Allergy list"),v(),_(13,"p"),k(14,"Allergy or intolerance can be recorded in a specific section (e.g., \u201cDrug Allergy and Intolerance\u201d) of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),v(),_(15,"p"),k(16,"In terms of documenting sensitivity type in the allergy list there is the option to map to 609433001 |Hypersensitivity disposition which in SNOMED CT represents both immune-mediated and non-immune mediated hypersensitivity or to map to 609328004 |Allergic disposition (finding)|which is common clinical parlance for what many clinicians would mean by allergic or non-allergic hypersensitivity. In addition, as recommended in the FHIR documentation if one is unclear as to whether a condition represents hypersensitivity or intolerance, one can just omit the type element from the resource."),v(),_(17,"p"),k(18,"If SNOMED CT concepts are used to document the causative agent, it is preferable to use concepts from the Substance rather than Pharmaceutical/biologic product hierarchy since this will facilitate the downstream use of data, e.g., clinical decision support, data exchange."),v(),_(19,"p"),k(20,"Almost all allergy and intolerance finding concepts are modeled using substance concepts in SNOMED CT. The SNOMED CT substance hierarchy has grouper concepts that are based on structure (e.g., Macrolide) or disposition (e.g., substance with histamine receptor antagonist mechanism of action). Clinical decision support systems can utilize these grouper concepts to access information at the desired level of granularity. Clinicians can also record a class of substance instead of a specific drug or substance (e.g., angiotensin II receptor antagonist). Note that substance grouper concepts based on therapeutic role (e.g., anticonvulsant) is not recommended for use because they are currently under review and may be retired in future."),v(),_(21,"p"),k(22,"There are situations in which it is difficult to determine the specific substance as a true cause or most likely cause of a condition. This is the case for allergy/intolerance to a product containing multiple substances."),v(),_(23,"p"),k(24,"Records of allergy to multiple substances or to multi-ingredient products should be recorded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),v(),_(25,"p"),k(26,"For more information check the "),_(27,"a",6),k(28,"Implementation Guide"),v(),k(29," developed by the SNOMED International Allergy Clinical Reference Group."),v()()()(),_(30,"button",7),z("click",function(){return r.clear()}),k(31,"Clear"),v(),_(32,"div",8)(33,"div",9)(34,"app-autocomplete-binding",10),z("selectionChange",function(s){return r.codeSelected(s)}),v()(),_(35,"button",3)(36,"mat-icon"),k(37,"info"),v()(),_(38,"mat-menu",null,11)(40,"span",12),z("click",function(s){return s.stopPropagation()}),_(41,"p"),k(42,"Terminology binding:"),v(),_(43,"pre"),k(44),v()()(),_(45,"mat-slide-toggle",13),z("ngModelChange",function(s){return r.recordPropensity=s})("click",function(){return r.propensityRecordChanged()}),k(46," Propensity based model "),v()(),_(47,"mat-form-field",14)(48,"mat-label"),k(49,"Allergy Intolerance Type"),v(),_(50,"mat-select",15),z("ngModelChange",function(s){return r.selectedIntoleranceType=s}),A(51,Mpe,2,2,"mat-option",16),v()(),_(52,"div",8)(53,"mat-form-field",2)(54,"mat-label"),k(55,"Clinical Status"),v(),_(56,"mat-select",15),z("ngModelChange",function(s){return r.selectedClinicalStatus=s}),A(57,Rpe,2,2,"mat-option",16),v()(),_(58,"mat-form-field",2)(59,"mat-label"),k(60,"Verification Status"),v(),_(61,"mat-select",15),z("ngModelChange",function(s){return r.selectedVerificationStatus=s}),A(62,Fpe,2,2,"mat-option",16),v()()(),_(63,"div",8)(64,"div",17),A(65,Ppe,1,2,"app-autocomplete-binding",18),A(66,Ope,1,2,"app-autocomplete-binding",18),v(),_(67,"button",3)(68,"mat-icon"),k(69,"info"),v()(),_(70,"mat-menu",null,4)(72,"span",12),z("click",function(s){return s.stopPropagation()}),_(73,"p"),k(74,"Terminology binding:"),v(),A(75,Npe,2,1,"pre",19),A(76,Lpe,2,1,"pre",19),v()()(),_(77,"div",8)(78,"mat-form-field",2)(79,"mat-label"),k(80,"Substance Category"),v(),_(81,"mat-select",20),A(82,Bpe,2,2,"mat-option",16),v()(),_(83,"mat-form-field",2)(84,"mat-label"),k(85,"Allergy Criticality"),v(),_(86,"mat-select",15),z("ngModelChange",function(s){return r.selectedCriticality=s}),A(87,Vpe,2,2,"mat-option",16),v()()(),_(88,"app-allergies-allergy-list-reaction",21),z("ngModelChange",function(s){return r.selectedReactions=s})("ngModelChange",function(s){return r.onReactionsChange(s)})("newManifestation",function(s){return r.newProblem.emit(s)}),v(),_(89,"button",22),z("click",function(){return r.addToProblemsList()}),k(90,"Save"),v()(),_(91,"div",2)(92,"h4"),k(93,"AllergyIntolerance HL7 FHIR Resource ("),_(94,"a",23),k(95,"link"),v(),k(96,")"),v(),_(97,"div",24)(98,"div",25)(99,"button",26),z("click",function(){return r.saveFhirResource()}),_e(100,"mat-icon",27),v(),_(101,"button",28),z("click",function(){return r.copyToClipboard(r.outputAllergyStr)}),_e(102,"mat-icon",29),v()(),_(103,"textarea",30),k(104," "),v()()()()()),2&i){const o=Pt(9),s=Pt(39);w(5),E("matMenuTriggerFor",o),w(5),E("disableRipple",!0),w(24),E("binding",r.codeBinding)("term",r.selectedCodeTerm),w(1),E("matMenuTriggerFor",s),w(5),E("disableRipple",!0),w(4),Ze(r.codeBinding.ecl),w(1),E("ngModel",r.recordPropensity),w(5),E("ngModel",r.selectedIntoleranceType),w(1),E("ngForOf",r.intoleranceTypeOptions),w(5),E("ngModel",r.selectedClinicalStatus),w(1),E("ngForOf",r.clinicalStatusOptions),w(4),E("ngModel",r.selectedVerificationStatus),w(1),E("ngForOf",r.verificationStatusOptions),w(3),E("ngIf",!r.recordPropensity),w(1),E("ngIf",r.recordPropensity),w(1),E("matMenuTriggerFor",o),w(5),E("disableRipple",!0),w(3),E("ngIf",!r.recordPropensity),w(1),E("ngIf",r.recordPropensity),w(5),E("formControl",r.selectedIntoleranceCategoriesControl)("multiple",!0),w(1),E("ngForOf",r.intoleranceCategoryOptions),w(4),E("ngModel",r.selectedCriticality),w(1),E("ngForOf",r.criticalityOptions),w(1),E("ngModel",r.selectedReactions),w(15),E("options",us(29,Upe))("lang","json")("innerHTML",r.outputAllergyStr,zd)}},dependencies:[io,ri,Qy,Fo,Vs,co,lu,$a,du,ba,gs,Ll,qo,Vy,cS,Lg,ps,_u,N8,Og,Ipe],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{position:relative;flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}#clear[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return n})(),B8=(()=>{class n{constructor(e){this._snackBar=e}addProblem(e){var i=this;return xe(function*(){i.allergiesProblemListComponent.addProblem(e),i._snackBar.openFromComponent(Si,{duration:1e3,data:"Problem list updated",panelClass:["green-snackbar"]})})()}static#e=this.\u0275fac=function(i){return new(i||n)(y(Af))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies"]],viewQuery:function(i,r){if(1&i&&pt(x8,5),2&i){let o;Ae(o=Ie())&&(r.allergiesProblemListComponent=o.first)}},decls:31,vars:2,consts:[["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",1,"long-tooltip",3,"disableRipple","click"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Allergy List Approach (AllergyIntolerance FHIR resource)"],[3,"newProblem"],["label","Problem List Approach (Condition FHIR resource)"]],template:function(i,r){if(1&i&&(_(0,"div",0)(1,"h3"),k(2,"Allergy, Hypersensitivity and Intolerance "),_(3,"button",1)(4,"mat-icon"),k(5,"info"),v()(),_(6,"mat-menu",null,2)(8,"span",3),z("click",function(s){return s.stopPropagation()}),_(9,"h4"),k(10,"Allergy, Hypersensitivity and Intolerance Implementation Demo"),v(),_(11,"p"),k(12,"This is a demonstration of different implementation approaches for recording Allergies, Hypersensitivity and Intolerance."),v(),_(13,"p")(14,"b"),k(15,"Allergy list:"),v(),k(16," allergy or intolerance can be recorded in a specific section of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),v(),_(17,"p")(18,"b"),k(19,"Problem list:"),v(),k(20," Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),v(),_(21,"p"),k(22,"For more information check the "),_(23,"a",4),k(24,"Implementation Guide"),v(),k(25," developed by the SNOMED International Allergy Clinical Reference Group."),v()()()(),_(26,"mat-tab-group",5)(27,"mat-tab",6)(28,"app-allergies-allergy-list",7),z("newProblem",function(s){return r.addProblem(s)}),v()(),_(29,"mat-tab",8),_e(30,"app-allergies-problem-list"),v()()()),2&i){const o=Pt(7);w(3),E("matMenuTriggerFor",o),w(5),E("disableRipple",!0)}},dependencies:[Vs,co,lu,$a,du,qy,Ng,x8,Hpe],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}#guideLink[_ngcontent-%COMP%]{font-size:smaller}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return n})();function US(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,e?.has(i)?"important":""):n.removeProperty(i)}return n}function Nf(n,t){const e=t?"":"none";US(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function V8(n,t,e){US(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Ky(n,t){return t&&"none"!=t?n+" "+t:n}function U8(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function HS(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function zS(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function jS(n,t,e){const{top:i,bottom:r,left:o,right:s}=n;return e>=i&&e<=r&&t>=o&&t<=s}function Bg(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function H8(n,t,e,i){const{top:r,right:o,bottom:s,left:a,width:c,height:l}=n,d=c*t,u=l*t;return i>r-u&&ia-d&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:zS(e)})})}handleScroll(t){const e=fs(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let o,s;if(e===this._document){const l=this.getViewportScrollPosition();o=l.top,s=l.left}else o=e.scrollTop,s=e.scrollLeft;const a=r.top-o,c=r.left-s;return this.positions.forEach((l,d)=>{l.clientRect&&e!==d&&e.contains(d)&&Bg(l.clientRect,a,c)}),r.top=o,r.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function j8(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;rNf(i,e)))}constructor(t,e,i,r,o,s){this._config=e,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new Me,this._pointerMoveSubscription=lt.EMPTY,this._pointerUpSubscription=lt.EMPTY,this._scrollSubscription=lt.EMPTY,this._resizeSubscription=lt.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new Me,this.started=new Me,this.released=new Me,this.ended=new Me,this.entered=new Me,this.exited=new Me,this.dropped=new Me,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){const c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const c=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(c.x-this._pickupPositionOnPage.x)+Math.abs(c.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),m=this._dropContainer;if(!f)return void this._endDragSequence(a);(!m||!m.isDragging()&&!m.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const l=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(l),this._dropContainer)this._updateActiveDropContainer(l,c);else{const d=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=l.x-d.x+this._passiveTransform.x,u.y=l.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:l,event:a,distance:this._getDragDistance(l),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new z8(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>Mi(i)),this._handles.forEach(i=>Nf(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Mi(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Xy),e.addEventListener("touchstart",this._pointerDown,q8),e.addEventListener("dragstart",this._nativeDragStart,Xy)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Mi(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),Nf(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Nf(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){Vg(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,r=i.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(s,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),V8(i,!1,$S),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=Vg(e),o=!r&&0!==e.button,s=this._rootElement,a=fs(e),c=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),l=r?ry(e):iy(e);if(a&&a.draggable&&"mousedown"===e.type&&e.preventDefault(),i||o||c||l)return;if(this._handles.length){const h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=zS(this._boundaryElement));const d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,t,e);const u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){V8(this._rootElement,!0,$S),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),o=this._getDragDistance(r),s=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const o=t.matchSize?this._initialClientRect:null,s=t.viewContainer.createEmbeddedView(i,t.context);s.detectChanges(),r=K8(s,this._document),this._previewRef=s,t.matchSize?X8(r,o):r.style.transform=Yy(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=j8(this._rootElement),X8(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return US(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},$S),Nf(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>r.classList.add(o)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function jpe(n){const t=getComputedStyle(n),e=HS(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),o=HS(t,"transition-duration"),s=HS(t,"transition-delay");return U8(o[r])+U8(s[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||fs(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=K8(this._placeholderRef,this._document)):i=j8(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){const r=e===this._rootElement?null:e,o=r?r.getBoundingClientRect():t,s=Vg(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-t.left+(s.pageX-o.left-a.left),y:o.top-t.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=Vg(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,o=i.pageY-e.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialClientRect,this._pickupPositionInElement):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:l}=this._getPreviewRect(),d=a.top+s,u=a.bottom-(l-s);i=Q8(i,a.left+o,a.right-(c-o)),r=Q8(r,d,u)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Nf(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Xy),t.removeEventListener("touchstart",this._pointerDown,q8),t.removeEventListener("dragstart",this._nativeDragStart,Xy)}_applyRootElementTransform(t,e){const i=Yy(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Ky(i,this._initialTransform)}_applyPreviewTransform(t,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=Yy(t,e);this._preview.style.transform=Ky(r,i)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,c=i.bottom-r.bottom;r.width>i.width?(o>0&&(t+=o),s>0&&(t-=s)):t=0,r.height>i.height?(a>0&&(e+=a),c>0&&(e-=c)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:Vg(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=fs(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Bg(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=RT(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Mi(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function Yy(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function Q8(n,t,e){return Math.max(t,Math.min(e,n))}function Vg(n){return"t"===n.type[0]}function K8(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function X8(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=Yy(t.left,t.top)}function GS(n,t,e){const i=Ug(t,n.length-1),r=Ug(e,n.length-1);if(i===r)return;const o=n[i],s=r0)return null;const a="horizontal"===this.orientation,c=o.findIndex(p=>p.drag===t),l=o[s],u=l.clientRect,h=c>s?1:-1,f=this._getItemOffsetPx(o[c].clientRect,u,h),m=this._getSiblingOffsetPx(c,o,h),g=o.slice();return GS(o,c,s),o.forEach((p,b)=>{if(g[b]===p)return;const C=p.drag===t,x=C?f:m,D=C?t.getPlaceholderElement():p.drag.getRootElement();p.offset+=x,a?(D.style.transform=Ky(`translate3d(${Math.round(p.offset)}px, 0, 0)`,p.initialTransform),Bg(p.clientRect,0,x)):(D.style.transform=Ky(`translate3d(0, ${Math.round(p.offset)}px, 0)`,p.initialTransform),Bg(p.clientRect,x,0))}),this._previousSwap.overlaps=jS(u,e,i),this._previousSwap.drag=l.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:c,currentIndex:s}}enter(t,e,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(t,e,i):r,s=this._activeDraggables,a=s.indexOf(t),c=t.getPlaceholderElement();let l=s[o];if(l===t&&(l=s[o+1]),!l&&(null==o||-1===o||o-1&&s.splice(a,1),l&&!this._dragDropRegistry.isDragging(l)){const d=l.getRootElement();d.parentElement.insertBefore(c,d),s.splice(o,0,t)}else Mi(this._element).appendChild(c),s.push(t);c.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables.forEach(t=>{const e=t.getRootElement();if(e){const i=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{Bg(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const t="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:zS(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){const r="horizontal"===this.orientation;let o=r?e.left-t.left:e.top-t.top;return-1===i&&(o+=r?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this.orientation,o=e[t].clientRect,s=e[t+-1*i];let a=o[r?"width":"height"]*i;if(s){const c=r?"left":"top",l=r?"right":"bottom";-1===i?a-=s.clientRect[c]-o[l]:a+=o[c]-s.clientRect[l]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const s=i[i.length-1].clientRect;return r?t>=s.right:e>=s.bottom}{const s=i[0].clientRect;return r?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>a!==t&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?e>=Math.floor(c.left)&&e=Math.floor(c.top)&&i!0,this.sortPredicate=()=>!0,this.beforeStarted=new Me,this.entered=new Me,this.exited=new Me,this.dropped=new Me,this.sorted=new Me,this.receivingStarted=new Me,this.receivingStopped=new Me,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=lt.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new Me,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function zpe(n=0,t=hg){return n<0&&(n=0),yg(n,n,t)}(0,I5).pipe(St(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=Mi(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new z8(i),this._sortStrategy=new qpe(this.element,e),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,o,s,a,c={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._sortStrategy.direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._sortStrategy.orientation=t,this}withScrollableParents(t){const e=Mi(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!H8(this._clientRect,.05,e,i))return;const o=this._sortStrategy.sort(t,e,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||H8(s.clientRect,.05,t,e)&&([r,o]=function Kpe(n,t,e,i){const r=J8(t,i),o=e6(t,e);let s=0,a=0;if(r){const c=n.scrollTop;1===r?c>0&&(s=1):n.scrollHeight-c>n.clientHeight&&(s=2)}if(o){const c=n.scrollLeft;1===o?c>0&&(a=1):n.scrollWidth-c>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,t,e),(r||o)&&(i=a))}),!r&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};r=J8(c,e),o=e6(c,t),i=window}i&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=Mi(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=Mi(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_reset(){this._isDragging=!1;const t=Mi(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,e){return null!=this._clientRect&&jS(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(r=>r._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!jS(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const o=Mi(this.element);return r===o||o.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=RT(Mi(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function J8(n,t){const{top:e,bottom:i,height:r}=n,o=r*Z8;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}function e6(n,t){const{left:e,right:i,width:r}=n,o=r*Z8;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}const Zy=pa({passive:!1,capture:!0});let Xpe=(()=>{class n{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new Me,this.pointerUp=new Me,this.scroll=new Me,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Zy)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Zy)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:Zy}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:Zy}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new Dn(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),oi(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(Q(Xe),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ype={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let WS=(()=>{class n{constructor(e,i,r,o){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(e,i=Ype){return new Wpe(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new Qpe(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Xe),Q(_a),Q(Xpe))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const qS=new ae("CDK_DRAG_PARENT"),QS=new ae("CdkDropListGroup"),t6=new ae("CDK_DRAG_CONFIG");let Jpe=0;const n6=new ae("CdkDropList");let KS=(()=>{class n{get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=Qe(e)}constructor(e,i,r,o,s,a,c){this.element=e,this._changeDetectorRef=r,this._scrollDispatcher=o,this._dir=s,this._group=a,this._destroyed=new Me,this.connectedTo=[],this.id="cdk-drop-list-"+Jpe++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new De,this.entered=new De,this.exited=new De,this.sorted=new De,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,c&&this._assignDefaults(c),this._dropListRef.enterPredicate=(l,d)=>this.enterPredicate(l.data,d.data),this._dropListRef.sortPredicate=(l,d,u)=>this.sortPredicate(l,d.data,u.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),a&&a._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=n._dropLists.indexOf(this);e>-1&&n._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(er(this._dir.value),St(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{const i=fg(this.connectedTo).map(r=>"string"==typeof r?n._dropLists.find(s=>s.id===r):r);if(this._group&&this._group._items.forEach(r=>{-1===i.indexOf(r)&&i.push(r)}),!this._scrollableParentsResolved){const r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(o=>o.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=Qe(this.sortingDisabled),e.autoScrollDisabled=Qe(this.autoScrollDisabled),e.autoScrollStep=gr(this.autoScrollStep,2),e.connectedTo(i.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),oi(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){const{lockAxis:i,draggingDisabled:r,sortingDisabled:o,listAutoScrollDisabled:s,listOrientation:a}=e;this.disabled=r??!1,this.sortingDisabled=o??!1,this.autoScrollDisabled=s??!1,this.orientation=a||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}}return n._dropLists=[],n.\u0275fac=function(e){return new(e||n)(y(Ne),y(WS),y(an),y(ou),y(Hi,8),y(QS,12),y(t6,8))},n.\u0275dir=X({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,i){2&e&&(vt("id",i.id),ot("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],data:["cdkDropListData","data"],orientation:["cdkDropListOrientation","orientation"],id:"id",lockAxis:["cdkDropListLockAxis","lockAxis"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[tt([{provide:QS,useValue:void 0},{provide:n6,useExisting:n}])]}),n})();const XS=new ae("CdkDragHandle");let i6=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=Qe(e),this._stateChanges.next(this)}constructor(e,i){this.element=e,this._stateChanges=new Me,this._disabled=!1,this._parentDrag=i}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(qS,12))},n.\u0275dir=X({type:n,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},standalone:!0,features:[tt([{provide:XS,useExisting:n}])]}),n})();const r6=new ae("CdkDragPlaceholder"),o6=new ae("CdkDragPreview");let YS=(()=>{class n{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=Qe(e),this._dragRef.disabled=this._disabled}constructor(e,i,r,o,s,a,c,l,d,u,h){this.element=e,this.dropContainer=i,this._ngZone=o,this._viewContainerRef=s,this._dir=c,this._changeDetectorRef=d,this._selfHandle=u,this._parentDrag=h,this._destroyed=new Me,this.started=new De,this.released=new De,this.ended=new De,this.entered=new De,this.exited=new De,this.dropped=new De,this.moved=new Dn(f=>{const m=this._dragRef.moved.pipe(ct(g=>({source:this,pointerPosition:g.pointerPosition,event:g.event,delta:g.delta,distance:g.distance}))).subscribe(f);return()=>{m.unsubscribe()}}),this._dragRef=l.createDrag(e,{dragStartThreshold:a&&null!=a.dragStartThreshold?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&null!=a.pointerDirectionChangeThreshold?a.pointerDirectionChangeThreshold:5,zIndex:a?.zIndex}),this._dragRef.data=this,n._dragInstances.push(this),a&&this._assignDefaults(a),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(An(1),St(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(e){const i=e.rootElementSelector,r=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=n._dragInstances.indexOf(this);e>-1&&n._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const e=this.element.nativeElement;let i=e;this.rootElementSelector&&(i=void 0!==e.closest?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){const e=this.boundaryElement;return e?"string"==typeof e?this.element.nativeElement.closest(e):Mi(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const i=this._dir,r=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof r&&r?r:gr(r),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(An(1)).subscribe(()=>{if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains("cdk-drag")){e.withParent(n._dragInstances.find(r=>r.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){const{lockAxis:i,dragStartDelay:r,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:c,rootElementSelector:l,previewContainer:d}=e;this.disabled=c??!1,this.dragStartDelay=r||0,i&&(this.lockAxis=i),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),l&&(this.rootElementSelector=l),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.changes.pipe(er(this._handles),gi(e=>{const i=e.filter(r=>r._parentDrag===this).map(r=>r.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Ji(e=>oi(...e.map(i=>i._stateChanges.pipe(er(i))))),St(this._destroyed)).subscribe(e=>{const i=this._dragRef,r=e.element.nativeElement;e.disabled?i.disableHandle(r):i.enableHandle(r)})}}return n._dragInstances=[],n.\u0275fac=function(e){return new(e||n)(y(Ne),y(n6,12),y(gt),y(Xe),y(ii),y(t6,8),y(Hi,8),y(WS),y(an),y(XS,10),y(qS,12))},n.\u0275dir=X({type:n,selectors:[["","cdkDrag",""]],contentQueries:function(e,i,r){if(1&e&&(qt(r,o6,5),qt(r,r6,5),qt(r,XS,5)),2&e){let o;Ae(o=Ie())&&(i._previewTemplate=o.first),Ae(o=Ie())&&(i._placeholderTemplate=o.first),Ae(o=Ie())&&(i._handles=o)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,i){2&e&&ot("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[tt([{provide:qS,useExisting:n}]),jn]}),n})(),ige=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[WS],imports:[Vc]}),n})();function rge(n,t){}class Jy{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let s6=(()=>{class n extends ly{constructor(e,i,r,o,s,a,c,l){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=s,this._ngZone=a,this._overlayRef=c,this._focusMonitor=l,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();const u=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),u},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){const e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const e=this._config.restoreFocus;let i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=Kv(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const e=this._elementRef.nativeElement,i=Kv();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Kv())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(gt,8),y(Jy),y(mg),y(Xe),y(wg),y(ms))},n.\u0275cmp=Ve({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&pt(Bc,7),2&e){let r;Ae(r=Ie())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&vt("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[ye],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&A(0,rge,0,0,"ng-template",0)},dependencies:[Bc],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})();class ZS{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Me,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!so(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{!1!==e.closeOnOverlayDetachments&&this.close()})}close(t,e){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}}const a6=new ae("DialogScrollStrategy"),oge=new ae("DialogData"),sge=new ae("DefaultDialogConfig"),cge={provide:a6,deps:[ao],useFactory:function age(n){return()=>n.scrollStrategies.block()}};let lge=0,c6=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,i,r,o,s,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Me,this._afterOpenedAtThisLevel=new Me,this._ariaHiddenElements=new Map,this.afterAllClosed=df(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(er(void 0))),this._scrollStrategy=a}open(e,i){(i={...this._defaultOptions||new Jy,...i}).id=i.id||"cdk-dialog-"+lge++,i.id&&this.getDialogById(i.id);const o=this._getOverlayConfig(i),s=this._overlay.create(o),a=new ZS(s,i),c=this._attachContainer(s,a,i);return a.containerInstance=c,this._attachDialogContent(e,a,c,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){JS(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){JS(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),JS(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const i=new Df({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){const o=r.injector||r.viewContainerRef?.injector,s=[{provide:Jy,useValue:r},{provide:ZS,useValue:i},{provide:wg,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=s6;const c=new Sf(a,r.viewContainerRef,Ni.create({parent:o||this._injector,providers:s}),r.componentFactoryResolver);return e.attach(c).instance}_attachDialogContent(e,i,r,o){if(e instanceof Un){const s=this._createInjector(o,i,r,void 0);let a={$implicit:o.data,dialogRef:i};o.templateContext&&(a={...a,..."function"==typeof o.templateContext?o.templateContext():o.templateContext}),r.attachTemplatePortal(new Lc(e,null,a,s))}else{const s=this._createInjector(o,i,r,this._injector),a=r.attachComponentPortal(new Sf(e,o.viewContainerRef,s,o.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(e,i,r,o){const s=e.injector||e.viewContainerRef?.injector,a=[{provide:oge,useValue:e.data},{provide:ZS,useValue:i}];return e.providers&&("function"==typeof e.providers?a.push(...e.providers(i,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get(Hi,null,{optional:!0}))&&a.push({provide:Hi,useValue:{value:e.direction,change:nt()}}),Ni.create({parent:s||o,providers:a})}_removeOpenDialog(e,i){const r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const e=this._overlayContainer.getContainerElement();if(e.parentElement){const i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){const o=i[r];o!==e&&"SCRIPT"!==o.nodeName&&"STYLE"!==o.nodeName&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(Ni),Q(sge,8),Q(n,12),Q(hy),Q(a6))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function JS(n,t){let e=n.length;for(;e--;)t(n[e])}let dge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[c6,cge],imports:[au,ru,GT,ru]}),n})();function uge(n,t){}class ex{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const eD="mdc-dialog--open",l6="mdc-dialog--opening",d6="mdc-dialog--closing";let mge=(()=>{class n extends s6{constructor(e,i,r,o,s,a,c,l){super(e,i,r,o,s,a,c,l),this._animationStateChanged=new De}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(gt,8),y(ex),y(mg),y(Xe),y(wg),y(ms))},n.\u0275cmp=Ve({type:n,selectors:[["ng-component"]],features:[ye],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();const u6="--mat-dialog-transition-duration";function h6(n){return null==n?null:"number"==typeof n?n:n.endsWith("ms")?gr(n.substring(0,n.length-2)):n.endsWith("s")?1e3*gr(n.substring(0,n.length-1)):"0"===n?0:null}let pge=(()=>{class n extends mge{constructor(e,i,r,o,s,a,c,l,d){super(e,i,r,o,s,a,c,d),this._animationMode=l,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?h6(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?h6(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._openAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._closeAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._openAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(u6,`${this._openAnimationDuration}ms`),this._hostElement.classList.add(l6),this._hostElement.classList.add(eD),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(eD),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(eD),this._animationsEnabled?(this._hostElement.style.setProperty(u6,`${this._openAnimationDuration}ms`),this._hostElement.classList.add(d6),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(l6),this._hostElement.classList.remove(d6)}_waitForAnimationToComplete(e,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(gt,8),y(ex),y(mg),y(Xe),y(wg),y(Jn,8),y(ms))},n.\u0275cmp=Ve({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,i){2&e&&(Ba("id",i._config.id),vt("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),ot("_mat-animation-noopable",!i._animationsEnabled))},features:[ye],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1),A(2,uge,0,0,"ng-template",2),v()())},dependencies:[Bc],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title,.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__actions,.mat-mdc-dialog-container.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title{border-bottom-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, "Arial");line-height:var(--mdc-dialog-subhead-line-height, 14px);font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500);letter-spacing:var(--mdc-dialog-subhead-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, black)}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, "Arial");line-height:var(--mdc-dialog-supporting-text-line-height, 14px);font-size:var(--mdc-dialog-supporting-text-size, 14px);font-weight:var(--mdc-dialog-supporting-text-weight, 500);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, black)}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2}),n})();class Ql{constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new Me,this._beforeClosed=new Me,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(mn(r=>"opened"===r.state),An(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(mn(r=>"closed"===r.state),An(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),oi(this.backdropClick(),this.keydownEvents().pipe(mn(r=>27===r.keyCode&&!this.disableClose&&!so(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),f6(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(mn(e=>"closing"===e.state),An(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function f6(n,t,e){return n._closeInteractionType=t,n.close(e)}const tx=new ae("MatMdcDialogData"),gge=new ae("mat-mdc-dialog-default-options"),m6=new ae("mat-mdc-dialog-scroll-strategy"),bge={provide:m6,deps:[ao],useFactory:function _ge(n){return()=>n.scrollStrategies.block()}};let vge=0,yge=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(e,i,r,o,s,a,c,l,d,u){this._overlay=e,this._defaultOptions=r,this._parentDialog=o,this._dialogRefConstructor=c,this._dialogContainerType=l,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Me,this._afterOpenedAtThisLevel=new Me,this._idPrefix="mat-dialog-",this.dialogConfigClass=ex,this.afterAllClosed=df(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(er(void 0))),this._scrollStrategy=a,this._dialog=i.get(c6)}open(e,i){let r;(i={...this._defaultOptions||new ex,...i}).id=i.id||`${this._idPrefix}${vge++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const o=this._dialog.open(e,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:Jy,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(s,a,c)=>(r=new this._dialogRefConstructor(s,i,c),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return n.\u0275fac=function(e){Fa()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Lf=(()=>{class n extends yge{constructor(e,i,r,o,s,a,c,l){super(e,i,o,a,c,s,Ql,pge,tx,l),this._idPrefix="mat-mdc-dialog-"}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(Ni),Q(Np,8),Q(gge,8),Q(m6),Q(n,12),Q(hy),Q(Jn,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),xge=0,Hg=(()=>{class n{constructor(e,i,r){this.dialogRef=e,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=g6(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){f6(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(e){return new(e||n)(y(Ql,8),y(Ne),y(Lf))},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){1&e&&z("click",function(o){return i._onButtonClick(o)}),2&e&&vt("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[jn]}),n})(),p6=(()=>{class n{constructor(e,i,r){this._dialogRef=e,this._elementRef=i,this._dialog=r,this.id="mat-mdc-dialog-title-"+xge++}ngOnInit(){this._dialogRef||(this._dialogRef=g6(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const e=this._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=this.id)})}}return n.\u0275fac=function(e){return new(e||n)(y(Ql,8),y(Ne),y(Lf))},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,i){2&e&&Ba("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),nx=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),n})(),ix=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-mdc-dialog-actions-align-center","center"===i.align)("mat-mdc-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function g6(n,t){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(i=>i.id===e.id):null}let wge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[Lf,bge],imports:[dge,au,ru,Ft,Ft]}),n})(),Cge=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,this.localEcl="",this.localEcl=i.ecl}onNoClick(){this.dialogRef.close()}eclChanged(e){this.data.ecl=e?.detail[0]}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ql),y(tx))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-ecl-builder-dialog"]],decls:7,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"full-height"],["apiurl","https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct","branch","MAIN/2023-01-31","v-on:eclOutput","eclChange",3,"eclstring","eclOutput"],["mat-dialog-actions","",1,"actions"],["mat-flat-button","","color","accent","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(i,r){1&i&&(_(0,"h1",0),k(1,"ECL Builder"),v(),_(2,"div",1)(3,"snomed-ecl-builder",2),z("eclOutput",function(s){return r.eclChanged(s)}),v()(),_(4,"div",3)(5,"button",4),k(6,"Ok"),v()()),2&i&&(w(3),Xh("eclstring",r.localEcl),w(2),E("mat-dialog-close",r.data))},dependencies:[Fo,Hg,p6,nx,ix],styles:[".full-height[_ngcontent-%COMP%]{height:78%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}return n})();const b6=new ae("CdkAccordion");let kge=0,Ege=(()=>{class n{get expanded(){return this._expanded}set expanded(e){e=Qe(e),this._expanded!==e&&(this._expanded=e,this.expandedChange.emit(e),e?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){this._disabled=Qe(e)}constructor(e,i,r){this.accordion=e,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=lt.EMPTY,this.closed=new De,this.opened=new De,this.destroyed=new De,this.expandedChange=new De,this.id="cdk-accordion-child-"+kge++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((o,s)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===s&&this.id!==o&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}}return n.\u0275fac=function(e){return new(e||n)(y(b6,12),y(an),y(CT))},n.\u0275dir=X({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[tt([{provide:b6,useValue:void 0}])]}),n})(),Tge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const Sge=["body"];function Dge(n,t){}const Age=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Ige=["mat-expansion-panel-header","*","mat-action-row"];function Mge(n,t){1&n&&_e(0,"span",2),2&n&&E("@indicatorRotate",O()._getExpandedState())}const Rge=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Fge=["mat-panel-title","mat-panel-description","*"],v6=new ae("MAT_ACCORDION"),y6="225ms cubic-bezier(0.4,0.0,0.2,1)",x6={indicatorRotate:$n("indicatorRotate",[pn("collapsed, void",ze({transform:"rotate(0deg)"})),pn("expanded",ze({transform:"rotate(180deg)"})),Qt("expanded <=> collapsed, void => collapsed",Gt(y6))]),bodyExpansion:$n("bodyExpansion",[pn("collapsed, void",ze({height:"0px",visibility:"hidden"})),pn("expanded",ze({height:"*",visibility:"visible"})),Qt("expanded <=> collapsed, void => collapsed",Gt(y6))])},w6=new ae("MAT_EXPANSION_PANEL");let Pge=(()=>{class n{constructor(e,i){this._template=e,this._expansionPanel=i}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(w6,8))},n.\u0275dir=X({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]}),n})(),Oge=0;const C6=new ae("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let k6=(()=>{class n extends Ege{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=Qe(e)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}constructor(e,i,r,o,s,a,c){super(e,i,r),this._viewContainerRef=o,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new De,this.afterCollapse=new De,this._inputChanges=new Me,this._headerId="mat-expansion-panel-header-"+Oge++,this._bodyAnimationDone=new Me,this.accordion=e,this._document=s,this._bodyAnimationDone.pipe(ja((l,d)=>l.fromState===d.fromState&&l.toState===d.toState)).subscribe(l=>{"void"!==l.fromState&&("expanded"===l.toState?this.afterExpand.emit():"collapsed"===l.toState&&this.afterCollapse.emit())}),c&&(this.hideToggle=c.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(er(null),mn(()=>this.expanded&&!this._portal),An(1)).subscribe(()=>{this._portal=new Lc(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const e=this._document.activeElement,i=this._body.nativeElement;return e===i||i.contains(e)}return!1}}return n.\u0275fac=function(e){return new(e||n)(y(v6,12),y(an),y(CT),y(ii),y(gt),y(Jn,8),y(C6,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(e,i,r){if(1&e&&qt(r,Pge,5),2&e){let o;Ae(o=Ie())&&(i._lazyContent=o.first)}},viewQuery:function(e,i){if(1&e&&pt(Sge,5),2&e){let r;Ae(r=Ie())&&(i._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,i){2&e&&ot("mat-expanded",i.expanded)("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[tt([{provide:v6,useValue:void 0},{provide:w6,useExisting:n}]),ye,jn],ngContentSelectors:Ige,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(e,i){1&e&&(Rn(Age),dt(0),_(1,"div",0,1),z("@bodyExpansion.done",function(o){return i._bodyAnimationDone.next(o)}),_(3,"div",2),dt(4,1),A(5,Dge,0,0,"ng-template",3),v(),dt(6,2),v()),2&e&&(w(1),E("@bodyExpansion",i._getExpandedState())("id",i.id),vt("aria-labelledby",i._headerId),w(4),E("cdkPortalOutlet",i._portal))},dependencies:[Bc],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[x6.bodyExpansion]},changeDetection:0}),n})();class Nge{}const Lge=gg(Nge);let Bge=(()=>{class n extends Lge{constructor(e,i,r,o,s,a,c){super(),this.panel=e,this._element=i,this._focusMonitor=r,this._changeDetectorRef=o,this._animationMode=a,this._parentChangeSubscription=lt.EMPTY;const l=e.accordion?e.accordion._stateChanges.pipe(mn(d=>!(!d.hideToggle&&!d.togglePosition))):ns;this.tabIndex=parseInt(c||"")||0,this._parentChangeSubscription=oi(e.opened,e.closed,l,e._inputChanges.pipe(mn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(mn(()=>e._containsFocus())).subscribe(()=>r.focusVia(i,"program")),s&&(this.expandedHeight=s.expandedHeight,this.collapsedHeight=s.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:so(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}}focus(e,i){e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return n.\u0275fac=function(e){return new(e||n)(y(k6,1),y(Ne),y(ms),y(an),y(C6,8),y(Jn,8),Ms("tabindex"))},n.\u0275cmp=Ve({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&z("click",function(){return i._toggle()})("keydown",function(o){return i._keydown(o)}),2&e&&(vt("id",i.panel._headerId)("tabindex",i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Ai("height",i._getHeaderHeight()),ot("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after","after"===i._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===i._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[ye],ngContentSelectors:Fge,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,i){1&e&&(Rn(Rge),_(0,"span",0),dt(1),dt(2,1),dt(3,2),v(),A(4,Mge,1,1,"span",1)),2&e&&(ot("mat-content-hide-toggle",!i._showToggle()),w(4),E("ngIf",i._showToggle()))},dependencies:[ri],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[x6.indicatorRotate]},changeDetection:0}),n})(),Vge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),n})(),Uge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),n})(),Hge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft,Tge,ru]}),n})();function zge(n,t){if(1&n){const e=Le();_(0,"mat-option",2),z("click",function(){return he(e),fe(O().optionClicked())}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e),w(1),it(" ",e.display," ")}}let jge=(()=>{class n{constructor(e){this.terminologyService=e,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>this.options=e.expansion.contains)}optionClicked(){this.selectionChange.emit(this.selectedOptions)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-dropdown-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:7,vars:5,consts:[[3,"multiple","ngModel","ngModelChange"],[3,"value","click",4,"ngFor","ngForOf"],[3,"value","click"]],template:function(i,r){1&i&&(_(0,"mat-form-field")(1,"mat-label"),k(2),v(),_(3,"mat-select",0),z("ngModelChange",function(s){return r.selectedOptions=s}),A(4,zge,2,2,"mat-option",1),v(),_(5,"mat-hint"),k(6),v()()),2&i&&(w(2),Ze(r.binding.title),w(1),E("multiple","Select (Multiple)"==r.binding.type)("ngModel",r.selectedOptions),w(1),E("ngForOf",r.options),w(2),Ze(r.binding.note))},dependencies:[io,ba,gs,gu,Ll,qo,Lg,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();const $ge=["input"],Gge=["*"];let E6=0;class T6{constructor(t,e){this.source=t,this.value=e}}const Wge={provide:Hr,useExisting:hn(()=>tD),multi:!0},S6=new ae("MatRadioGroup"),qge=new ae("mat-radio-default-options",{providedIn:"root",factory:function Qge(){return{color:"accent"}}});let Kge=(()=>{class n{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition="before"===e?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=Qe(e),this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=Qe(e),this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+E6++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new De}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new T6(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}}return n.\u0275fac=function(e){return new(e||n)(y(an))},n.\u0275dir=X({type:n,inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"}}),n})();class Xge{constructor(t){this._elementRef=t}}const Yge=Ol(gg(Xge));let Zge=(()=>{class n extends Yge{get checked(){return this._checked}set checked(e){const i=Qe(e);this._checked!==i&&(this._checked=i,i&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!i&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),i&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(e){this._setDisabled(Qe(e))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=Qe(e)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,r,o,s,a,c,l){super(i),this._changeDetector=r,this._focusMonitor=o,this._radioDispatcher=s,this._providerOverride=c,this._uniqueId="mat-radio-"+ ++E6,this.id=this._uniqueId,this.change=new De,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=e,this._noopAnimations="NoopAnimations"===a,l&&(this.tabIndex=gr(l,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new T6(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){const i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){const e=this.radioGroup;let i;if(i=e&&e.selected&&!this.disabled?e.selected===this?this.tabIndex:-1:this.tabIndex,i!==this._previousTabIndex){const r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",i+""),this._previousTabIndex=i)}}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt($ge,5),2&e){let r;Ae(r=Ie())&&(i._inputElement=r.first)}},inputs:{id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},features:[ye]}),n})(),tD=(()=>{class n extends Kge{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["mat-radio-group"]],contentQueries:function(e,i,r){if(1&e&&qt(r,nD,5),2&e){let o;Ae(o=Ie())&&(i._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],exportAs:["matRadioGroup"],features:[tt([Wge,{provide:S6,useExisting:n}]),ye]}),n})(),nD=(()=>{class n extends Zge{constructor(e,i,r,o,s,a,c,l){super(e,i,r,o,s,a,c,l)}}return n.\u0275fac=function(e){return new(e||n)(y(S6,8),y(Ne),y(an),y(ms),y(CT),y(Jn,8),y(qge,8),Ms("tabindex"))},n.\u0275cmp=Ve({type:n,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(e,i){1&e&&z("focus",function(){return i._inputElement.nativeElement.focus()}),2&e&&(vt("id",i.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),ot("mat-primary","primary"===i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("mat-mdc-radio-checked",i.checked)("_mat-animation-noopable",i._noopAnimations))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[ye],ngContentSelectors:Gge,decls:13,vars:17,consts:[[1,"mdc-form-field"],["formField",""],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"id","checked","disabled","required","change"],["input",""],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[3,"for"]],template:function(e,i){if(1&e&&(Rn(),_(0,"div",0,1)(2,"div",2)(3,"div",3),z("click",function(o){return i._onTouchTargetClick(o)}),v(),_(4,"input",4,5),z("change",function(o){return i._onInputInteraction(o)}),v(),_(6,"div",6),_e(7,"div",7)(8,"div",8),v(),_(9,"div",9),_e(10,"div",10),v()(),_(11,"label",11),dt(12),v()()),2&e){const r=Pt(1);ot("mdc-form-field--align-end","before"==i.labelPosition),w(2),ot("mdc-radio--disabled",i.disabled),w(2),E("id",i.inputId)("checked",i.checked)("disabled",i.disabled)("required",i.required),vt("name",i.name)("value",i.value)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby),w(5),E("matRippleTrigger",r)("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0),w(2),E("for",i.inputId)}},dependencies:[Bs],styles:['.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, #000)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, #000)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);right:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);left:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-mdc-radio-ripple-color, transparent)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-mdc-radio-checked-ripple-color, transparent)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-mdc-radio-checked-ripple-color, transparent)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0}),n})(),Jge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Br,Nl,Ft]}),n})();function e_e(n,t){if(1&n){const e=Le();_(0,"mat-radio-button",3),z("click",function(){const o=he(e).$implicit;return fe(O().optionSelected(o))}),k(1),v()}if(2&n){const e=t.$implicit;E("value",e.code),w(1),it(" ",e.display," ")}}let t_e=(()=>{class n{constructor(e){this.terminologyService=e,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>this.options=e.expansion.contains)}optionSelected(e){this.selectionChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-radios-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:3,consts:[["aria-label","Select an option",1,"radio-group"],["class","radio-button",3,"value","click",4,"ngFor","ngForOf"],["id","hint"],[1,"radio-button",3,"value","click"]],template:function(i,r){1&i&&(_(0,"div"),k(1),v(),_(2,"mat-radio-group",0),A(3,e_e,2,2,"mat-radio-button",1),v(),_(4,"div",2),k(5),v()),2&i&&(w(1),Ze(r.binding.title),w(2),E("ngForOf",r.options),w(2),Ze(r.binding.note))},dependencies:[io,tD,nD],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:0}"]})}return n})(),n_e=(()=>{class n{constructor(e){this.terminologyService=e,this.textChange=new De,this.text=""}ngOnInit(){}onTextChange(e){this.text=e,this.textChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-textbox-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","placeholder","Enter text...",3,"ngModel","ngModelChange"]],template:function(i,r){1&i&&(_(0,"mat-form-field",0)(1,"mat-label"),k(2),v(),_(3,"textarea",1),z("ngModelChange",function(s){return r.text=s})("ngModelChange",function(s){return r.onTextChange(s)}),v(),_(4,"mat-hint"),k(5),v()()),2&i&&(w(2),Ze(r.binding.title),w(1),E("ngModel",r.text),w(2),Ze(r.binding.note))},dependencies:[ba,gs,gu,ql,Us,qo,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();const i_e=["input"],r_e=["label"],o_e=["*"],s_e=new ae("mat-checkbox-default-options",{providedIn:"root",factory:D6});function D6(){return{color:"accent",clickAction:"check-indeterminate"}}const a_e={provide:Hr,useExisting:hn(()=>I6),multi:!0};class c_e{}let l_e=0;const A6=D6(),d_e=gg(Pl(Ol(Oc(class{constructor(n){this._elementRef=n}}))));let u_e=(()=>{class n extends d_e{get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(e){this._required=Qe(e)}constructor(e,i,r,o,s,a,c){super(i),this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=c,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new De,this.indeterminateChange=new De,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||A6,this.color=this.defaultColor=this._options.color||A6.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`${e}${++l_e}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){const i=Qe(e);i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){const i=Qe(e);i!==this.disabled&&(this._disabled=i,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){const i=e!=this._indeterminate;this._indeterminate=Qe(e),i&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(i!==e&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const e=this._options?.clickAction;this.disabled||"noop"===e?!this.disabled&&"noop"===e&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==e&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if("NoopAnimations"===this._animationMode)return"";switch(e){case 0:if(1===i)return this._animationClasses.uncheckedToChecked;if(3==i)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===i?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===i?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===i?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){const i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&(pt(i_e,5),pt(r_e,5),pt(Bs,5)),2&e){let r;Ae(r=Ie())&&(i._inputElement=r.first),Ae(r=Ie())&&(i._labelElement=r.first),Ae(r=Ie())&&(i.ripple=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[ye]}),n})(),I6=(()=>{class n extends u_e{constructor(e,i,r,o,s,a){super("mat-mdc-checkbox-",e,i,r,o,s,a),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"}}focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){const i=new c_e;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_onInputClick(){super._handleInputClick()}_onTouchTargetClick(){super._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(Xe),Ms("tabindex"),y(Jn,8),y(s_e,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-mdc-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&(Ba("id",i.id),vt("tabindex",null)("aria-label",null)("aria-labelledby",null),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mdc-checkbox--disabled",i.disabled)("mat-mdc-checkbox-disabled",i.disabled)("mat-mdc-checkbox-checked",i.checked))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[tt([a_e]),ye],ngContentSelectors:o_e,decls:15,vars:19,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[3,"for"],["label",""]],template:function(e,i){if(1&e&&(Rn(),_(0,"div",0),z("click",function(o){return i._preventBubblingFromLabel(o)}),_(1,"div",1,2)(3,"div",3),z("click",function(){return i._onTouchTargetClick()}),v(),_(4,"input",4,5),z("blur",function(){return i._onBlur()})("click",function(){return i._onInputClick()})("change",function(o){return i._onInteractionEvent(o)}),v(),_e(6,"div",6),_(7,"div",7),xc(),_(8,"svg",8),_e(9,"path",9),v(),Eh(),_e(10,"div",10),v(),_e(11,"div",11),v(),_(12,"label",12,13),dt(14),v()()),2&e){const r=Pt(2);ot("mdc-form-field--align-end","before"==i.labelPosition),w(4),ot("mdc-checkbox--selected",i.checked),E("checked",i.checked)("indeterminate",i.indeterminate)("disabled",i.disabled)("id",i.inputId)("required",i.required)("tabIndex",i.tabIndex),vt("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby)("name",i.name)("value",i.value),w(7),E("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0),w(1),E("for",i.inputId)}},dependencies:[Bs],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:not([disabled])~.mdc-checkbox__ripple{opacity:.04;transform:scale(1);transition:opacity 80ms 0 cubic-bezier(0, 0, 0.2, 1),transform 80ms 0 cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:.16}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__native-control:focus:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, black)}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),M6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})(),m_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Nl,M6,Ft,M6]}),n})();function p_e(n,t){if(1&n){const e=Le();_(0,"mat-checkbox",3),z("click",function(){return he(e),fe(O().optionClicked())}),k(1),v()}if(2&n){const e=t.$implicit;Xh("formControlName",e.display),w(1),it(" ",e.display," ")}}let g_e=(()=>{class n{constructor(e,i){this.terminologyService=e,this._formBuilder=i,this.selectionChange=new De,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.options=[{display:this.binding.title}],this.options?.forEach(e=>{this.checkboxes.addControl(e.display,this._formBuilder.control(!1))})}optionClicked(){let e=[];e.push({title:this.binding.title,code:this.binding.ecl,value:this.checkboxes.value[this.binding.title]?this.present:this.absent}),this.selectionChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(o8))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-checkbox-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:4,vars:3,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","before",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","before",1,"check",3,"formControlName","click"]],template:function(i,r){1&i&&(_(0,"form",0),A(1,p_e,2,2,"mat-checkbox",1),_(2,"span",2),k(3),v()()),2&i&&(E("formGroup",r.checkboxes),w(1),E("ngForOf",r.options),w(2),Ze(r.binding.note))},dependencies:[io,Fg,qo,Sg,Wl,Pg,I6],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}return n})(),__e=(()=>{class n{constructor(e){this.terminologyService=e,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(e){this.value=e,this.textChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-integer-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter integer value...","pattern","^-?[0-9]\\d*$","title","Only integer values are allowed",3,"ngModel","ngModelChange"]],template:function(i,r){1&i&&(_(0,"mat-form-field",0)(1,"mat-label"),k(2),v(),_(3,"input",1),z("ngModelChange",function(s){return r.value=s})("ngModelChange",function(s){return r.onValueChange(s)}),v(),_(4,"mat-hint"),k(5),v()()),2&i&&(w(2),Ze(r.binding.title),w(1),E("ngModel",r.value),w(2),Ze(r.binding.note))},dependencies:[ba,gs,gu,ql,Us,By,qo,zy,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})(),b_e=(()=>{class n{constructor(e){this.terminologyService=e,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(e){this.value=e,this.textChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-decimal-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter decimal value...","pattern","^-?[0-9]*\\.?[0-9]+$","title","Only decimal values are allowed","step","any",3,"ngModel","ngModelChange"]],template:function(i,r){1&i&&(_(0,"mat-form-field",0)(1,"mat-label"),k(2),v(),_(3,"input",1),z("ngModelChange",function(s){return r.value=s})("ngModelChange",function(s){return r.onValueChange(s)}),v(),_(4,"mat-hint"),k(5),v()()),2&i&&(w(2),Ze(r.binding.title),w(1),E("ngModel",r.value),w(2),Ze(r.binding.note))},dependencies:[ba,gs,gu,ql,Us,By,qo,zy,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();const v_e=["newPanel"];function y_e(n,t){1&n&&(_(0,"mat-panel-description"),k(1," Click to add new binding "),v())}function x_e(n,t){if(1&n){const e=Le();_(0,"button",46),z("click",function(){let o;return he(e),fe(null==(o=O().newBindingForm.get("title"))?null:o.reset())}),_(1,"mat-icon"),k(2,"close"),v()()}}function w_e(n,t){1&n&&(_(0,"span"),k(1,"Restrict to Observables"),v())}function C_e(n,t){1&n&&(_(0,"span"),k(1,"Open to Observables + Findings + Procedures + Situations"),v())}function k_e(n,t){if(1&n&&(_(0,"mat-option",47),k(1),v()),2&n){const e=t.$implicit;E("value",e),w(1),it(" ",e," ")}}function E_e(n,t){if(1&n){const e=Le();_(0,"button",46),z("click",function(){let o;return he(e),fe(null==(o=O(2).newBindingForm.get("ecl"))?null:o.reset())}),_(1,"mat-icon"),k(2,"close"),v()()}}function T_e(n,t){if(1&n){const e=Le();_(0,"mat-form-field",12)(1,"mat-label"),k(2,"Answer options: ECL Expression"),v(),_e(3,"input",48),_(4,"a",49),z("click",function(){he(e);const r=O();let o;return fe(r.openEclBuilder(null==(o=r.newBindingForm.get("ecl"))?null:o.value,"ecl"))}),k(5,"ECL Builder"),v(),A(6,E_e,3,0,"button",14),_(7,"mat-error"),k(8),v()()}if(2&n){const e=O();let i;w(6),E("ngIf",null==(i=e.newBindingForm.get("ecl"))?null:i.value),w(2),Ze(e.getErrorMessage("ecl"))}}function S_e(n,t){1&n&&(_(0,"span"),k(1,"Restrict to Observables"),v())}function D_e(n,t){1&n&&(_(0,"span"),k(1,"Open to Observables + Findings + Procedures"),v())}function A_e(n,t){if(1&n){const e=Le();_(0,"mat-form-field",12),_e(1,"app-autocomplete-binding",50),_(2,"a",17),z("click",function(){return he(e),fe(O().toggleCheckboxBinding())}),A(3,S_e,2,0,"span",8),A(4,D_e,2,0,"span",8),v(),_(5,"mat-error"),k(6),v()()}if(2&n){const e=O();w(1),E("binding",e.checkboxBinding),w(2),E("ngIf",e.checkboxBinding.ecl===e.codeBindingAll.ecl),w(1),E("ngIf",e.checkboxBinding.ecl!=e.codeBindingAll.ecl),w(2),Ze(e.getErrorMessage("ecl"))}}function I_e(n,t){if(1&n){const e=Le();_(0,"button",46),z("click",function(){let o;return he(e),fe(null==(o=O(2).newBindingForm.get("note"))?null:o.reset())}),_(1,"mat-icon"),k(2,"close"),v()()}}function M_e(n,t){if(1&n&&(_(0,"mat-form-field",51)(1,"mat-label"),k(2,"Note"),v(),_e(3,"input",52),A(4,I_e,3,0,"button",14),_(5,"mat-error"),k(6),v()()),2&n){const e=O();let i;w(4),E("ngIf",null==(i=e.newBindingForm.get("note"))?null:i.value),w(2),Ze(e.getErrorMessage("note"))}}function R_e(n,t){if(1&n){const e=Le();_(0,"button",25),z("click",function(){return he(e),fe(O().addBinding())}),k(1,"Add binding"),v()}}function F_e(n,t){if(1&n){const e=Le();_(0,"button",25),z("click",function(){he(e);const r=O();return r.addBinding(),fe(r.clearOutput())}),k(1,"Update binding"),v()}}function P_e(n,t){if(1&n){const e=Le();_(0,"button",35),z("click",function(){he(e);const r=O();return fe(r.showRightContainer=!r.showRightContainer)}),k(1),v()}if(2&n){const e=O();w(1),it(" ",e.showRightContainer?"Close data panel":"Open data panel"," ")}}function O_e(n,t){1&n&&(_(0,"button",53),k(1," Download form "),v()),2&n&&(O(),E("matMenuTriggerFor",Pt(69)))}function N_e(n,t){if(1&n){const e=Le();_(0,"div",54)(1,"p",55),k(2),v(),_(3,"button",56),z("click",function(){return he(e),fe(O().titleEditMode=!0)}),_(4,"mat-icon"),k(5,"edit"),v()()()}if(2&n){const e=O();w(2),Ze(e.formTitle)}}const L_e=function(){return{standalone:!0}};function B_e(n,t){if(1&n){const e=Le();_(0,"div",54)(1,"form",57)(2,"mat-form-field")(3,"mat-label"),k(4,"Title"),v(),_(5,"input",58),z("ngModelChange",function(r){return he(e),fe(O().formTitle=r)})("ngModelChange",function(){return he(e),fe(O().refreshFhirQuestionnaire())}),v(),_(6,"button",46),z("click",function(){return he(e),fe(O().formTitle="")}),_(7,"mat-icon"),k(8,"close"),v()()()(),_(9,"button",56),z("click",function(){return he(e),fe(O().titleEditMode=!1)}),_(10,"mat-icon"),k(11,"save"),v()()()}if(2&n){const e=O();w(5),E("ngModel",e.formTitle)("ngModelOptions",us(2,L_e))}}function V_e(n,t){if(1&n){const e=Le();_(0,"app-autocomplete-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function U_e(n,t){if(1&n){const e=Le();_(0,"app-dropdown-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function H_e(n,t){if(1&n){const e=Le();_(0,"app-radios-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function z_e(n,t){if(1&n&&(_(0,"span",68),k(1),v()),2&n){const e=O().$implicit;w(1),Ze(e.title)}}function j_e(n,t){if(1&n){const e=Le();_(0,"app-textbox-binding",69),z("textChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function $_e(n,t){if(1&n){const e=Le();_(0,"app-integer-binding",69),z("textChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function G_e(n,t){if(1&n){const e=Le();_(0,"app-decimal-binding",69),z("textChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function W_e(n,t){if(1&n){const e=Le();_(0,"app-checkbox-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function q_e(n,t){if(1&n&&(_(0,"button",70)(1,"mat-icon"),k(2,"info"),v()()),2&n){const e=O().$implicit;E("matMenuTriggerFor",Pt(14))("disabled",!e.code&&!e.ecl)}}function Q_e(n,t){if(1&n&&(_(0,"span",3),z("click",function(i){return i.stopPropagation()}),_(1,"h4"),k(2,"Question terminology binding"),v(),_(3,"pre"),k(4),v()()),2&n){const e=O().$implicit;E("disableRipple",!0),w(4),qd("",null==e.code?null:e.code.code," |",null==e.code?null:e.code.display,"|")}}function K_e(n,t){if(1&n&&(_(0,"span",3),z("click",function(i){return i.stopPropagation()}),_(1,"h4"),k(2,"Answer terminology binding"),v(),_(3,"pre"),k(4),v()()),2&n){const e=O().$implicit;E("disableRipple",!0),w(4),Ze(e.ecl)}}function X_e(n,t){if(1&n){const e=Le();_(0,"div",59)(1,"div",60)(2,"mat-icon",61),k(3,"drag_indicator"),v(),A(4,V_e,1,1,"app-autocomplete-binding",62),A(5,U_e,1,1,"app-dropdown-binding",62),A(6,H_e,1,1,"app-radios-binding",62),A(7,z_e,2,1,"span",63),A(8,j_e,1,1,"app-textbox-binding",64),A(9,$_e,1,1,"app-integer-binding",64),A(10,G_e,1,1,"app-decimal-binding",64),A(11,W_e,1,1,"app-checkbox-binding",62),A(12,q_e,3,2,"button",65),_(13,"mat-menu",null,2),A(15,Q_e,5,3,"span",66),A(16,K_e,5,2,"span",66),v(),_(17,"button",56),z("click",function(){const o=he(e).index;return fe(O().bindings.splice(o,1))}),_(18,"mat-icon"),k(19,"delete"),v()(),_(20,"button",56),z("click",function(){const o=he(e).index;return fe(O().edit(o))}),_(21,"mat-icon"),k(22,"edit"),v()()()()}if(2&n){const e=t.$implicit;w(4),E("ngIf","Autocomplete"==e.type),w(1),E("ngIf","Select (Single)"==e.type||"Select (Multiple)"==e.type),w(1),E("ngIf","Options"==e.type),w(1),E("ngIf","Section header"==e.type),w(1),E("ngIf","Text box"==e.type),w(1),E("ngIf","Integer"==e.type),w(1),E("ngIf","Decimal"==e.type),w(1),E("ngIf","Checkbox"==e.type),w(1),E("ngIf","Section header"!=e.type),w(3),E("ngIf",e.code),w(1),E("ngIf",e.ecl)}}function Y_e(n,t){if(1&n){const e=Le();_(0,"div",74)(1,"button",75),z("click",function(){he(e);const r=O(2);return fe(r.saveOutput(r.outputStr))}),_e(2,"mat-icon",76),v(),_(3,"button",77),z("click",function(){he(e);const r=O(2);return fe(r.copyOutputToClipboard(r.outputStr))}),_e(4,"mat-icon",78),v()()}}const iD=function(){return{}};function Z_e(n,t){if(1&n&&(_(0,"div",71),A(1,Y_e,5,0,"div",72),_(2,"textarea",73),k(3," "),v()()),2&n){const e=O();w(1),E("ngIf",e.showRightContainer),w(1),E("options",us(4,iD))("lang","json")("innerHTML",e.responseStr,zd)}}function J_e(n,t){if(1&n){const e=Le();_(0,"div",74)(1,"button",75),z("click",function(){he(e);const r=O(2);return fe(r.saveBundleOutput(r.responseBundleStr))}),_e(2,"mat-icon",76),v(),_(3,"button",77),z("click",function(){he(e);const r=O(2);return fe(r.copyOutputToClipboard(r.responseBundleStr))}),_e(4,"mat-icon",78),v()()}}function e0e(n,t){if(1&n&&(_(0,"div",71),A(1,J_e,5,0,"div",72),_(2,"textarea",73),k(3," "),v()()),2&n){const e=O();w(1),E("ngIf",e.showRightContainer),w(1),E("options",us(4,iD))("lang","json")("innerHTML",e.responseBundleStr,zd)}}function t0e(n,t){if(1&n){const e=Le();_(0,"div",74)(1,"button",75),z("click",function(){he(e);const r=O(2);return fe(r.saveOutput(r.fhirQuestionnaireStr))}),_e(2,"mat-icon",76),v(),_(3,"button",77),z("click",function(){he(e);const r=O(2);return fe(r.copyOutputToClipboard(r.fhirQuestionnaireStr))}),_e(4,"mat-icon",78),v()()}}function n0e(n,t){if(1&n&&(_(0,"div",71),A(1,t0e,5,0,"div",72),_(2,"textarea",73),k(3," "),v()()),2&n){const e=O();w(1),E("ngIf",e.showRightContainer),w(1),E("options",us(4,iD))("lang","json")("innerHTML",e.fhirQuestionnaireStr,zd)}}let i0e=(()=>{class n{constructor(e,i,r){this.terminologyService=e,this.clipboard=i,this.dialog=r,this.formTitle="My new form",this.titleEditMode=!1,this.bindings=[],this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}",this.fhirQuestionnaire={},this.fhirQuestionnaireStr="{}",this.observableBinding={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingObservables={title:"Question code (Observables)",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingAll={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)| OR << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)| OR << 243796009 |Situation with explicit context (situation)|",value:""},this.codeBinding=this.codeBindingAll,this.checkboxBinding=JSON.parse(JSON.stringify(this.codeBindingAll)),this.example1={title:"Appendicitis data entry form (example)",bindings:[{title:"Diagnosis (type of appendicitis)",type:"Autocomplete",ecl:"<< 74400008 |Appendicitis|",value:"",note:"An autocomplete field to select between all descendants of appendicitis."},{title:"Clinical note",type:"Text box",ecl:"74400008 |Appendicitis|",value:"",note:"A text box for entering free text clinical information."},{title:"Appendicitis type",type:"Select (Single)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A single selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicitis type (M)",type:"Select (Multiple)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A multiple selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicectomy type",type:"Options",ecl:"<< 174036004 |Emergency appendectomy (procedure)|",value:"",note:"A radio buttons selector for the type of appendicectomy procedure."}]},this.newBindingForm=new Of({title:new Qo("",[Ff.required,Ff.maxLength(50)]),code:new Qo("",[]),type:new Qo("",[Ff.required]),ecl:new Qo("",[]),value:new Qo("",[]),note:new Qo("",[Ff.maxLength(500)])}),this.indexInEdit=-1,this.panelOpenState=!1,this.maxSelectCount=50,this.maxOptionsCount=10,this.controlTypes=["Autocomplete","Select (Single)","Select (Multiple)","Options","Section header","Text box","Integer","Decimal","Checkbox"].sort((o,s)=>o.localeCompare(s)),this.showRightContainer=!1}ngOnInit(){this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}get stateName(){return this.showRightContainer?"open":"closed"}addBinding(){var e=this;return xe(function*(){if(e.newBindingForm.markAllAsTouched(),e.newBindingForm.invalid)return;const{title:i,code:r,type:o,ecl:s,value:a,note:c}=e.newBindingForm.controls;let l={title:i.value,code:r.value,type:o.value,ecl:s.value,value:a.value,note:c.value},d=!1;s.value?typeof l.type?.indexOf("Select")<"u"&&l.type?.indexOf("Select")>-1?(yield e.getEclPreview(s.value)).expansion.contains.length>e.maxSelectCount&&(d=!0,s.setErrors({selectTooManyResults:!0})):typeof l.type?.indexOf("Options")<"u"&&l.type?.indexOf("Options")>-1&&(yield e.getEclPreview(s.value)).expansion.contains.length>e.maxOptionsCount&&(d=!0,s.setErrors({optionsTooManyResults:!0})):"Section header"!=l.type&&"Text box"!=l.type&&"Integer"!=l.type&&"Decimal"!=l.type&&(d=!0,s.setErrors({required:!0})),!d&&(e.indexInEdit>-1?e.bindings[e.indexInEdit]=l:e.bindings.push(l),e.newBindingForm.reset(),e.newPanel.close(),e.indexInEdit=-1,setTimeout(()=>{e.refreshFhirQuestionnaire(),e.refreshResponse()},100))})()}refreshFhirQuestionnaire(){this.fhirQuestionnaire={resourceType:"Questionnaire",title:this.formTitle,status:"draft",item:[]},this.bindings.forEach((e,i)=>{const r=this.createItemForBinding(e,i);r&&this.fhirQuestionnaire.item.push(r)}),this.fhirQuestionnaireStr=JSON.stringify(this.fhirQuestionnaire,null,2)}createItemForBinding(e,i){const r=this.initializeBaseItem(e,i);return["Select (Single)","Select (Multiple)","Options","Autocomplete"].includes(e.type)&&(r.extension=this.getExtensionForSelectableTypes(),r.answerValueSet=this.getAnswerValueSet(e)),"Autocomplete"===e.type&&r.extension.push(this.getAutocompleteExtension()),"Select (Multiple)"===e.type&&(r.repeats=!0),r}initializeBaseItem(e,i){const r={linkId:i+1,text:e.title,type:this.getQuestionnaireItemType(e.type)};return e.code&&(r.code=[{system:"http://snomed.info/sct",code:e.code.code,display:e.code.display}]),r}getQuestionnaireItemType(e){switch(e){case"Section header":return"display";case"Select (Single)":case"Select (Multiple)":case"Options":case"Autocomplete":return"choice";case"Text box":return"text";case"Integer":return"integer";case"Decimal":return"decimal";default:return console.warn(`Unhandled binding type: ${e}`),null}}getExtensionForSelectableTypes(){return[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-preferredTerminologyServer",valueUrl:"https://snowstorm.ihtsdotools.org/fhir"}]}getAutocompleteExtension(){return{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"autocomplete",display:"Auto-complete"}]}}}getAnswerValueSet(e){return`http://snomed.info/sct/900000000000207008?fhir_vs=ecl%2F${encodeURIComponent(e.ecl)}`}getEclPreview(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(e,"")).pipe(ct(o=>o)))})()}edit(e){this.indexInEdit=e;const i=this.bindings[e];this.newBindingForm.setValue({title:i.title,code:i.code?i.code:"",type:i.type,ecl:i.ecl,value:i.value,note:i.note}),this.newPanel.open()}onDrop(e){GS(this.bindings,e.previousIndex,e.currentIndex)}getErrors(e){const i=this.newBindingForm.get(e);return i?i.errors:null}getErrorMessage(e){const i=this.getErrors(e);if(i){if(i.required)return"This field is required";if(i.maxlength)return`This field must be less than ${i.maxlength.requiredLength} characters`;if(i.selectTooManyResults)return`Too many results (Max = ${this.maxSelectCount})`;if(i.optionsTooManyResults)return`Too many results (Max = ${this.maxOptionsCount})`}return null}refreshResponse(){this.response={};for(let e of this.bindings)this.response[e.title]={},e.code&&(this.response[e.title].code=e.code);for(let[e,i]of Object.entries(this.output))this.output[e].code&&(this.response[e].code=this.output[e].code),this.output[e].value&&(this.response[e].value=this.output[e].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[e,i]of Object.entries(this.response)){let r=i;const s=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let a={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};a.code=(r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0)||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},s&&(a.valueCodeableConcept=s),r.value&&"string"==typeof r.value&&(a.valueString=r.value),(a.valueCodeableConcept||a.valueString)&&this.responseBundle.entry.push(a)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}optionSelected(e,i,r){this.output[e]={code:i,value:r},i||delete this.output[e].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}loadExample1(){this.formTitle=this.example1.title,this.bindings=this.example1.bindings,this.refreshFhirQuestionnaire(),this.clearOutput(),this.refreshResponse()}cancelEdit(){this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1}clear(){this.bindings=[],this.clearOutput(),this.newBindingForm.reset(),this.formTitle="My new form",this.showRightContainer=!1}clearOutput(){this.output={},this.outputStr="{}";const e=JSON.parse(JSON.stringify(this.bindings));this.bindings=[],this.bindings=e}saveForm(){var e=new Blob([JSON.stringify({title:this.formTitle,bindings:this.bindings},null,2)],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(e,`${this.formTitle}.json`)}saveOutput(e){var i=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(i,`${this.formTitle}-data.json`)}saveBundleOutput(e){var i=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(i,`${this.formTitle}-fhir-bundle.json`)}copyOutputToClipboard(e){this.clipboard.copy(e)}uploadFile(e){if(1!==e.target.files.length)console.error("No file selected");else{const i=new FileReader;i.onloadend=r=>{if(i.result){const o=JSON.parse(i.result?.toString());Array.isArray(o)?(this.bindings=o,this.formTitle="My new form"):(this.bindings=[],this.bindings=o.bindings,this.formTitle=o.title),this.clearOutput(),this.refreshResponse(),this.refreshFhirQuestionnaire()}},i.readAsText(e.target.files[0])}}openEclBuilder(e,i){this.dialog.open(Cge,{data:{ecl:e},width:"80%",height:"80%"}).afterClosed().subscribe(o=>{if(o){const s=this.newBindingForm.get(i);s&&s.setValue(o.ecl)}})}toggleCodeBinding(){this.codeBinding=this.codeBinding===this.codeBindingAll?this.codeBindingObservables:this.codeBindingAll}toggleCheckboxBinding(){this.checkboxBinding=this.checkboxBinding.ecl===this.codeBindingAll.ecl?JSON.parse(JSON.stringify(this.codeBindingObservables)):JSON.parse(JSON.stringify(this.codeBindingAll)),this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(VS),y(Lf))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-bindings-sandbox"]],viewQuery:function(i,r){if(1&i&&pt(v_e,5),2&i){let o;Ae(o=Ie())&&(r.newPanel=o.first)}},decls:94,vars:27,consts:[["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",3,"disableRipple","click"],[1,"flex","flex-row","mb-8"],[1,"w-2/3"],[1,"editPanel","w-full","pt-4","pb-4",3,"opened","closed"],["newPanel",""],[4,"ngIf"],[1,"row",3,"formGroup"],[1,"form-row"],[1,"form-column"],[1,"input-field"],["matInput","","type","text","formControlName","title","placeholder","Enter title..."],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"input-field","autocomplete-field"],["formControlName","code",1,"grow",3,"binding"],["href","javascript:void(0)",1,"bottom-right-link",3,"click"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["class","input-field",4,"ngIf"],["class","input-field full-width",4,"ngIf"],[1,"row"],[1,"grow"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"w-1/3"],[1,"flex","flex-row","gap-4","justify-end","flex-wrap"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["hidden","","type","file","id","file",3,"change"],["fileInput",""],["mat-flat-button","","color","accent",3,"matMenuTriggerFor",4,"ngIf"],[1,"wide-menu"],["demosMenu","matMenu"],["mat-menu-item","",3,"click"],["mat-flat-button","","color","accent",3,"click"],["class","compact-row-container",4,"ngIf"],[1,"row-container"],[1,"row-container-item"],["cdkDropList","",3,"cdkDropListDropped"],["class","output-panel","cdkDrag","",4,"ngFor","ngForOf"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Data collected from form"],["class","output",4,"ngIf"],["label","Data collected (FHIR Bundle)"],["label","FHIR Questionnaire"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"value"],["matInput","","type","text","formControlName","ecl","placeholder","Enter ECL..."],["href","javascript:void(0)",1,"top-right-link",3,"click"],["formControlName","ecl",1,"grow",3,"binding"],[1,"input-field","full-width"],["matInput","","type","text","formControlName","note","placeholder","Enter a description..."],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"compact-row-container"],[1,"title"],["mat-icon-button","","color","primary",1,"tool",3,"click"],[1,"row","form-title"],["matInput","","type","text","placeholder","Enter title...",3,"ngModel","ngModelOptions","ngModelChange"],["cdkDrag","",1,"output-panel"],[1,"row","control"],["cdkDragHandle","",1,"tool","drag-handle"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"binding","selectionChange"],[1,"title","grow"],[1,"grow",3,"binding","textChange"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(i,r){if(1&i){const o=Le();_(0,"div",0)(1,"h3"),k(2,"Terminology Bindings Sandbox "),_(3,"button",1)(4,"mat-icon"),k(5,"info"),v()(),_(6,"mat-menu",null,2)(8,"span",3),z("click",function(a){return a.stopPropagation()}),_(9,"h4"),k(10,"Terminology Bindings Sandbox"),v(),_(11,"p"),k(12,"This is a sandbox for creating terminology bindings, designed to support education activities."),v()()()(),_(13,"div",4)(14,"div",5)(15,"mat-expansion-panel",6,7),z("opened",function(){return r.panelOpenState=!0})("closed",function(){return r.panelOpenState=!1}),_(17,"mat-expansion-panel-header")(18,"mat-panel-title")(19,"h4"),k(20,"New binding:"),v()(),A(21,y_e,2,0,"mat-panel-description",8),v(),_(22,"div")(23,"form",9)(24,"div",10)(25,"div",11)(26,"h5"),k(27,"Question"),v(),_(28,"mat-form-field",12)(29,"mat-label"),k(30,"Question text"),v(),_e(31,"input",13),A(32,x_e,3,0,"button",14),_(33,"mat-error"),k(34),v()(),_(35,"mat-form-field",15),_e(36,"app-autocomplete-binding",16),_(37,"a",17),z("click",function(){return r.toggleCodeBinding()}),A(38,w_e,2,0,"span",8),A(39,C_e,2,0,"span",8),v(),_(40,"mat-error"),k(41),v()()(),_(42,"div",11)(43,"h5"),k(44,"Answer"),v(),_(45,"mat-form-field",12)(46,"mat-label"),k(47,"Answer Type"),v(),_(48,"mat-select",18),A(49,k_e,2,2,"mat-option",19),v(),_(50,"mat-error"),k(51),v()(),A(52,T_e,9,2,"mat-form-field",20),A(53,A_e,7,4,"mat-form-field",20),v()(),A(54,M_e,7,2,"mat-form-field",21),v(),_e(55,"br"),_(56,"div",22),_e(57,"span",23),A(58,R_e,2,0,"button",24),A(59,F_e,2,0,"button",24),_(60,"button",25),z("click",function(){return r.cancelEdit()}),k(61,"Cancel"),v()()()()(),_(62,"div",26)(63,"div",27),A(64,P_e,2,1,"button",28),_(65,"input",29,30),z("change",function(a){return r.uploadFile(a)}),v(),A(67,O_e,2,1,"button",31),_(68,"mat-menu",32,33)(70,"button",34),z("click",function(){return r.saveForm()}),k(71,"Download"),v(),_(72,"button",34),z("click",function(){return r.saveOutput(r.fhirQuestionnaireStr)}),k(73,"Download as FHIR Questionnaire"),v()(),_(74,"button",35),z("click",function(){return he(o),fe(Pt(66).click())}),k(75,"Upload form"),v(),_(76,"button",35),z("click",function(){return r.loadExample1()}),k(77,"Example"),v(),_(78,"button",35),z("click",function(){return r.clear()}),k(79,"Clear"),v()()()(),A(80,N_e,6,1,"div",36),A(81,B_e,12,3,"div",36),_(82,"div",37)(83,"div",38)(84,"div",39),z("cdkDropListDropped",function(a){return r.onDrop(a)}),A(85,X_e,23,11,"div",40),v()(),_(86,"div",38)(87,"mat-tab-group",41)(88,"mat-tab",42),A(89,Z_e,4,5,"div",43),v(),_(90,"mat-tab",44),A(91,e0e,4,5,"div",43),v(),_(92,"mat-tab",45),A(93,n0e,4,5,"div",43),v()()()()()}if(2&i){const o=Pt(7);let s;w(3),E("matMenuTriggerFor",o),w(5),E("disableRipple",!0),w(13),E("ngIf",!r.panelOpenState),w(2),E("formGroup",r.newBindingForm),w(9),E("ngIf",null==(s=r.newBindingForm.get("title"))?null:s.value),w(2),Ze(r.getErrorMessage("title")),w(2),E("binding",r.codeBinding),w(2),E("ngIf",r.codeBinding===r.codeBindingAll),w(1),E("ngIf",r.codeBinding!=r.codeBindingAll),w(2),Ze(r.getErrorMessage("code")),w(8),E("ngForOf",r.controlTypes),w(2),Ze(r.getErrorMessage("type")),w(1),E("ngIf","Section header"!=r.newBindingForm.controls.type.value&&"Text box"!=r.newBindingForm.controls.type.value&&"Checkbox"!=r.newBindingForm.controls.type.value&&"Integer"!=r.newBindingForm.controls.type.value&&"Decimal"!=r.newBindingForm.controls.type.value),w(1),E("ngIf","Checkbox"==r.newBindingForm.controls.type.value),w(1),E("ngIf","Section header"!=r.newBindingForm.controls.type.value),w(4),E("ngIf",-1==r.indexInEdit),w(1),E("ngIf",r.indexInEdit>-1),w(5),E("ngIf",r.bindings.length),w(3),E("ngIf",r.bindings.length),w(13),E("ngIf",!r.titleEditMode),w(1),E("ngIf",r.titleEditMode),w(2),E("@growShrink",r.stateName),w(2),E("ngForOf",r.bindings),w(1),E("@openClose",r.stateName),w(3),E("ngIf",r.bindings.length>0),w(2),E("ngIf",r.bindings.length>0),w(2),E("ngIf",r.bindings.length>0)}},dependencies:[io,ri,Qy,KS,YS,i6,Fo,Vs,co,lu,$a,du,ba,gs,a8,l8,Ll,ql,Fg,Us,qo,Sg,Wl,Pg,qy,Ng,Lg,ps,mu,_u,k6,Bge,Uge,Vge,Og,jge,t_e,n_e,g_e,__e,b_e],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"],data:{animation:[$n("openClose",[pn("open",ze({opacity:1,width:"50%"})),pn("closed",ze({opacity:0,width:"0"})),Qt("open <=> closed",[Gt("0.5s")])]),$n("growShrink",[pn("open",ze({width:"50%"})),pn("closed",ze({width:"100%"})),Qt("open <=> closed",[Gt("0.5s")])])]}})}return n})(),r0e=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-prescription-main"]],decls:2,vars:0,template:function(i,r){1&i&&(_(0,"p"),k(1,"prescription-main works!, no?"),v())}})}return n})();const o0e=["mat-sort-header",""];function s0e(n,t){if(1&n){const e=Le();_(0,"div",3),z("@arrowPosition.start",function(){return he(e),fe(O()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return he(e),fe(O()._disableViewStateAnimation=!1)}),_e(1,"div",4),_(2,"div",5),_e(3,"div",6)(4,"div",7)(5,"div",8),v()()}if(2&n){const e=O();E("@arrowOpacity",e._getArrowViewState())("@arrowPosition",e._getArrowViewState())("@allowChildren",e._getArrowDirectionState()),w(2),E("@indicator",e._getArrowDirectionState()),w(1),E("@leftPointer",e._getArrowDirectionState()),w(1),E("@rightPointer",e._getArrowDirectionState())}}const a0e=["*"],R6=new ae("MAT_SORT_DEFAULT_OPTIONS"),c0e=Ice(Oc(class{}));let Kl=(()=>{class n extends c0e{get direction(){return this._direction}set direction(e){this._direction=e}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Qe(e)}constructor(e){super(),this._defaultOptions=e,this.sortables=new Map,this._stateChanges=new Me,this.start="asc",this._direction="",this.sortChange=new De}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let r=function l0e(n,t){let e=["asc","desc"];return"desc"==n&&e.reverse(),t||e.push(""),e}(e.start||this.start,e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),o=r.indexOf(this.direction)+1;return o>=r.length&&(o=0),r[o]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(y(R6,8))},n.\u0275dir=X({type:n,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ye,jn]}),n})();const Xl=Sce.ENTERING+" "+Tce.STANDARD_CURVE,Bf={indicator:$n("indicator",[pn("active-asc, asc",ze({transform:"translateY(0px)"})),pn("active-desc, desc",ze({transform:"translateY(10px)"})),Qt("active-asc <=> active-desc",Gt(Xl))]),leftPointer:$n("leftPointer",[pn("active-asc, asc",ze({transform:"rotate(-45deg)"})),pn("active-desc, desc",ze({transform:"rotate(45deg)"})),Qt("active-asc <=> active-desc",Gt(Xl))]),rightPointer:$n("rightPointer",[pn("active-asc, asc",ze({transform:"rotate(45deg)"})),pn("active-desc, desc",ze({transform:"rotate(-45deg)"})),Qt("active-asc <=> active-desc",Gt(Xl))]),arrowOpacity:$n("arrowOpacity",[pn("desc-to-active, asc-to-active, active",ze({opacity:1})),pn("desc-to-hint, asc-to-hint, hint",ze({opacity:.54})),pn("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",ze({opacity:0})),Qt("* => asc, * => desc, * => active, * => hint, * => void",Gt("0ms")),Qt("* <=> *",Gt(Xl))]),arrowPosition:$n("arrowPosition",[Qt("* => desc-to-hint, * => desc-to-active",Gt(Xl,Tf([ze({transform:"translateY(-25%)"}),ze({transform:"translateY(0)"})]))),Qt("* => hint-to-desc, * => active-to-desc",Gt(Xl,Tf([ze({transform:"translateY(0)"}),ze({transform:"translateY(25%)"})]))),Qt("* => asc-to-hint, * => asc-to-active",Gt(Xl,Tf([ze({transform:"translateY(25%)"}),ze({transform:"translateY(0)"})]))),Qt("* => hint-to-asc, * => active-to-asc",Gt(Xl,Tf([ze({transform:"translateY(0)"}),ze({transform:"translateY(-25%)"})]))),pn("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",ze({transform:"translateY(0)"})),pn("hint-to-desc, active-to-desc, desc",ze({transform:"translateY(-25%)"})),pn("hint-to-asc, active-to-asc, asc",ze({transform:"translateY(25%)"}))]),allowChildren:$n("allowChildren",[Qt("* <=> *",[cy("@*",ay(),{optional:!0})])])};let rx=(()=>{class n{constructor(){this.changes=new Me}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const u0e={provide:rx,deps:[[new Ia,new Vd,rx]],useFactory:function d0e(n){return n||new rx}},h0e=Oc(class{});let rD=(()=>{class n extends h0e{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Qe(e)}constructor(e,i,r,o,s,a,c,l){super(),this._intl=e,this._changeDetectorRef=i,this._sort=r,this._columnDef=o,this._focusMonitor=s,this._elementRef=a,this._ariaDescriber=c,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",l?.arrowPosition&&(this.arrowPosition=l?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{const i=!!e;i!==this._showIndicatorHint&&(this._setIndicatorHintVisible(i),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(e){this._isDisabled()&&e||(this._showIndicatorHint=e,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(e){this._viewState=e||{},this._disableViewStateAnimation&&(this._viewState={toState:e.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(e){!this._isDisabled()&&(32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const e=this._viewState.fromState;return(e?`${e}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}_handleStateChanges(){this._rerenderSubscription=oi(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(y(rx),y(an),y(Kl,8),y("MAT_SORT_HEADER_COLUMN_DEF",8),y(ms),y(Ne),y(XB,8),y(R6,8))},n.\u0275cmp=Ve({type:n,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(e,i){1&e&&z("click",function(){return i._handleClick()})("keydown",function(o){return i._handleKeydown(o)})("mouseenter",function(){return i._setIndicatorHintVisible(!0)})("mouseleave",function(){return i._setIndicatorHintVisible(!1)}),2&e&&(vt("aria-sort",i._getAriaSortAttribute()),ot("mat-sort-header-disabled",i._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[ye],attrs:o0e,ngContentSelectors:a0e,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(e,i){1&e&&(Rn(),_(0,"div",0)(1,"div",1),dt(2),v(),A(3,s0e,6,6,"div",2),v()),2&e&&(ot("mat-sort-header-sorted",i._isSorted())("mat-sort-header-position-before","before"===i.arrowPosition),vt("tabindex",i._isDisabled()?null:0)("role",i._isDisabled()?null:"button"),w(3),E("ngIf",i._renderArrow()))},dependencies:[ri],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[Bf.indicator,Bf.leftPointer,Bf.rightPointer,Bf.arrowOpacity,Bf.arrowPosition,Bf.allowChildren]},changeDetection:0}),n})(),f0e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[u0e],imports:[Br,Ft]}),n})(),m0e=(()=>{class n{saveItem(e,i){localStorage.setItem(e,i)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}isLocalStorageSupported(){try{const e="__test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Vf=(()=>{class n{constructor(e,i){this.http=e,this.storageService=i,this.baseUrlSubject=new Ti("https://hapi.fhir.org/baseR4"),this.baseUrl$=this.baseUrlSubject.asObservable(),this.userTagSubject=new Ti(""),this.userTag$=this.userTagSubject.asObservable(),this.initialize()}initialize(){if(this.storageService.isLocalStorageSupported()){const e=this.storageService.getItem("baseUrl");e&&this.baseUrlSubject.next(e);const i=this.storageService.getItem("userTag");i&&this.userTagSubject.next(i)}}setBaseUrl(e){this.baseUrlSubject.next(e),this.storageService.saveItem("baseUrl",e)}getBaseUrl(){return this.baseUrlSubject.getValue()}setUserTag(e){this.userTagSubject.next(e),this.storageService.saveItem("userTag",e)}getUserTag(){return this.userTagSubject.getValue()}postQuestionnaire(e){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire`,e)}getQuestionnairesByTag(e){return this.http.get(`${this.baseUrlSubject.value}/Questionnaire?_tag=${e}`)}tagQuestionnaire(e,i){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire/${e}/$meta-add`,{resourceType:"Parameters",parameter:[{name:"meta",valueMeta:{tag:[{system:"http://snomed.org/tags",code:i}]}}]})}deleteQuestionnaire(e){return this.http.delete(`${this.baseUrlSubject.value}/Questionnaire/${e}`)}updateOrCreateQuestionnaire(e,i){return e.id?this.http.put(`${this.baseUrlSubject.value}/Questionnaire?_id=${e.id}&_tag=${i}`,e).pipe(Vi(o=>404===o.status?this.postQuestionnaire(e):eu(o))):this.postQuestionnaire(e)}getQuestionnaireHistory(e){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${e}/_history`)}getSpecificQuestionnaireVersion(e,i){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${e}/_history/${i}`)}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ml),Q(m0e))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function p0e(n,t){if(1&n&&(_(0,"mat-option",15),k(1),v()),2&n){const e=t.$implicit;E("value",e),w(1),it(" ",e.title," ")}}function g0e(n,t){1&n&&_e(0,"mat-spinner",16)}function _0e(n,t){if(1&n){const e=Le();_(0,"div",17)(1,"span",18),k(2,"\u2261"),v(),k(3),_(4,"button",19),z("click",function(){const o=he(e).index;return fe(O().deleteQuestionnaire(o))}),_(5,"mat-icon"),k(6,"delete"),v()()()}if(2&n){const e=t.$implicit;w(3),it(" ",e.title," ")}}let F6=(()=>{class n{constructor(e,i,r,o){this.fb=e,this.fhirService=i,this.data=r,this.dialogRef=o,this.allQuestionnaires=[],this.availableQuestionnaires=[],this.addedQuestionnaires=[],this.userTag="",this.loading=!1}ngOnInit(){this.questionnaireForm=this.fb.group({selectedQuestionnaire:[{value:"",disabled:!0}],assignedName:[{value:"",disabled:!0}]}),this.data&&(this.addedQuestionnaires=this.data.questionnaires,this.questionnaireForm.get("assignedName")?.setValue(this.data.title)),this.questionnaireForm.get("selectedQuestionnaire"),this.userTag=this.fhirService.getUserTag(),this.loadAvailableQuestionnaires()}updateAvailableQuestionnaires(){this.availableQuestionnaires=this.addedQuestionnaires?this.allQuestionnaires.filter(e=>!this.addedQuestionnaires.some(i=>i.id===e.id)):this.allQuestionnaires,this.availableQuestionnaires=this.availableQuestionnaires.filter(e=>!e.extension||!e.extension.some(i=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===i.url&&"assemble-root"===i.valueCode))}loadAvailableQuestionnaires(){this.loading=!0,this.fhirService.getQuestionnairesByTag(this.userTag).subscribe(e=>{this.allQuestionnaires=e.entry.map(i=>i.resource),this.allQuestionnaires.sort((i,r)=>i.title.localeCompare(r.title)),this.updateAvailableQuestionnaires(),this.loading=!1,this.questionnaireForm?.get("selectedQuestionnaire")?.enable(),this.questionnaireForm?.get("assignedName")?.enable()})}addQuestionnaire(){const e=this.questionnaireForm.value;e.selectedQuestionnaire&&(this.addedQuestionnaires.push({...e.selectedQuestionnaire,assignedName:e.assignedName}),this.questionnaireForm.get("selectedQuestionnaire")?.reset(),this.updateAvailableQuestionnaires())}drop(e){GS(this.addedQuestionnaires,e.previousIndex,e.currentIndex)}deleteQuestionnaire(e){e>-1&&(this.addedQuestionnaires.splice(e,1),this.updateAvailableQuestionnaires())}isSaveDisabled(){return!this.questionnaireForm.get("assignedName")?.value||!this.addedQuestionnaires.length}closeModal(){this.dialogRef.close({title:this.questionnaireForm.get("assignedName")?.value,questionnaires:this.addedQuestionnaires})}static#e=this.\u0275fac=function(i){return new(i||n)(y(o8),y(Vf),y(tx),y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-create-root-module"]],decls:26,vars:6,consts:[[1,"form-layout",3,"formGroup"],[1,"form-row"],[1,"full-width"],["matInput","","formControlName","assignedName"],[1,"half-width"],["formControlName","selectedQuestionnaire"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"add-button",3,"disabled","click"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"questionnaire-list"],[1,"list",3,"cdkDropListDropped"],["cdkDrag","","class","cdk-drag",4,"ngFor","ngForOf"],[1,"button-container"],["mat-flat-button","","color","primary","mat-dialog-close",""],["mat-flat-button","","color","accent",3,"disabled","click"],[3,"value"],["diameter","35",1,"loading-spinner"],["cdkDrag","",1,"cdk-drag"],[1,"drag-handle"],["mat-icon-button","","aria-label","Delete questionnaire",3,"click"]],template:function(i,r){1&i&&(_(0,"mat-dialog-content")(1,"h2"),k(2,"Create a modular Questionnaire"),v(),_(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),k(7,"Assign Name"),v(),_e(8,"input",3),v()(),_(9,"div",1)(10,"mat-form-field",4)(11,"mat-label"),k(12,"Select Child Questionnaire"),v(),_(13,"mat-select",5),A(14,p0e,2,2,"mat-option",6),v()(),_(15,"button",7),z("click",function(){return r.addQuestionnaire()}),k(16,"Add questionnaire"),v(),A(17,g0e,1,0,"mat-spinner",8),v()(),_(18,"div",9)(19,"cdk-drop-list",10),z("cdkDropListDropped",function(s){return r.drop(s)}),A(20,_0e,7,1,"div",11),v()()(),_(21,"mat-dialog-actions",12)(22,"button",13),k(23,"Cancel"),v(),_(24,"button",14),z("click",function(){return r.closeModal()}),k(25,"Save"),v()()),2&i&&(w(3),E("formGroup",r.questionnaireForm),w(11),E("ngForOf",r.availableQuestionnaires),w(1),E("disabled",r.loading),w(2),E("ngIf",r.loading),w(3),E("ngForOf",r.addedQuestionnaires),w(4),E("disabled",r.isSaveDisabled()||r.loading))},dependencies:[io,ri,KS,YS,Fo,Vs,co,ba,gs,Ll,Bl,ql,Fg,Us,qo,Sg,Wl,Pg,Lg,Hg,nx,ix],styles:[".questionnaire-list[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;border:1px solid #ccc;border-radius:4px;background-color:#f9f9f9;padding:10px}.list[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;background-color:#fff;margin-bottom:10px;padding:10px;display:flex;align-items:center;justify-content:left;box-shadow:0 2px 4px #0000001a}.drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:15px;font-size:20px;color:#666}.cdk-drag-preview[_ngcontent-%COMP%]{background-color:#e0e0e0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.form-layout[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.form-layout[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.form-layout[_ngcontent-%COMP%] .half-width[_ngcontent-%COMP%]{width:50%;margin-right:15px}"]})}return n})(),P6=(()=>{class n{constructor(e,i){this.http=e,this.fhirService=i}generateRootQuestionnaire(e,i){var r=this;return xe(function*(){try{let s=yield oo(r.http.get("assets/questionnaires/root-questionnaire-template.json"));s.title=e;let a=0,c=r.fhirService.getBaseUrl();return r.fhirService.getUserTag(),i.forEach(d=>{a++,d.url=c+"/Questionnaire/"+d.id,s.item.push({linkId:a.toString(),text:d.title,type:"group",required:!1,item:[{extension:[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire",valueCanonical:d.url}],linkId:a.toString()+".1",text:"Unable to resolve sub-questionnaire",type:"display"}]})}),s}catch(o){throw console.error("Error generating root questionnaire:",o),o}})()}getRootQuestionnaireData(e){var i=this;return xe(function*(){if(!e||!Array.isArray(e.item))throw new Error("Invalid root questionnaire");const r=e.title,o=e.item.filter(a=>"group"===a.type&&a.item&&Array.isArray(a.item)).flatMap(a=>a.item).map(function(){var a=xe(function*(c){const l=c.extension?.find(d=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===d.url);return l?i.getQuestionnaireFromUrl(l.valueCanonical):null});return function(c){return a.apply(this,arguments)}}());return{title:r,questionnaires:(yield Promise.all(o)).filter(a=>null!==a)}})()}checkForAssembleRoot(e){return!!(e&&e.extension&&Array.isArray(e.extension))&&e.extension.some(i=>"assemble-root"===i.valueCode)}assembleQuestionnaire(e){var i=this;return xe(function*(){if(e=JSON.parse(JSON.stringify(e)),!i.checkForAssembleRoot(e))return null;for(let r of e.item)if("group"==r.type){r.extension=[];for(let o of r.item)if(o.extension&&Array.isArray(o.extension))for(let s of o.extension)if("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===s.url){let a=yield i.getQuestionnaireFromUrl(s.valueCanonical);a&&(r.item=a.item),r.extension||(r.extension=[]),r.extension.push({url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",valueCanonical:s.valueCanonical})}}return e.extension=e.extension.filter(r=>"assemble-root"!==r.valueCode),e})()}disassembleQuestionnaire(e){var i=this;return xe(function*(){if(!e||!e.item||!Array.isArray(e.item))throw new Error("Invalid root questionnaire");const r=e.title,o=[];for(const s of e.item)if("group"===s.type&&s.extension&&Array.isArray(s.extension)){const a=s.extension.find(c=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom"===c.url);if(a){const c=a.valueCanonical,l=yield i.getQuestionnaireFromUrl(c);l&&o.push(l)}}return{title:r,questionnaires:o}})()}getQuestionnaireFromUrl(e){var i=this;return xe(function*(){try{return yield oo(i.http.get(e))}catch(r){return console.error("Error fetching questionnaire:",r),null}})()}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ml),Q(Vf))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function b0e(n,t){1&n&&(_(0,"th",17),k(1," Title "),v())}function v0e(n,t){if(1&n&&(_(0,"td",18),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.title," ")}}function y0e(n,t){1&n&&(_(0,"th",17),k(1," Status "),v())}const x0e=function(n){return["status-pill",n]};function w0e(n,t){if(1&n&&(_(0,"td",18)(1,"span",19),k(2),no(3,"uppercase"),v()()),2&n){const e=t.$implicit;w(1),E("ngClass",la(4,x0e,e.status)),w(1),Ze(Va(3,2,e.status))}}function C0e(n,t){1&n&&(_(0,"th",17),k(1," Version "),v())}function k0e(n,t){if(1&n&&(_(0,"td",18),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.meta.versionId," ")}}function E0e(n,t){1&n&&(_(0,"th",17),k(1," Type "),v())}const T0e=function(){return["status-pill","active"]};function S0e(n,t){1&n&&(_(0,"span",19),k(1,"QUESTIONNAIRE"),v()),2&n&&E("ngClass",us(1,T0e))}const D0e=function(){return["status-pill","draft"]};function A0e(n,t){1&n&&(_(0,"span",19),k(1,"MODULAR ROOT"),v()),2&n&&E("ngClass",us(1,D0e))}function I0e(n,t){if(1&n&&(_(0,"td",18),A(1,S0e,2,2,"span",20),A(2,A0e,2,2,"span",20),v()),2&n){const e=t.$implicit,i=O();w(1),E("ngIf",!i.isRootQuestionnaire(e)),w(1),E("ngIf",i.isRootQuestionnaire(e))}}function M0e(n,t){1&n&&(_(0,"th",21),k(1," Actions "),v())}function R0e(n,t){if(1&n){const e=Le();_(0,"button",32),z("click",function(){he(e);const r=O().$implicit;return fe(O().validate(r))}),_(1,"mat-icon"),k(2,"done"),v()()}if(2&n){const e=O().$implicit;E("disabled",O().isRootQuestionnaire(e))}}function F0e(n,t){if(1&n){const e=Le();_(0,"button",33),z("click",function(){he(e);const r=O().$implicit;return fe(O().assemble(r))}),_(1,"mat-icon"),k(2,"build"),v()()}}function P0e(n,t){if(1&n){const e=Le();_(0,"button",34),z("click",function(){he(e);const r=O().$implicit;return fe(O().preview(r))}),_(1,"mat-icon"),k(2,"visibility"),v()()}}function O0e(n,t){if(1&n){const e=Le();_(0,"button",35),z("click",function(){he(e);const r=O().$implicit;return fe(O().openInNewTab(r))}),_(1,"mat-icon"),k(2,"open_in_new"),v()()}}function N0e(n,t){if(1&n){const e=Le();_(0,"button",36),z("click",function(){he(e);const r=O().$implicit;return fe(O().editQuestionnaire(r))}),_(1,"mat-icon"),k(2,"edit"),v()()}}function L0e(n,t){if(1&n){const e=Le();_(0,"button",37),z("click",function(){he(e);const r=O().$implicit;return fe(O().openModularQuestionnaireModal(r))}),_(1,"mat-icon"),k(2,"edit"),v()()}}function B0e(n,t){if(1&n){const e=Le();_(0,"td",18),A(1,R0e,3,1,"button",22),A(2,F0e,3,0,"button",23),A(3,P0e,3,0,"button",24),A(4,O0e,3,0,"button",25),_(5,"button",26),z("click",function(){const o=he(e).$implicit;return fe(O().saveQuestionnaire(o))}),_(6,"mat-icon"),k(7,"cloud_download"),v()(),A(8,N0e,3,0,"button",27),A(9,L0e,3,0,"button",28),_(10,"button",29),z("click",function(){const o=he(e).$implicit;return fe(O().viewHistory(o))}),_(11,"mat-icon"),k(12,"history"),v()(),_(13,"span",30)(14,"button",31),z("click",function(){const o=he(e).$implicit;return fe(O().deleteQuestionnaire(o))}),_(15,"mat-icon"),k(16,"delete"),v()()()()}if(2&n){const e=t.$implicit,i=O();w(1),E("ngIf",i.config.validate),w(1),E("ngIf",i.isRootQuestionnaire(e)),w(1),E("ngIf",i.config.preview&&!i.isRootQuestionnaire(e)),w(1),E("ngIf",i.config.preview),w(4),E("ngIf",!i.isRootQuestionnaire(e)),w(1),E("ngIf",i.isRootQuestionnaire(e)),w(1),E("disabled",1==e.meta.versionId),w(3),Xh("matTooltip",i.getDeleteTooltip(e)),w(1),E("disabled",i.getReferencingQuestionnaires(e).length>0)}}function V0e(n,t){1&n&&_e(0,"tr",38)}function U0e(n,t){1&n&&_e(0,"tr",39)}function H0e(n,t){1&n&&(_(0,"p",40)(1,"i"),k(2," No questionnaires found. Upload your questionnaires to start. "),v()())}function z0e(n,t){1&n&&_e(0,"mat-spinner",41)}function j0e(n,t){if(1&n){const e=Le();_(0,"button",42),z("click",function(){return he(e),fe(O().downloadAllQuestionnaires())}),k(1," Download bundle "),v()}}let O6=(()=>{class n{constructor(e,i,r,o){this.fhirService=e,this.questionnaireService=i,this.dialog=r,this._snackBar=o,this.questionnaireSelected=new De,this.validateQuestionnaire=new De,this.previewQuestionnaire=new De,this.viewQuestionaireHistory=new De,this.config={},this.displayedColumns=["title","status","version","type","actions"],this.dataSource=new uu,this.questionnaires=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.notFound=!1,this.baseUrlChanged=new Me,this.userTagChanged=new Me}ngOnInit(){Cl([this.fhirService.baseUrl$.pipe(Pc(1e3),ja()),this.fhirService.userTag$.pipe(Pc(1e3),ja())]).subscribe(([e,i])=>{(this.selectedFhirServer!==e||this.selectedUserTag!==i)&&(this.selectedFhirServer=e,this.selectedUserTag=i,this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires())})}ngOnChanges(e){}ngAfterViewInit(){this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(e,i)=>{switch(i){case"type":return this.isRootQuestionnaire(e)?"Modular root":"Questionnaire";case"version":return e.meta&&e.meta.versionId?e.meta.versionId:"";default:return e[i]}},this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires()}loadQuestionnaires(){this.loading=!0,this.notFound=!1,this.questionnaires=[],this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(e=>{e.entry?(this.questionnaires=e.entry.map(i=>i.resource),this.dataSource.data=this.questionnaires,this.dataSource.sort=this.sort,this.loading=!1):(this.questionnaires=[],this.dataSource.data=this.questionnaires,this.loading=!1,this.notFound=!0)})}updateQuestionnairesList(e){const i=this.questionnaires.findIndex(r=>r.id===e.id);-1!==i?(this.questionnaires[i]=e,this.dataSource.data=this.questionnaires):(this.questionnaires.push(e),this.dataSource.data=this.questionnaires)}addQuestionnaire(e){this.updateQuestionnairesList(e)}deleteQuestionnaire(e){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Deleting Questionnaire...",panelClass:["green-snackbar"]}),this.fhirService.deleteQuestionnaire(e.id).subscribe(()=>{this.questionnaires=this.questionnaires.filter(i=>i.id!==e.id),this.dataSource.data=this.questionnaires,this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire deleted successfully",panelClass:["green-snackbar"]})})}selectQuestionnaire(e){this.questionnaireSelected.emit(e)}validate(e){this.validateQuestionnaire.emit(e)}viewHistory(e){this.viewQuestionaireHistory.emit(e)}preview(e){this.previewQuestionnaire.emit(e)}openInNewTab(e){window.open(this.selectedFhirServer+"/Questionnaire/"+e.id,"_blank")}saveQuestionnaire(e){var i=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});Wa(i,`${e.title}-v${e.meta.versionId}.json`)}isRootQuestionnaire(e){return!(!e.extension||!Array.isArray(e.extension))&&e.extension.some(i=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===i.url&&"assemble-root"===i.valueCode)}assemble(e){this._snackBar.openFromComponent(Si,{duration:2e3,data:"Assembling Questionnaire...",panelClass:["green-snackbar"]}),this.questionnaireService.assembleQuestionnaire(e).then(i=>{i.title=e.title+" (assembled)",this.previewQuestionnaire.emit(i),this._snackBar.openFromComponent(Si,{duration:2e3,data:"Questionnaire ready",panelClass:["green-snackbar"]})}).catch(i=>{console.error("Error assembling questionnaire:",i)})}editQuestionnaire(e){this.saveQuestionnaire(e),window.open("https://lhcformbuilder.nlm.nih.gov/","_blank")}openModularQuestionnaireModal(e){var i=this;return xe(function*(){let r=yield i.questionnaireService.getRootQuestionnaireData(e);i.dialog.open(F6,{data:r,width:"75%"}).afterClosed().subscribe(s=>{s&&i.handleDialogResult(s,e)})})()}handleDialogResult(e,i){var r=this;return xe(function*(){r._snackBar.openFromComponent(Si,{duration:5e3,data:"Updating questionnaire...",panelClass:["green-snackbar"]});try{let o=yield r.questionnaireService.generateRootQuestionnaire(e.title,e.questionnaires);o&&(i.title=e.title,i.item=o.item,r.addQuestionnaire(i),r.fhirService.updateOrCreateQuestionnaire(i,r.selectedUserTag).pipe(Ns()).subscribe(s=>{r._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(s)},s=>{r._snackBar.openFromComponent(Si,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})}))}catch(o){console.error("Error handling dialog result:",o)}})()}downloadAllQuestionnaires(){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Downloading Questionnaires...",panelClass:["green-snackbar"]}),this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(e=>{var i=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});Wa(i,"questionnaires-bundle.json"),this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaires downloaded successfully",panelClass:["green-snackbar"]})})}getReferencingQuestionnaires(e){let r=`${this.fhirService.getBaseUrl()}/Questionnaire/${e.id}`;return this.dataSource.data.filter(s=>s.item&&Array.isArray(s.item)&&s.item.some(a=>a.item&&Array.isArray(a.item)&&a.item.some(c=>c.extension&&Array.isArray(c.extension)&&c.extension.some(l=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===l.url&&l.valueCanonical===r))))}getDeleteTooltip(e){const i=this.getReferencingQuestionnaires(e);return 0===i.length?"Delete Questionnaire":`Cannot delete: Referenced by ${i.map(o=>`"${o.title}"`).join(", ")}`}static#e=this.\u0275fac=function(i){return new(i||n)(y(Vf),y(P6),y(Lf),y(Af))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-list-questionnaires"]],viewQuery:function(i,r){if(1&i&&pt(Kl,5),2&i){let o;Ae(o=Ie())&&(r.sort=o.first)}},inputs:{config:"config"},outputs:{questionnaireSelected:"questionnaireSelected",validateQuestionnaire:"validateQuestionnaire",previewQuestionnaire:"previewQuestionnaire",viewQuestionaireHistory:"viewQuestionaireHistory"},features:[jn],decls:24,vars:6,consts:[["id","table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["id","outer-container"],[1,"download-button-container"],["mat-flat-button","","color","accent","matTooltip","Dowload all Questionnaires",3,"click",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","class","action-button","matTooltip","Validate Questionnaire",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Assemble Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Preview Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Open resource in new tab",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Modular Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","View Questionnaire History",1,"action-button",3,"disabled","click"],[3,"matTooltip"],["mat-icon-button","","color","accent",3,"disabled","click"],["mat-icon-button","","color","accent","matTooltip","Validate Questionnaire",1,"action-button",3,"disabled","click"],["mat-icon-button","","color","accent","matTooltip","Assemble Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Modular Questionnaire",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"],["mat-flat-button","","color","accent","matTooltip","Dowload all Questionnaires",3,"click"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"table",1),zt(2,2),A(3,b0e,2,0,"th",3),A(4,v0e,2,1,"td",4),jt(),zt(5,5),A(6,y0e,2,0,"th",3),A(7,w0e,4,6,"td",4),jt(),zt(8,6),A(9,C0e,2,0,"th",3),A(10,k0e,2,1,"td",4),jt(),zt(11,7),A(12,E0e,2,0,"th",3),A(13,I0e,3,2,"td",4),jt(),zt(14,8),A(15,M0e,2,0,"th",9),A(16,B0e,17,9,"td",4),jt(),A(17,V0e,1,0,"tr",10),A(18,U0e,1,0,"tr",11),v(),A(19,H0e,3,0,"p",12),A(20,z0e,1,0,"mat-spinner",13),v(),_(21,"div",14)(22,"div",15),A(23,j0e,2,0,"button",16),v()()),2&i&&(w(1),E("dataSource",r.dataSource),w(16),E("matHeaderRowDef",r.displayedColumns),w(1),E("matRowDefColumns",r.displayedColumns),w(1),E("ngIf",r.notFound&&!r.questionnaires.length),w(1),E("ngIf",r.loading),w(3),E("ngIf",!r.loading&&r.questionnaires.length>0))},dependencies:[ha,ri,Fo,Vs,co,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Kl,rD,DE],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}#table-container[_ngcontent-%COMP%]{padding-bottom:2rem}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:2rem}"]})}return n})(),$0e=(()=>{class n{constructor(e){this.dialogRef=e,this.listConfig={select:!0}}selectAndDownload(e){this.dialogRef.close(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-load-questionnaire-modal"]],decls:7,vars:1,consts:[[3,"config","questionnaireSelected"],["align","end"],["mat-flat-button","","color","accent","mat-dialog-close",""]],template:function(i,r){1&i&&(_(0,"mat-dialog-content")(1,"h2"),k(2,"Available Questionnaires"),v(),_(3,"app-list-questionnaires",0),z("questionnaireSelected",function(s){return r.selectAndDownload(s)}),v()(),_(4,"mat-dialog-actions",1)(5,"button",2),k(6,"Close"),v()()),2&i&&(w(3),E("config",r.listConfig))},dependencies:[Fo,Hg,nx,ix,O6]})}return n})();const G0e=["settingsForm"];function W0e(n,t){1&n&&(_(0,"mat-error"),k(1,"Base URL is required"),v())}function q0e(n,t){1&n&&(_(0,"mat-error"),k(1,"User Tag is required and must be at least 3 characters"),v())}let oD=(()=>{class n{constructor(e,i){this.fhirService=e,this.dialogRef=i,this.baseUrl="",this.userTag=""}ngAfterViewInit(){this.triggerValidation()}triggerValidation(){Object.keys(this.settingsForm.controls).forEach(e=>{const i=this.settingsForm.control.get(e);i?.markAsTouched({onlySelf:!0}),i?.markAsDirty({onlySelf:!0})})}ngOnInit(){this.baseUrl=this.fhirService.getBaseUrl(),this.userTag=this.fhirService.getUserTag()}updateSettings(){this.settingsForm.valid&&(this.fhirService.setBaseUrl(this.baseUrl),this.fhirService.setUserTag(this.userTag),this.dialogRef.close("save"))}static#e=this.\u0275fac=function(i){return new(i||n)(y(Vf),y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-fhir-server-settings-modal"]],viewQuery:function(i,r){if(1&i&&pt(G0e,5),2&i){let o;Ae(o=Ie())&&(r.settingsForm=o.first)}},decls:29,vars:5,consts:[[1,"form-container"],[1,"warning"],[3,"ngSubmit"],["settingsForm","ngForm"],["matInput","","name","baseUrl","required","",3,"ngModel","ngModelChange"],["baseUrlField","ngModel"],[4,"ngIf"],["matInput","","name","userTag","required","","minlength","3",3,"ngModel","ngModelChange"],["userTagField","ngModel"],[1,"button-container"],["mat-flat-button","","color","accent","type","submit",3,"disabled"],["mat-flat-button","","color","primary","mat-dialog-close",""]],template:function(i,r){if(1&i&&(_(0,"div",0)(1,"h2"),k(2,"FHIR Server Connection"),v(),_(3,"p"),k(4,"Manager mode allows you to store questionnares in a FHIR Server. Enter the FHIR server URL and your "),_(5,"b"),k(6,"User Tag"),v(),k(7,", this value will be used to identify your questionnaires."),v(),_(8,"p",1),k(9,"Warning: using the default public FHIR server will not ensure the persistence of your information, always save your questionnaires to your computer as a backup."),v(),_(10,"form",2,3),z("ngSubmit",function(){return r.updateSettings()}),_(12,"mat-form-field")(13,"mat-label"),k(14,"Base URL of the FHIR Server"),v(),_(15,"input",4,5),z("ngModelChange",function(s){return r.baseUrl=s}),v(),A(17,W0e,2,0,"mat-error",6),v(),_(18,"mat-form-field")(19,"mat-label"),k(20,"User Tag"),v(),_(21,"input",7,8),z("ngModelChange",function(s){return r.userTag=s}),v(),A(23,q0e,2,0,"mat-error",6),v(),_(24,"div",9)(25,"button",10),k(26,"Open FHIR Repository"),v(),_(27,"button",11),k(28,"Close"),v()()()()),2&i){const o=Pt(11),s=Pt(16),a=Pt(22);w(15),E("ngModel",r.baseUrl),w(2),E("ngIf",s.invalid&&s.touched),w(4),E("ngModel",r.userTag),w(2),E("ngIf",a.invalid&&a.touched),w(2),E("disabled",!o.valid)}},dependencies:[ri,Fo,ba,gs,a8,ql,Fg,Us,qo,Sg,Uy,NS,ps,mu,Hg],styles:[".form-container[_ngcontent-%COMP%]{margin:auto;padding:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.warning[_ngcontent-%COMP%]{color:#ff9500;font-weight:lighter;font-style:italic}"]})}return n})(),N6=(()=>{class n{constructor(e,i){this.data=e,this.dialogRef=i}static#e=this.\u0275fac=function(i){return new(i||n)(y(tx),y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-confirmation-dialog"]],decls:10,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"button-container"],["mat-button","",3,"mat-dialog-close"]],template:function(i,r){1&i&&(_(0,"h1",0),k(1),v(),_(2,"div",1)(3,"p"),k(4),v()(),_(5,"div",2)(6,"button",3),k(7,"Yes"),v(),_(8,"button",3),k(9,"No"),v()()),2&i&&(w(1),Ze(r.data.title),w(3),Ze(r.data.message),w(2),E("mat-dialog-close",!0),w(2),E("mat-dialog-close",!1))},dependencies:[Fo,Hg,p6,nx,ix],encapsulation:2})}return n})();const Q0e=new ae("MAT_PROGRESS_BAR_DEFAULT_OPTIONS"),X0e=Pl(class{constructor(n){this._elementRef=n}},"primary");let L6=(()=>{class n extends X0e{constructor(e,i,r,o,s){super(e),this._ngZone=i,this._changeDetectorRef=r,this._animationMode=o,this._isNoopAnimation=!1,this._value=0,this._bufferValue=0,this.animationEnd=new De,this._mode="determinate",this._transitionendHandler=a=>{0===this.animationEnd.observers.length||!a.target||!a.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===o,s&&(s.color&&(this.color=this.defaultColor=s.color),this.mode=s.mode||this.mode)}get value(){return this._value}set value(e){this._value=B6(gr(e)),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=B6(gr(e)),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Xe),y(an),y(Jn,8),y(Q0e,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:8,hostBindings:function(e,i){2&e&&(vt("aria-valuenow",i._isIndeterminate()?null:i.value)("mode",i.mode),ot("_mat-animation-noopable",i._isNoopAnimation)("mdc-linear-progress--animation-ready",!i._isNoopAnimation)("mdc-linear-progress--indeterminate",i._isIndeterminate()))},inputs:{color:"color",value:"value",bufferValue:"bufferValue",mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[ye],decls:7,vars:4,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(e,i){1&e&&(_(0,"div",0),_e(1,"div",1)(2,"div",2),v(),_(3,"div",3),_e(4,"span",4),v(),_(5,"div",5),_e(6,"span",4),v()),2&e&&(w(1),Ai("flex-basis",i._getBufferBarFlexBasis()),w(2),Ai("transform",i._getPrimaryBarTransform()))},styles:["@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half, 83.67142%))}100%{transform:translateX(var(--mdc-linear-progress-primary-full, 200.611057%))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half, 84.386165%))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full, 160.277782%))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(-10px)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;width:100%;height:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;width:100%;height:100%}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color, #6200ee)}.mdc-linear-progress__buffer-dots{background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E\")}.mdc-linear-progress__buffer-bar{background-color:#e6e6e6}.mdc-linear-progress{height:var(--mdc-linear-progress-track-height, 4px)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-track-height, 4px)}.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height, 4px)}.mat-mdc-progress-bar{display:block}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}"],encapsulation:2,changeDetection:0}),n})();function B6(n,t=0,e=100){return Math.max(t,Math.min(e,n))}let Y0e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft]}),n})();const Z0e=["questionnairesList"];function J0e(n,t){if(1&n&&(_(0,"div",20),_e(1,"mat-progress-bar",21),_(2,"div",22),k(3),v()()),2&n){const e=O();w(1),E("value",e.validatingProgress),w(2),it("",e.validatingProgress,"%")}}function ebe(n,t){1&n&&(_(0,"span"),k(1,"Run validation"),v())}function tbe(n,t){1&n&&_e(0,"mat-spinner",23)}function nbe(n,t){if(1&n&&(_(0,"span",29),k(1),v()),2&n){const e=O(2);w(1),it("Error: ",e.loadResults.error,"")}}function ibe(n,t){if(1&n&&(_(0,"span",30),k(1),v()),2&n){const e=O(2);w(1),it("Inactive: ",e.loadResults.inactive,"")}}function rbe(n,t){if(1&n&&(_(0,"span",31),k(1),v()),2&n){const e=O(2);w(1),it("Active: ",e.loadResults.active,"")}}function obe(n,t){if(1&n&&(_(0,"p",24)(1,"b"),k(2,"Questionnaire:"),v(),k(3),_(4,"i"),k(5),v(),k(6,") - "),_(7,"span",25),k(8),v(),k(9),no(10,"date"),A(11,nbe,2,1,"span",26),A(12,ibe,2,1,"span",27),A(13,rbe,2,1,"span",28),v()),2&n){const e=O();w(3),it(" ",e.questionnaire.title," ("),w(2),Ze(e.questionnaire.url),w(3),it("",e.dataSource.data.length," bindings"),w(1),qd(" - - Version: ",e.questionnaire.meta.versionId," (",Kd(10,8,e.questionnaire.meta.lastUpdated,"fullDate"),") "),w(2),E("ngIf",e.loadResults.total>0),w(1),E("ngIf",e.loadResults.total>0),w(1),E("ngIf",e.loadResults.total>0)}}function sbe(n,t){1&n&&(_(0,"th",32),k(1," # "),v())}function abe(n,t){if(1&n&&(_(0,"td",33),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.order," ")}}function cbe(n,t){1&n&&(_(0,"th",32),k(1," FHIRPath "),v())}function lbe(n,t){if(1&n&&(_(0,"td",33),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.path," ")}}function dbe(n,t){1&n&&(_(0,"th",32),k(1," Path "),v())}function ube(n,t){if(1&n&&(_(0,"td",33),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.readablePath," ")}}function hbe(n,t){1&n&&(_(0,"th",32),k(1,"Code "),v())}function fbe(n,t){if(1&n&&(_(0,"td",33)(1,"a",34),k(2),v()()),2&n){const e=t.$implicit;w(1),Hb("href","http://snomed.info/id/",e.code,"",Tb),w(1),Ze(e.code)}}function mbe(n,t){1&n&&(_(0,"th",32),k(1," Display "),v())}function pbe(n,t){if(1&n&&(_(0,"p",38),k(1),v()),2&n){const e=O().$implicit;w(1),it("Concept FSN: ",e.serverDisplay,"")}}function gbe(n,t){1&n&&(_(0,"p",39),k(1,"Concept is inactive"),v())}function _be(n,t){if(1&n){const e=Le();_(0,"p",40),k(1),_(2,"button",41),z("click",function(){const o=he(e).$implicit,s=O().$implicit;return fe(O().replaceInactiveConcept(s,o.replacement))}),_(3,"mat-icon"),k(4,"arrow_forward"),v()()()}if(2&n){const e=t.$implicit,i=O(2);w(1),Zh(" Replacement: ",e.equivalence," to ",e.replacement.code," |",e.replacement.display,"| "),w(1),E("disabled",i.validating)}}function bbe(n,t){if(1&n&&(_(0,"td",33),k(1),A(2,pbe,2,1,"p",35),A(3,gbe,2,0,"p",36),A(4,_be,5,4,"p",37),v()),2&n){const e=t.$implicit;w(1),it(" ",e.display," "),w(1),E("ngIf",e.serverDisplay),w(1),E("ngIf","Inactive"==e.status),w(1),E("ngForOf",e.replacements)}}function vbe(n,t){1&n&&(_(0,"th",32),k(1," System "),v())}function ybe(n,t){if(1&n&&(_(0,"td",33),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.system," ")}}function xbe(n,t){1&n&&(_(0,"th",32),k(1," Status "),v())}function wbe(n,t){1&n&&(_(0,"span"),_e(1,"mat-progress-bar",42),v())}function Cbe(n,t){if(1&n&&(_(0,"span")(1,"span",43),k(2),v()()),2&n){const e=O().$implicit;w(1),E("ngClass",e.status),w(1),Ze(e.status)}}function kbe(n,t){if(1&n&&(_(0,"td",33),A(1,wbe,2,0,"span",3),A(2,Cbe,3,2,"span",3),v()),2&n){const e=t.$implicit;w(1),E("ngIf","Validating"==e.status),w(1),E("ngIf","Validating"!=e.status)}}function Ebe(n,t){1&n&&_e(0,"tr",44)}function Tbe(n,t){1&n&&_e(0,"tr",45)}function Sbe(n,t){1&n&&_e(0,"mat-spinner",46)}let Dbe=(()=>{class n{constructor(e){this.terminologyService=e,this.questionnaireUpdated=new De,this.validatingQuestionnaire=new De,this.loading=!1,this.validating=!1,this.displayedColumns=["order","readablePath","code","display","system","status"],this.dataSource=new uu,this.validatingProgress=0,this.orderCounter=0,this.loadResults={total:0,active:0,inactive:0,error:0}}ngOnChanges(e){e.questionnaire&&(this.questionnaire?this.loadQuestionnaire(this.questionnaire):this.clearQuestionnaire())}clearQuestionnaire(){this.questionnaire=null,this.dataSource.data=[],this.orderCounter=0,this.validatingProgress=0,this.loadResults={total:0,active:0,inactive:0,error:0}}loadQuestionnaire(e){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=e;let i=this.extractObjects(e);this.dataSource.data=i,this.dataSource.sort=this.sort},700)}validate(){var e=this;this.loadResults={total:0,active:0,inactive:0,error:0},this.dataSource.data.forEach(o=>{o.status="Not checked"}),this.validating=!0,this.validatingQuestionnaire.emit(!0);let i=this.dataSource.data.length,r=0;this.asyncForEach(this.dataSource.data,function(){var o=xe(function*(s){e.loadResults.total++,s.status="Validating",r++,e.validatingProgress=Math.round(r/i*100);try{const a=yield e.terminologyService.lookupConcept(s.code,s.system).pipe(Ns()).toPromise();let c=[],l="";for(const d of a.parameter){if("designation"===d.name){let u="",h="";for(const f of d.part)"value"===f.name&&(u=f.valueString),"use"===f.name&&(h=f.valueCoding?.code);c.push(u),"900000000000003001"===h&&(l=u)}"inactive"===d.name&&(d.valueBoolean?(s.status="Inactive",e.loadResults.inactive++):(s.status="Active",e.loadResults.active++))}if((!s.display||!c.includes(s.display))&&(s.serverDisplay=l),"Inactive"==s.status){const d=yield e.getHistoricalAssociationsTarget("900000000000527005",s.code),u=yield e.getHistoricalAssociationsTarget("900000000000530003",s.code),h=yield e.getHistoricalAssociationsTarget("900000000000523009",s.code),f=yield e.getHistoricalAssociationsTarget("900000000000526001",s.code),m=d.concat(u,h,f);s.replacements=m}}catch{s.status="Error",e.loadResults.error++}});return function(s){return o.apply(this,arguments)}}()).then(()=>{this.validating=!1,this.validatingQuestionnaire.emit(!1)})}getHistoricalAssociationsTarget(e,i){var r=this;return xe(function*(){let o=[];const s=r.terminologyService.translate(e,i);let a=yield oo(s.pipe(ct(c=>c)));if(a.parameter)for(const c of a.parameter)if("match"===c.name){let l={replacement:{},equivalence:""};for(const d of c.part)"concept"===d.name&&d.valueCoding&&(l.replacement={code:d.valueCoding.code,display:d.valueCoding.display,system:d.valueCoding.system}),"equivalence"===d.name&&d.valueCode&&(l.equivalence=d.valueCode);o.push(l)}return o})()}removeSemanticTag(e){return e.replace(/\s*\([^)]+\)\s*$/,"").trim().toLowerCase()}asyncForEach(e,i){return xe(function*(){for(let r=0;r ${e.text}`:e.text),e.system&&e.system.startsWith("http://snomed.info/sct")&&e.code&&e.display){this.orderCounter++;const s={order:this.orderCounter,system:e.system,code:e.code,display:e.display,path:i,readablePath:r,status:"Not checked"};o.some(a=>a.system===s.system&&a.code===s.code&&a.display===s.display)||o.push(s)}if(Array.isArray(e))for(let s in e)o=o.concat(this.extractObjects(e[s],`${i}[${s}]`,r));else for(let s in e)e.hasOwnProperty(s)&&(o=o.concat(this.extractObjects(e[s],i?`${i}.${s}`:s,r)));if(e.answerValueSet){const a=new URL(e.answerValueSet).searchParams.get("fhir_vs");if(a){const c=decodeURIComponent(a),l=/(\d{5,})(?:\s*\|\s*([^|]*)\s*\|)?/g;let d;for(;null!==(d=l.exec(c));)this.orderCounter++,o.push({order:this.orderCounter,code:d[1],display:d[2]?d[2].trim():void 0,system:"http://snomed.info/sct",path:i+".answerValueSet",readablePath:r+" -> answerValueSet [ECL]",status:"Not checked"})}}return o}replaceInactiveConcept(e,i){this.searchAndReplace(this.questionnaire,e,i,!1)&&(this.loadQuestionnaire(this.questionnaire),this.questionnaireUpdated.emit(this.questionnaire))}searchAndReplace(e,i,r,o){if("object"!=typeof e||null===e)return o;if(e.system==i.system&&e.code==i.code&&e.display==i.display&&(e.system=r.system,e.code=r.code,e.display=r.display,o=!0),e.answerValueSet){const s=new URL(e.answerValueSet),a=s.searchParams.get("fhir_vs");if(a){const c=decodeURIComponent(a),l=new RegExp(`(\\s|^)${i.code}(\\s|$|\\|)`,"g");if(l.test(c)){const d=c.replace(l,`$1${r.code}$2`);o=!0;const u=new RegExp(`\\|\\s*${i.display}\\s*\\|`,"g");if(u.test(d)){const h=d.replace(u,`| ${r.display} |`);s.searchParams.set("fhir_vs",encodeURIComponent(h)),e.answerValueSet=s.toString()}s.searchParams.set("fhir_vs",encodeURIComponent(d)),e.answerValueSet=s.toString()}}}if(Array.isArray(e))for(let s in e)o=this.searchAndReplace(e[s],i,r,o);else for(let s in e)e.hasOwnProperty(s)&&(o=this.searchAndReplace(e[s],i,r,o));return o}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-validate-questionnaire"]],viewQuery:function(i,r){if(1&i&&(pt(Kl,5),pt(Ng,5),pt(Z0e,5)),2&i){let o;Ae(o=Ie())&&(r.sort=o.first),Ae(o=Ie())&&(r.tabGroup=o.first),Ae(o=Ie())&&(r.questionnairesList=o.first)}},inputs:{questionnaire:"questionnaire"},outputs:{questionnaireUpdated:"questionnaireUpdated",validatingQuestionnaire:"validatingQuestionnaire"},features:[jn],decls:32,vars:9,consts:[[1,"button-container","bottom-spacer"],["class","progress-container",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click"],[4,"ngIf"],["diameter","20",4,"ngIf"],["class","header","id","tab-header",4,"ngIf"],[1,"table-container","mt-4"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","order"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","path"],["matColumnDef","readablePath"],["matColumnDef","code"],["matColumnDef","display"],["matColumnDef","system"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"progress-container"],["mode","determinate",3,"value"],[1,"progress-label"],["diameter","20"],["id","tab-header",1,"header"],[1,"bindingsCount"],["class","mini-pill Error",4,"ngIf"],["class","mini-pill Inactive",4,"ngIf"],["class","mini-pill Active",4,"ngIf"],[1,"mini-pill","Error"],[1,"mini-pill","Inactive"],[1,"mini-pill","Active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["target","_blank",1,"code-link",3,"href"],["class","server-name",4,"ngIf"],["class","concept-is-inactive",4,"ngIf"],["class","replacement",4,"ngFor","ngForOf"],[1,"server-name"],[1,"concept-is-inactive"],[1,"replacement"],["mat-icon-button","","color","primary","matTooltip","Replace using this concept",3,"disabled","click"],["mode","indeterminate"],[1,"pill",3,"ngClass"],["mat-header-row",""],["mat-row",""],["diameter","35",1,"loading-spinner"]],template:function(i,r){1&i&&(_(0,"div",0),A(1,J0e,4,2,"div",1),_(2,"button",2),z("click",function(){return r.validate()}),A(3,ebe,2,0,"span",3),A(4,tbe,1,0,"mat-spinner",4),v()(),A(5,obe,14,11,"p",5),_(6,"div",6)(7,"table",7),zt(8,8),A(9,sbe,2,0,"th",9),A(10,abe,2,1,"td",10),jt(),zt(11,11),A(12,cbe,2,0,"th",9),A(13,lbe,2,1,"td",10),jt(),zt(14,12),A(15,dbe,2,0,"th",9),A(16,ube,2,1,"td",10),jt(),zt(17,13),A(18,hbe,2,0,"th",9),A(19,fbe,3,2,"td",10),jt(),zt(20,14),A(21,mbe,2,0,"th",9),A(22,bbe,5,4,"td",10),jt(),zt(23,15),A(24,vbe,2,0,"th",9),A(25,ybe,2,1,"td",10),jt(),zt(26,16),A(27,xbe,2,0,"th",9),A(28,kbe,3,2,"td",10),jt(),A(29,Ebe,1,0,"tr",17),A(30,Tbe,1,0,"tr",18),v(),A(31,Sbe,1,0,"mat-spinner",19),v()),2&i&&(w(1),E("ngIf",r.validating),w(1),E("disabled",r.validating||!r.questionnaire),w(1),E("ngIf",!r.validating),w(1),E("ngIf",r.validating),w(1),E("ngIf",r.questionnaire),w(2),E("dataSource",r.dataSource),w(22),E("matHeaderRowDef",r.displayedColumns),w(1),E("matRowDefColumns",r.displayedColumns),w(1),E("ngIf",r.loading))},dependencies:[ha,io,ri,Fo,Vs,co,L6,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Kl,rD,Jd],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem;padding-bottom:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}"]})}return n})();function Abe(n,t){1&n&&(_(0,"th",15),k(1," Title "),v())}function Ibe(n,t){if(1&n&&(_(0,"td",16),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.title," ")}}function Mbe(n,t){1&n&&(_(0,"th",15),k(1," Status "),v())}const Rbe=function(n){return["status-pill",n]};function Fbe(n,t){if(1&n&&(_(0,"td",16)(1,"span",17),k(2),no(3,"uppercase"),v()()),2&n){const e=t.$implicit;w(1),E("ngClass",la(4,Rbe,e.status)),w(1),Ze(Va(3,2,e.status))}}function Pbe(n,t){1&n&&(_(0,"th",15),k(1," Version "),v())}function Obe(n,t){if(1&n&&(_(0,"td",16),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.meta.versionId," ")}}function Nbe(n,t){1&n&&(_(0,"th",15),k(1," Date "),v())}function Lbe(n,t){if(1&n&&(_(0,"td",16)(1,"i"),k(2),no(3,"date"),v()()),2&n){const e=t.$implicit;w(2),Ze(Kd(3,1,e.meta.lastUpdated,"MMMM d, y, h:mm:ss a"))}}function Bbe(n,t){1&n&&(_(0,"th",15),k(1," Type "),v())}const Vbe=function(){return["status-pill","active"]};function Ube(n,t){1&n&&(_(0,"span",17),k(1,"QUESTIONNAIRE"),v()),2&n&&E("ngClass",us(1,Vbe))}const Hbe=function(){return["status-pill","draft"]};function zbe(n,t){1&n&&(_(0,"span",17),k(1,"MODULAR ROOT"),v()),2&n&&E("ngClass",us(1,Hbe))}function jbe(n,t){if(1&n&&(_(0,"td",16),A(1,Ube,2,2,"span",18),A(2,zbe,2,2,"span",18),v()),2&n){const e=t.$implicit,i=O();w(1),E("ngIf",!i.isRootQuestionnaire(e)),w(1),E("ngIf",i.isRootQuestionnaire(e))}}function $be(n,t){1&n&&(_(0,"th",19),k(1," Actions "),v())}function Gbe(n,t){if(1&n){const e=Le();_(0,"button",24),z("click",function(){he(e);const r=O().$implicit;return fe(O().restore(r))}),_(1,"mat-icon"),k(2,"restore_page"),v()()}}function Wbe(n,t){if(1&n){const e=Le();_(0,"td",16)(1,"button",20),z("click",function(){const o=he(e).$implicit;return fe(O().preview(o))}),_(2,"mat-icon"),k(3,"visibility"),v()(),_(4,"button",21),z("click",function(){const o=he(e).$implicit;return fe(O().openInNewTab(o))}),_(5,"mat-icon"),k(6,"open_in_new"),v()(),_(7,"button",22),z("click",function(){const o=he(e).$implicit;return fe(O().saveQuestionnaire(o))}),_(8,"mat-icon"),k(9,"cloud_download"),v()(),A(10,Gbe,3,0,"button",23),v()}if(2&n){const e=t.$implicit,i=O();w(10),E("ngIf",(null==e||null==e.meta?null:e.meta.versionId)!=(null==i.versions[0]||null==i.versions[0].meta?null:i.versions[0].meta.versionId))}}function qbe(n,t){1&n&&_e(0,"tr",25)}function Qbe(n,t){1&n&&_e(0,"tr",26)}function Kbe(n,t){1&n&&(_(0,"p",27)(1,"i"),k(2," No questionnaire selected. "),v()())}function Xbe(n,t){1&n&&_e(0,"mat-spinner",28)}let Ybe=(()=>{class n{constructor(e){this.fhirService=e,this.previewQuestionnaire=new De,this.restoreQuestionnaireVersion=new De,this.versions=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new uu}ngOnChanges(e){e.questionnaire&&e.questionnaire.currentValue&&this.loadVersions()}ngOnInit(){Cl([this.fhirService.baseUrl$.pipe(Pc(1e3),ja()),this.fhirService.userTag$.pipe(Pc(1e3),ja())]).subscribe(([e,i])=>{(this.selectedFhirServer!==e||this.selectedUserTag!==i)&&(this.selectedFhirServer=e,this.selectedUserTag=i,this.selectedUserTag&&this.selectedFhirServer&&this.loadVersions())})}loadVersions(e){this.versions=[],this.dataSource.data=this.versions,e&&(this.questionnaire=e),this.questionnaire&&(this.loading=!0,this.fhirService.getQuestionnaireHistory(this.questionnaire.id).subscribe(i=>{this.versions=i.entry.map(r=>r.resource),this.dataSource.data=this.versions,this.loading=!1}))}preview(e){this.previewQuestionnaire.emit(e),this.loadVersions()}openInNewTab(e){window.open(this.selectedFhirServer+"/Questionnaire/"+e.id+"/_history/"+e.meta.versionId,"_blank")}saveQuestionnaire(e){var i=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});Wa(i,`${e.title}-v${e.meta.versionId}.json`)}restore(e){this.restoreQuestionnaireVersion.emit(e)}isRootQuestionnaire(e){return!(!e.extension||!Array.isArray(e.extension))&&e.extension.some(i=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===i.url&&"assemble-root"===i.valueCode)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Vf))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-questionnaire-history"]],inputs:{questionnaire:"questionnaire"},outputs:{previewQuestionnaire:"previewQuestionnaire",restoreQuestionnaireVersion:"restoreQuestionnaireVersion"},features:[jn],decls:24,vars:5,consts:[[1,"table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Restore Version",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Restore Version",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"table",1),zt(2,2),A(3,Abe,2,0,"th",3),A(4,Ibe,2,1,"td",4),jt(),zt(5,5),A(6,Mbe,2,0,"th",3),A(7,Fbe,4,6,"td",4),jt(),zt(8,6),A(9,Pbe,2,0,"th",3),A(10,Obe,2,1,"td",4),jt(),zt(11,7),A(12,Nbe,2,0,"th",3),A(13,Lbe,4,4,"td",4),jt(),zt(14,8),A(15,Bbe,2,0,"th",3),A(16,jbe,3,2,"td",4),jt(),zt(17,9),A(18,$be,2,0,"th",10),A(19,Wbe,11,1,"td",4),jt(),A(20,qbe,1,0,"tr",11),A(21,Qbe,1,0,"tr",12),v(),A(22,Kbe,3,0,"p",13),A(23,Xbe,1,0,"mat-spinner",14),v()),2&i&&(w(1),E("dataSource",r.dataSource),w(19),E("matHeaderRowDef",r.displayedColumns),w(1),E("matRowDefColumns",r.displayedColumns),w(1),E("ngIf",!r.questionnaire),w(1),E("ngIf",r.loading))},dependencies:[ha,ri,Vs,co,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Kl,rD,DE,Jd],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px}.table-container[_ngcontent-%COMP%]{margin:2rem;padding-bottom:2rem}"]})}return n})();const Zbe=["questionnairesList"],Jbe=["fileInput"],eve=["questionnaireHistory"];function tve(n,t){1&n&&(_(0,"span"),k(1," / Validator"),v())}function nve(n,t){1&n&&(_(0,"span"),k(1," / Questionnaires repository"),v())}function ive(n,t){if(1&n){const e=Le();_(0,"span",15)(1,"a",16),z("click",function(){return he(e),fe(O(2).mode="Manager")}),_(2,"mat-icon"),k(3,"play_arrow"),v(),_(4,"span"),k(5,"Reconnect to last FHIR Server"),v()(),_(6,"span",17),k(7),_(8,"i"),k(9),v(),k(10,'" )'),v()()}if(2&n){const e=O(2);w(7),it(" ( ",e.selectedFhirServer,' as "'),w(2),Ze(e.selectedUserTag)}}function rve(n,t){if(1&n){const e=Le();_(0,"div",6)(1,"p"),k(2,"What do you want to do today?"),v(),_(3,"mat-radio-group",7),z("ngModelChange",function(r){return he(e),fe(O().step1Response=r)}),_(4,"mat-radio-button",8),k(5,"Edit a questionnaire in the NLM Form Builder"),v(),_(6,"mat-radio-button",9),k(7,"Load an example questionnaire"),v(),_(8,"mat-radio-button",10),k(9,"Upload and validate a questionnaire"),v(),_(10,"mat-radio-button",11),k(11,"Work with your questionnaires from a FHIR server"),v(),A(12,ive,11,2,"span",12),v(),_(13,"div",13)(14,"button",14),z("click",function(){return he(e),fe(O().advanceFromStep1())}),k(15,"Next"),v()()()}if(2&n){const e=O();w(3),E("ngModel",e.step1Response),w(9),E("ngIf",e.selectedFhirServer&&e.selectedUserTag),w(2),E("disabled",!e.step1Response)}}function ove(n,t){if(1&n&&(_(0,"span"),k(1," Connected to "),_(2,"a",33),k(3),v(),k(4,' as "'),_(5,"i"),k(6),v(),k(7,'" '),v()),2&n){const e=O(2);w(3),Ze(e.selectedFhirServer),w(3),Ze(e.selectedUserTag)}}function sve(n,t){if(1&n){const e=Le();_(0,"button",14),z("click",function(){return he(e),fe(O(2).openModularQuestionnaireModal())}),k(1," Create Modular Questionnaire "),v()}2&n&&E("disabled",O(2).validating)}function ave(n,t){if(1&n){const e=Le();_(0,"mat-tab",34)(1,"div",25)(2,"app-list-questionnaires",35,36),z("validateQuestionnaire",function(r){return he(e),fe(O(2).switchToValidateTab(r))})("previewQuestionnaire",function(r){return he(e),fe(O(2).switchToPreviewTab(r))})("viewQuestionaireHistory",function(r){return he(e),fe(O(2).switchToHistoryTab(r))}),v()()()}if(2&n){const e=O(2);w(2),E("config",e.listConfig)}}function cve(n,t){if(1&n&&(_(0,"h4"),k(1),no(2,"date"),v()),2&n){const e=O(2);w(1),Zh("",e.questionnaire.title," - Version: ",e.questionnaire.meta.versionId," (",Kd(2,3,e.questionnaire.meta.lastUpdated,"fullDate"),")")}}function lve(n,t){if(1&n){const e=Le();_(0,"div")(1,"div",18),A(2,ove,8,2,"span",4),_(3,"input",19,20),z("change",function(r){return he(e),fe(O().onFileSelected(r))}),v(),_(5,"button",14),z("click",function(){return he(e),fe(Pt(4).click())}),k(6," Upload "),v(),_(7,"button",14),z("click",function(){return he(e),fe(O().saveQuestionnaireToDisk())}),k(8,"Download"),v(),A(9,sve,2,1,"button",21),v(),_(10,"mat-tab-group",22),z("selectedIndexChange",function(r){return he(e),fe(O().onTabChange(r))}),A(11,ave,4,1,"mat-tab",23),_(12,"mat-tab",24)(13,"div",25),A(14,cve,3,6,"h4",4),_e(15,"div",26),v()(),_(16,"mat-tab",27)(17,"app-validate-questionnaire",28,29),z("questionnaireUpdated",function(r){return he(e),fe(O().loadQuestionnaire(r))})("validatingQuestionnaire",function(r){return he(e),fe(O().validating=r)}),v()(),_(19,"mat-tab",30)(20,"app-questionnaire-history",31,32),z("previewQuestionnaire",function(r){return he(e),fe(O().switchToPreviewTab(r))})("restoreQuestionnaireVersion",function(r){return he(e),fe(O().saveQuestionnaire(r))}),v()()()()}if(2&n){const e=O();w(2),E("ngIf","Manager"==e.mode),w(3),E("disabled",e.validating),w(2),E("disabled",e.validating||!e.questionnaire),w(2),E("ngIf","Manager"==e.mode),w(2),E("ngIf","Manager"===e.mode),w(3),E("ngIf",e.questionnaire),w(1),ot("hidden",!e.questionnaire),w(2),E("questionnaire",e.questionnaire),w(3),E("questionnaire",e.questionnaire)}}let dve=(()=>{class n{constructor(e,i,r,o,s,a){this.http=e,this.terminologyService=i,this.fhirService=r,this.questionnaireService=o,this.dialog=s,this._snackBar=a,this.loading=!1,this.validating=!1,this.orderCounter=0,this.savingQuestionnaire=!1,this.selectedFhirServer="",this.selectedUserTag="",this.showFhirSetupModal=!1,this.listConfig={validate:!0,preview:!0},this.mode="step1"}ngOnInit(){this.fhirService.baseUrl$.subscribe(e=>{this.selectedFhirServer=e}),this.fhirService.userTag$.subscribe(e=>{this.selectedUserTag=e}),this.loadScript()}loadScript(){const e=document.createElement("script");e.src="https://clinicaltables.nlm.nih.gov/lforms-versions/34.3.1/webcomponent/lhc-forms.js",e.onload=()=>{const i=document.createElement("script");i.src="https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/fhir/R4/lformsFHIR.min.js",i.onload=()=>{},document.head.appendChild(i)},document.head.appendChild(e)}toggleMode(){"Validator"===this.mode?this.dialog.open(oD,{width:"60%",disableClose:!0}).afterClosed().subscribe(i=>{"save"===i&&(this.mode="Manager",setTimeout(()=>{this.tabGroup.selectedIndex=0},500))}):this.mode="Validator"}previewForm(){"Preview"==this.getCurrentTabName()&&(this.questionnaire?LForms.Util.addFormToPage(this.questionnaire,"myFormContainer"):LForms.Util.addFormToPage({},"myFormContainer"))}displayHistory(e){e&&this.questionnaireHistory.loadVersions(e)}loadExampleQuestionnaire(){oo(this.http.get("assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json")).then(e=>{this.loadQuestionnaire(e),"Manager"===this.mode&&(this.tabGroup.selectedIndex=1)})}clearQuestionnaire(){this.questionnaire=null,this.orderCounter=0,this.previewForm()}loadQuestionnaire(e){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=e,this.previewForm()},700)}saveQuestionnaireToDisk(){var e=new Blob([JSON.stringify(this.questionnaire,null,2)],{type:"text/plain;charset=utf-8"});Wa(e,`${this.questionnaire.title}.json`)}onFileSelected(e){const i=e.target.files?.[0];if(i){const r=new FileReader;r.onload=o=>{try{const s=JSON.parse(o.target?.result);"Questionnaire"===s.resourceType?(this.loadQuestionnaire(s),setTimeout(()=>{"Manager"===this.mode?this.postCurrentQuestionnaire():this.tabGroup.selectedIndex=1},1e3)):this._snackBar.openFromComponent(Si,{duration:5e3,data:"The file is not a FHIR Questionnaire Resource",panelClass:["red-snackbar"]})}catch(s){console.error(s),this._snackBar.openFromComponent(Si,{duration:5e3,data:"Invalid JSON file",panelClass:["red-snackbar"]})}},r.readAsText(i)}}postCurrentQuestionnaire(){this.postQuestionnaire(this.questionnaire)}postQuestionnaire(e){if(-1!==this.questionnairesList.questionnaires.findIndex(r=>r.title===e.title&&r.id!==e.id))this.dialog.open(N6,{width:"400px",data:{title:"Confirm Action",message:"A questionnaire with the same title and different ID already exists. Do you want to proceed?"}}).afterClosed().subscribe(o=>{o?this.saveQuestionnaire(e):(this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]}),console.log("User cancelled the action"))});else{-1!==this.questionnairesList.questionnaires.findIndex(s=>s.title===e.title&&s.id===e.id&&s.meta?.versionId>=e.meta?.versionId)?this.dialog.open(N6,{width:"400px",data:{title:"Confirm Action",message:"A newer version or identical of this questionnaire already exists. Do you want to proceed?"}}).afterClosed().subscribe(a=>{a?this.saveQuestionnaire(e):(this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]}),console.log("User cancelled the action"))}):this.saveQuestionnaire(e)}}saveQuestionnaire(e){this.savingQuestionnaire=!0,this._snackBar.openFromComponent(Si,{duration:5e3,data:"Saving Questionnaire...",panelClass:["green-snackbar"]}),e.meta||(e.meta={}),e.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.fhirService.updateOrCreateQuestionnaire(e,this.selectedUserTag).pipe(Ns()).subscribe(i=>{setTimeout(()=>{this.tabGroup.selectedIndex=0,setTimeout(()=>{this.savingQuestionnaire=!1,this.questionnairesList.addQuestionnaire(i)},300)},300),this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire saved successfully",panelClass:["green-snackbar"]})},i=>{this.savingQuestionnaire=!1,this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})})}listQuestionnaires(){this.fhirService.getQuestionnairesByTag(this.selectedUserTag).pipe(Ns()).subscribe(e=>{},e=>{console.error(e)})}openLoadQuestionnairesDialog(){this.dialog.open($0e,{width:"70%"}).afterClosed().subscribe(i=>{this.loadQuestionnaire(i)})}setFhirServer(){this.fhirService.setBaseUrl(this.selectedFhirServer),this.fhirService.setUserTag(this.selectedUserTag)}setupFhirServer(){this.dialog.open(oD,{width:"60%"})}switchToValidateTab(e){this.loadQuestionnaire(e),this.tabGroup.selectedIndex=2}switchToPreviewTab(e){this.loadQuestionnaire(e),this.tabGroup.selectedIndex=1}switchToHistoryTab(e){this.displayHistory(e),this.tabGroup.selectedIndex=3}advanceFromStep1(){"edit"==this.step1Response?window.open("https://lhcformbuilder.nlm.nih.gov/","_blank"):"validate"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.uploadInput.nativeElement.click()},200)):"repository"==this.step1Response?this.dialog.open(oD,{width:"60%"}).afterClosed().subscribe(i=>{i&&(this.mode="Manager")}):"example"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.loadExampleQuestionnaire()},300)):"reconnect"==this.step1Response&&(this.mode="Manager"),this.step1Response=""}getCurrentTabName(){const e=this.tabGroup.selectedIndex;return null!=e?this.tabGroup._tabs.toArray()[e].textLabel:""}onTabChange(e){"Preview"===this.tabGroup._tabs.toArray()[e].textLabel&&setTimeout(()=>{this.previewForm()},300)}openModularQuestionnaireModal(){this.dialog.open(F6,{width:"75%"}).afterClosed().subscribe(i=>{i&&this.questionnaireService.generateRootQuestionnaire(i.title,i.questionnaires).then(r=>{this.postQuestionnaire(r)}).catch(r=>{console.error("Error:",r)})})}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ml),y(Ur),y(Vf),y(P6),y(Lf),y(Af))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-questionnaires-main"]],viewQuery:function(i,r){if(1&i&&(pt(Kl,5),pt(Ng,5),pt(Zbe,5),pt(Jbe,5),pt(eve,5)),2&i){let o;Ae(o=Ie())&&(r.sort=o.first),Ae(o=Ie())&&(r.tabGroup=o.first),Ae(o=Ie())&&(r.questionnairesList=o.first),Ae(o=Ie())&&(r.uploadInput=o.first),Ae(o=Ie())&&(r.questionnaireHistory=o.first)}},decls:11,vars:4,consts:[[1,"header-container"],[1,"header"],[1,"breadcrumb"],["href","javascript:void(0)",3,"click"],[4,"ngIf"],["id","step1",4,"ngIf"],["id","step1"],["aria-label","Select an option",3,"ngModel","ngModelChange"],["value","edit"],["value","example"],["value","validate"],["value","repository"],["id","reconnect",4,"ngIf"],[1,"step-button-container"],["mat-flat-button","","color","accent",3,"disabled","click"],["id","reconnect"],["href","javascript:void(0)","id","reconnect-link",3,"click"],[1,"muted"],[1,"button-container","bottom-spacer"],["type","file","hidden","",3,"change"],["fileInput",""],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange"],["label","My Questionnaires",4,"ngIf"],["label","Preview"],[1,"tab-container"],["id","myFormContainer"],["label","Validate SNOMED Bindings"],[3,"questionnaire","questionnaireUpdated","validatingQuestionnaire"],["validateQuestionnaire",""],["label","History"],[3,"questionnaire","previewQuestionnaire","restoreQuestionnaireVersion"],["questionnaireHistory",""],["href","selectedFhirServer"],["label","My Questionnaires"],[3,"config","validateQuestionnaire","previewQuestionnaire","viewQuestionaireHistory"],["questionnairesList",""]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h2",1),k(2," SNOMED CT Terminology Bindings Validator - FHIR Questionnaire Manager "),v(),_(3,"div",2)(4,"span")(5,"a",3),z("click",function(){return r.mode="step1"}),k(6,"Home"),v(),A(7,tve,2,0,"span",4),A(8,nve,2,0,"span",4),v()()(),A(9,rve,16,3,"div",5),A(10,lve,22,10,"div",4)),2&i&&(w(7),E("ngIf","Validator"==r.mode),w(1),E("ngIf","Manager"==r.mode),w(1),E("ngIf","step1"==r.mode),w(1),E("ngIf","Manager"==r.mode||"Validator"==r.mode))},dependencies:[ri,Fo,co,qo,qy,Ng,ps,tD,nD,O6,Dbe,Ybe,Jd],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding-top:1rem;padding-left:2rem;padding-right:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}#step1[_ngcontent-%COMP%]{margin-top:2rem;margin-left:2rem;font-size:large}#step1[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{margin-left:2rem;display:flex;flex-direction:column;align-items:flex-start}.step-button-container[_ngcontent-%COMP%]{margin-left:30rem;margin-top:2rem}.breadcrumb[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:2rem}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hidden[_ngcontent-%COMP%]{visibility:hidden}.muted[_ngcontent-%COMP%]{color:#8f9397}#reconnect[_ngcontent-%COMP%]{margin-left:5rem}#reconnect-link[_ngcontent-%COMP%]{display:flex;vertical-align:middle;flex-direction:row}"]})}return n})();function uve(n,t){if(1&n&&(_(0,"p",17),k(1),v()),2&n){const e=O();w(1),Ze(e.studentSubsetDefinition)}}function hve(n,t){1&n&&_e(0,"mat-spinner",18)}function fve(n,t){if(1&n&&(_(0,"p",22),k(1),v()),2&n){const e=O(2);w(1),Ze(e.definitionVsMembersValidationResult)}}function mve(n,t){if(1&n&&(_(0,"p",22),k(1),v()),2&n){const e=O(2);w(1),Ze(e.keyConceptValidationResult)}}function pve(n,t){if(1&n&&(_(0,"div",19)(1,"h3",20),k(2,"Validation Results"),v(),A(3,fve,2,1,"p",21),A(4,mve,2,1,"p",21),_(5,"p",22),k(6),v(),_(7,"p",22),k(8),v()()),2&n){const e=O();w(3),E("ngIf",e.selectedAssignment.referenceDefinition),w(1),E("ngIf",e.selectedAssignment.referenceDefinition),w(2),Ze(e.membersNotInRefrenceListResult),w(2),Ze(e.refrenceListVsStudentListResult)}}function gve(n,t){1&n&&(_(0,"th",32),k(1,"ID"),v())}function _ve(n,t){if(1&n&&(_(0,"td",33),k(1),v()),2&n){const e=t.$implicit;w(1),Ze(e.referencedComponentId)}}function bve(n,t){1&n&&(_(0,"th",32),k(1,"Name"),v())}function vve(n,t){if(1&n&&(_(0,"td",33),k(1),v()),2&n){const e=t.$implicit;w(1),Ze(e.name)}}function yve(n,t){1&n&&(_(0,"th",32),k(1,"Result"),v())}function xve(n,t){1&n&&(_(0,"span"),k(1,"OK"),v())}function wve(n,t){if(1&n&&(_(0,"span"),k(1),v()),2&n){const e=O(2).$implicit;w(1),it(" ",e.customMessage.note," ")}}function Cve(n,t){1&n&&(_(0,"span"),k(1," Error "),v())}function kve(n,t){if(1&n&&(_(0,"span"),A(1,xve,2,0,"span",15),A(2,wve,2,1,"span",15),A(3,Cve,2,0,"span",15),v()),2&n){const e=O().$implicit;w(1),E("ngIf",null==e||null==e.inReferenceList?null:e.inReferenceList.value),w(1),E("ngIf",!(null!=e&&null!=e.inReferenceList&&e.inReferenceList.value)&&(null==e||null==e.customMessage?null:e.customMessage.value)),w(1),E("ngIf",!(null!=e&&null!=e.inReferenceList&&e.inReferenceList.value||null!=e&&null!=e.customMessage&&e.customMessage.value))}}function Eve(n,t){if(1&n&&(_(0,"td",33),A(1,kve,4,3,"span",15),v()),2&n){const e=O(2);w(1),E("ngIf",e.membersValidationResult)}}function Tve(n,t){1&n&&_e(0,"tr",34)}const Sve=function(n){return{"bg-pink":n}};function Dve(n,t){if(1&n&&_e(0,"tr",35),2&n){const e=t.$implicit,i=O(2);E("ngClass",la(1,Sve,!(null!=e.inReferenceList&&e.inReferenceList.value)&&i.membersValidationResult))}}function Ave(n,t){if(1&n&&(_(0,"div",23)(1,"table",24),zt(2,25),A(3,gve,2,0,"th",26),A(4,_ve,2,1,"td",27),jt(),zt(5,28),A(6,bve,2,0,"th",26),A(7,vve,2,1,"td",27),jt(),zt(8,29),A(9,yve,2,0,"th",26),A(10,Eve,2,1,"td",27),jt(),A(11,Tve,1,0,"tr",30),A(12,Dve,1,3,"tr",31),v()()),2&n){const e=O();w(1),E("dataSource",e.studentSubsetMembersDataSource),w(10),E("matHeaderRowDef",e.studentSubsetMembersDisplayedColumns),w(1),E("matRowDefColumns",e.studentSubsetMembersDisplayedColumns)}}function Ive(n,t){if(1&n){const e=Le();_(0,"button",40),z("click",function(){const o=he(e).$implicit;return fe(O(2).setAssignment(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e.name)}}function Mve(n,t){if(1&n&&(_(0,"div")(1,"h3"),k(2,"Assignment"),v(),_(3,"button",36),k(4),v(),_(5,"mat-menu",37,38),A(7,Ive,2,1,"button",39),v()()),2&n){const e=Pt(6),i=O();w(3),E("matMenuTriggerFor",e),w(1),it("Selected assignment: ",null==i.selectedAssignment?null:i.selectedAssignment.name,""),w(3),E("ngForOf",i.assignments)}}function Rve(n,t){if(1&n&&(_(0,"h3"),k(1),v()),2&n){const e=O();w(1),it(" Assignment: ",null==e.selectedAssignment?null:e.selectedAssignment.name," ")}}function Fve(n,t){1&n&&(_(0,"ol")(1,"li"),k(2,"1- Upload definition file"),v(),_(3,"li"),k(4,"2- Upload members file"),v(),_(5,"li"),k(6,"3- Click validate"),v()())}function Pve(n,t){1&n&&(_(0,"ol")(1,"li"),k(2,"1- Upload members file"),v(),_(3,"li"),k(4,"2- Click validate"),v()())}function Ove(n,t){if(1&n){const e=Le();_(0,"div")(1,"div")(2,"h3"),k(3,"Reference Data"),v(),_(4,"mat-form-field",41)(5,"mat-label"),k(6,"Textarea"),v(),_(7,"textarea",42),z("ngModelChange",function(r){return he(e),fe(O().assignmentsString=r)}),v()(),_(8,"button",10),z("click",function(){return he(e),fe(O().updateAssignments())}),k(9,"Update Assignments"),v()()()}if(2&n){const e=O();w(7),E("ngModel",e.assignmentsString)}}let Nve=(()=>{class n{constructor(e,i,r,o){this.http=e,this.terminologyService=i,this._snackBar=r,this.activatedRoute=o,this.studentSubsetMembersDisplayedColumns=["referencedComponentId","name","result"],this.studentSubsetMembersDataSource=new uu,this.studentSubsetmembers=[],this.studentSubsetDefinition="",this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersNotInRefrenceListResult="",this.membersValidationResult=!1,this.refrenceListVsStudentListResult="",this.embeddedMode=!1,this.loading=!1,this.ok="\u2705",this.error="\u{1f7e5}",this.assignments=[{name:"Assignment X",referenceData:[{referencedComponentId:"403197009",name:"Sun-induced wrinkles"},{referencedComponentId:"279002006",name:"Lichenification of skin"},{referencedComponentId:"274672009",name:"Changes in skin texture"},{referencedComponentId:"271767006",name:"Peeling of skin"},{referencedComponentId:"271761007",name:"Scaly skin"},{referencedComponentId:"247434009",name:"Wrinkled skin"}],referenceDefinition:"< 185823004 |Finding of skin texture (finding)|",keyConceptsInECL:[{code:"185823004",display:"Finding of skin texture (finding)"}],customMessages:[{conceptId:"85345005",note:"wrong hierarchy",principle:"wrong hierarchy"},{conceptId:"403197009",note:"wrong hierarchy",principle:"wrong hierarchy"}]}],this.assignmentsString=JSON.stringify(this.assignments),this.selectedAssignment=this.assignments[0],this.referenceDataDisplayedColumns=["referencedComponentId","name"],this.referenceDataDataSource=new uu(this.selectedAssignment.referenceData)}ngOnInit(){var e=this;return xe(function*(){const i=yield oo(e.http.get("assets/definitions/assignments.json"));e.assignments=i,e.assignmentsString=JSON.stringify(e.assignments),e.setAssignment(e.assignments[0]),e.activatedRoute.queryParams.subscribe(r=>{r.assignment&&e.setAssignment(e.assignments.find(o=>o.name===r.assignment)),e.embeddedMode="true"===r.embedded})})()}setAssignment(e){e&&(this.selectedAssignment=e,this.referenceDataDataSource=new uu(this.selectedAssignment.referenceData))}checkStudentECLvsStudentList(){var e=this;return xe(function*(){if(!e.studentSubsetDefinition){let r=yield e.terminologyService.expandValueSet(e.studentSubsetDefinition,"").toPromise(),s=0;e.studentSubsetmembers.forEach(a=>{r.expansion.contains.find(l=>l.code===a.referencedComponentId)?a.inStudentECL={value:!0,message:""}:(a.inStudentECL={value:!1,message:""},s++)})}return 0})()}checkStudentECLvsKeyConcept(){if(this.studentSubsetDefinition){console.log("Student ECL not defined");let e=this.studentSubsetDefinition,r=!0;return this.selectedAssignment.keyConceptsInECL.forEach(o=>{e.includes(o.code)||(r=!1)}),r}return!0}checkStudentListVsReferenceList(){let i=this.selectedAssignment.referenceData;this.studentSubsetmembers.forEach(o=>{o.inReferenceList=i.find(a=>a.referencedComponentId===o.referencedComponentId)?{value:!0,message:""}:{value:!1,message:""}})}checkReferenceListVsStudentList(){let e=this.studentSubsetmembers,r=0;return this.selectedAssignment.referenceData.forEach(o=>{e.find(a=>a.referencedComponentId===o.referencedComponentId)?o.inStudentList={value:!0,message:""}:(o.inStudentList={value:!1,message:""},r++)}),r}checkStudentListVsCustomMessages(){let i=this.selectedAssignment.customMessages;this.studentSubsetmembers.forEach(r=>{const o=i.find(s=>s.conceptId===r.referencedComponentId);r.customMessage=o?{value:!0,principle:o.principle,note:o.note}:{value:!1,principle:"",note:""}})}updateAssignments(){this.assignments=JSON.parse(this.assignmentsString),this.setAssignment(this.assignments[0])}validateAssignment(){var e=this;return xe(function*(){if(e.loading=!0,e.keyConceptValidationResult="",e.definitionVsMembersValidationResult="",e.membersValidationResult=!1,e.loading=!0,e.studentSubsetDefinition){let o=yield e.checkStudentECLvsStudentList();e.definitionVsMembersValidationResult=o>0?e.error+" "+o+" members not found in student ECL":e.ok+" All members found in student ECL",e.keyConceptValidationResult=e.checkStudentECLvsKeyConcept()?e.ok+" Student ECL contains all key concepts":e.error+" Student ECL does not contain all key concepts"}e.checkStudentListVsReferenceList();let i=e.studentSubsetmembers.filter(o=>!o.inReferenceList.value).length;e.membersNotInRefrenceListResult=i>0?e.error+" "+i+" members not found in reference list":e.ok+" All members found in reference list",e.checkStudentListVsCustomMessages();let r=e.checkReferenceListVsStudentList();e.refrenceListVsStudentListResult=r>0?e.error+" "+r+" "+(r>1?"concepts are":"concept is")+" missing in the uploaded member list that would be recommended to be included in this subset":e.ok+" All recommended concepts are included in this subset",e.loading=!1,e.membersValidationResult=!0})()}onSubsetmembersFileSelected(e){this.studentSubsetmembers=[],this.studentSubsetMembersDataSource=new uu,this.studentSubsetMembersDataSource.sort=this.sort,this.loading=!0;const i=e.target.files?.[0];if(i){const r=new FileReader;r.onload=o=>{try{const a=r.result.split("\n"),c=a[0].split("\t");if(c.length<2)throw new Error("Invalid file format");const l=c.indexOf("referencedComponentId"),d=c.indexOf("name");if(l<0||d<0)throw new Error("Invalid file format");const u=[];for(let h=1;hh.name.localeCompare(f.name)),this.studentSubsetmembers=u,this.studentSubsetMembersDataSource.data=u,this.loading=!1}catch(s){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+s.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=o=>{this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+o,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(i)}else this.loading=!1}onDefinitionFileSelected(e){this.studentSubsetDefinition="",this.loading=!0;const i=e.target.files?.[0];if(i){const r=new FileReader;r.onload=o=>{try{const c=r.result.replace(/\r/g,"").split("\n"),l=c[0].split("\t");if(l.length<2)throw new Error("Invalid file format");const d=l.indexOf("referencedComponentId"),u=l.indexOf("definition");if(d<0||u<0)throw new Error("Invalid file format");this.studentSubsetDefinition=c[1].split("\t")[u],this.loading=!1}catch(s){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+s.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=o=>{this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+o,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(i)}else this.loading=!1}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ml),y(Ur),y(Af),y(Dl))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-subset-validator"]],viewQuery:function(i,r){if(1&i&&pt(Kl,5),2&i){let o;Ae(o=Ie())&&(r.sort=o.first)}},decls:31,vars:12,consts:[[1,"layout-container"],[1,"left-column"],[1,"upload-controls"],[1,"mb-4"],["class","terminal-style",4,"ngIf"],["type","file",2,"display","none",3,"change"],["fileInput",""],["fileInputDefinition",""],[1,"buttons-panel"],["mat-flat-button","","color","primary",3,"disabled","click"],["mat-flat-button","","color","primary",3,"click"],["class","spinner","diameter","30",4,"ngIf"],["class","blue-rounded-div",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"right-column"],[4,"ngIf"],[1,"instructions"],[1,"terminal-style"],["diameter","30",1,"spinner"],[1,"blue-rounded-div"],[1,"text-white","mb-1"],["class","validation-result",4,"ngIf"],[1,"validation-result"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","referencedComponentId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","result"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"ngClass"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"wide-menu"],["demosMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["appearance","fill"],["matInput","",3,"ngModel","ngModelChange"]],template:function(i,r){if(1&i){const o=Le();_(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3"),k(4,"Subset Members Validator"),v(),_(5,"p",3),k(6),v(),A(7,uve,2,1,"p",4),_(8,"input",5,6),z("change",function(a){return r.onSubsetmembersFileSelected(a)}),v(),_(10,"input",5,7),z("change",function(a){return r.onDefinitionFileSelected(a)}),v(),_(12,"div",8)(13,"button",9),z("click",function(){return he(o),fe(Pt(11).click())}),k(14," Upload Definition File "),v(),_(15,"button",10),z("click",function(){return he(o),fe(Pt(9).click())}),k(16,"Upload Members File"),v(),_(17,"button",9),z("click",function(){return r.validateAssignment()}),k(18,"Validate"),v(),A(19,hve,1,0,"mat-spinner",11),v(),A(20,pve,9,4,"div",12),v(),A(21,Ave,13,3,"div",13),v(),_(22,"div",14),A(23,Mve,8,3,"div",15),A(24,Rve,2,1,"h3",15),_(25,"h3"),k(26,"Instructions"),v(),_(27,"div",16),A(28,Fve,7,0,"ol",15),A(29,Pve,5,0,"ol",15),v(),A(30,Ove,10,1,"div",15),v()()}2&i&&(w(6),it("Validating against ",r.terminologyService.getFhirUrlParam(),""),w(1),E("ngIf",r.studentSubsetDefinition),w(6),E("disabled",!r.selectedAssignment.referenceDefinition),w(4),E("disabled",!r.studentSubsetMembersDataSource.data.length),w(2),E("ngIf",r.loading),w(1),E("ngIf",!r.loading&&r.membersNotInRefrenceListResult),w(1),E("ngIf",!r.loading&&r.studentSubsetMembersDataSource.data.length),w(2),E("ngIf",!r.embeddedMode),w(1),E("ngIf",r.embeddedMode),w(4),E("ngIf",r.selectedAssignment.referenceDefinition),w(1),E("ngIf",!r.selectedAssignment.referenceDefinition),w(1),E("ngIf",!r.embeddedMode))},dependencies:[ha,io,ri,Fo,lu,$a,du,ba,gs,Bl,ql,Us,qo,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,ps],styles:["[_nghost-%COMP%]{display:block;height:calc(100% - 65px)}.layout-container[_ngcontent-%COMP%]{display:flex;height:100%}.left-column[_ngcontent-%COMP%]{flex:0 0 68%;display:flex;flex-direction:column;height:100%}.right-column[_ngcontent-%COMP%]{flex:0 0 28%}.buttons-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-top:2rem}.upload-controls[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.table-container[_ngcontent-%COMP%]{overflow-y:auto}.upload-controls[_ngcontent-%COMP%]{margin-left:20px}table[_ngcontent-%COMP%]{width:100%}.validation-result[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.blue-rounded-div[_ngcontent-%COMP%]{border-radius:10px;background-color:#4d7fb4;padding:.5rem 3rem 1rem;width:80%;color:#f5f5f5;margin-top:20px}.terminal-style[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem;background-color:#000;color:#fff;padding:10px;border-radius:10px;margin-top:20px;width:80%}h4[_ngcontent-%COMP%]{margin-top:10px}.instructions[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px;font-weight:lighter;font-size:larger}h3[_ngcontent-%COMP%]{margin-top:10px}.bg-pink[_ngcontent-%COMP%]{background-color:pink}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#aba9a9!important}"]})}return n})();const V6=function(n){const t=[];let e=0;for(let i=0;i>6|192,t[e++]=63&r|128):55296==(64512&r)&&i+1>18|240,t[e++]=r>>12&63|128,t[e++]=r>>6&63|128,t[e++]=63&r|128):(t[e++]=r>>12|224,t[e++]=r>>6&63|128,t[e++]=63&r|128)}return t},U6={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(n,t){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();const e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r>6,f=63&l;c||(f=64,s||(h=64)),i.push(e[o>>2],e[(3&o)<<4|a>>4],e[h],e[f])}return i.join("")},encodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(n):this.encodeByteArray(V6(n),t)},decodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(n):function(n){const t=[];let e=0,i=0;for(;e191&&r<224){const o=n[e++];t[i++]=String.fromCharCode((31&r)<<6|63&o)}else if(r>239&&r<365){const c=((7&r)<<18|(63&n[e++])<<12|(63&n[e++])<<6|63&n[e++])-65536;t[i++]=String.fromCharCode(55296+(c>>10)),t[i++]=String.fromCharCode(56320+(1023&c))}else{const o=n[e++],s=n[e++];t[i++]=String.fromCharCode((15&r)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(n,t))},decodeStringToByteArray(n,t){this.init_();const e=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r>4),64!==l&&(i.push(a<<4&240|l>>2),64!==u&&i.push(l<<6&192|u))}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}};class Hve extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const ox=function(n){return function(n){const t=V6(n);return U6.encodeByteArray(t,!0)}(n).replace(/\./g,"")},sx=()=>{try{return function $ve(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const n=process.env.__FIREBASE_DEFAULTS__;return n?JSON.parse(n):void 0})()||(()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=n&&function(n){try{return U6.decodeString(n,!0)}catch(t){console.error("base64Decode failed: ",t)}return null}(n[1]);return t&&JSON.parse(t)})()}catch(n){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`)}},Kve=n=>{const t=(n=>{var t,e;return null===(e=null===(t=sx())||void 0===t?void 0:t.emulatorHosts)||void 0===e?void 0:e[n]})(n);if(!t)return;const e=t.lastIndexOf(":");if(e<=0||e+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const i=parseInt(t.substring(e+1),10);return"["===t[0]?[t.substring(1,e-1),i]:[t.substring(0,e),i]},z6=()=>{var n;return null===(n=sx())||void 0===n?void 0:n.config};class j6{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,i)=>{e?this.reject(e):this.resolve(i),"function"==typeof t&&(this.promise.catch(()=>{}),1===t.length?t(e):t(e,i))}}}function Yl(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function $6(){try{return"object"==typeof indexedDB}catch{return!1}}class Uf extends Error{constructor(t,e,i){super(e),this.code=t,this.customData=i,this.name="FirebaseError",Object.setPrototypeOf(this,Uf.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,G6.prototype.create)}}class G6{constructor(t,e,i){this.service=t,this.serviceName=e,this.errors=i}create(t,...e){const i=e[0]||{},r=`${this.service}/${t}`,o=this.errors[t],s=o?function tye(n,t){return n.replace(nye,(e,i)=>{const r=t[i];return null!=r?String(r):`<${i}?>`})}(o,i):"Error";return new Uf(r,`${this.serviceName}: ${s} (${r}).`,i)}}const nye=/\{\$([^}]+)}/g;function cD(n,t){if(n===t)return!0;const e=Object.keys(n),i=Object.keys(t);for(const r of e){if(!i.includes(r))return!1;const o=n[r],s=t[r];if(q6(o)&&q6(s)){if(!cD(o,s))return!1}else if(o!==s)return!1}for(const r of i)if(!e.includes(r))return!1;return!0}function q6(n){return null!==n&&"object"==typeof n}function Hf(n){return n&&n._delegate?n._delegate:n}class zg{constructor(t,e,i){this.name=t,this.instanceFactory=e,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}const bu="[DEFAULT]";class dye{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){const i=new j6;if(this.instancesDeferred.set(e,i),this.isInitialized(e)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:e});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;const i=this.normalizeInstanceIdentifier(t?.identifier),r=null!==(e=t?.optional)&&void 0!==e&&e;if(!this.isInitialized(i)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:i})}catch(o){if(r)return null;throw o}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,this.shouldAutoInitialize()){if(function hye(n){return"EAGER"===n.instantiationMode}(t))try{this.getOrInitializeService({instanceIdentifier:bu})}catch{}for(const[e,i]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const o=this.getOrInitializeService({instanceIdentifier:r});i.resolve(o)}catch{}}}}clearInstance(t=bu){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){var t=this;return xe(function*(){const e=Array.from(t.instances.values());yield Promise.all([...e.filter(i=>"INTERNAL"in i).map(i=>i.INTERNAL.delete()),...e.filter(i=>"_delete"in i).map(i=>i._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(t=bu){return this.instances.has(t)}getOptions(t=bu){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:e={}}=t,i=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:i,options:e});for(const[o,s]of this.instancesDeferred.entries())i===this.normalizeInstanceIdentifier(o)&&s.resolve(r);return r}onInit(t,e){var i;const r=this.normalizeInstanceIdentifier(e),o=null!==(i=this.onInitCallbacks.get(r))&&void 0!==i?i:new Set;o.add(t),this.onInitCallbacks.set(r,o);const s=this.instances.get(r);return s&&t(s,r),()=>{o.delete(t)}}invokeOnInitCallbacks(t,e){const i=this.onInitCallbacks.get(e);if(i)for(const r of i)try{r(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(n=t,n===bu?void 0:n),options:e}),this.instances.set(t,i),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch{}var n;return i||null}normalizeInstanceIdentifier(t=bu){return this.component?this.component.multipleInstances?t:bu:t}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class fye{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const e=new dye(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}}const uD=[];var En=(()=>{return(n=En||(En={}))[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT",En;var n})();const Q6={debug:En.DEBUG,verbose:En.VERBOSE,info:En.INFO,warn:En.WARN,error:En.ERROR,silent:En.SILENT},mye=En.INFO,pye={[En.DEBUG]:"log",[En.VERBOSE]:"log",[En.INFO]:"info",[En.WARN]:"warn",[En.ERROR]:"error"},gye=(n,t,...e)=>{if(tt.some(e=>n instanceof e);let X6,Y6;const Z6=new WeakMap,hD=new WeakMap,J6=new WeakMap,fD=new WeakMap,mD=new WeakMap;let pD={get(n,t,e){if(n instanceof IDBTransaction){if("done"===t)return hD.get(n);if("objectStoreNames"===t)return n.objectStoreNames||J6.get(n);if("store"===t)return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return Zl(n[t])},set:(n,t,e)=>(n[t]=e,!0),has:(n,t)=>n instanceof IDBTransaction&&("done"===t||"store"===t)||t in n};function kye(n){return"function"==typeof n?function Cye(n){return n!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function vye(){return Y6||(Y6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(n)?function(...t){return n.apply(gD(this),t),Zl(Z6.get(this))}:function(...t){return Zl(n.apply(gD(this),t))}:function(t,...e){const i=n.call(gD(this),t,...e);return J6.set(i,t.sort?t.sort():[t]),Zl(i)}}(n):(n instanceof IDBTransaction&&function xye(n){if(hD.has(n))return;const t=new Promise((e,i)=>{const r=()=>{n.removeEventListener("complete",o),n.removeEventListener("error",s),n.removeEventListener("abort",s)},o=()=>{e(),r()},s=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",o),n.addEventListener("error",s),n.addEventListener("abort",s)});hD.set(n,t)}(n),_ye(n,function bye(){return X6||(X6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(n,pD):n)}function Zl(n){if(n instanceof IDBRequest)return function yye(n){const t=new Promise((e,i)=>{const r=()=>{n.removeEventListener("success",o),n.removeEventListener("error",s)},o=()=>{e(Zl(n.result)),r()},s=()=>{i(n.error),r()};n.addEventListener("success",o),n.addEventListener("error",s)});return t.then(e=>{e instanceof IDBCursor&&Z6.set(e,n)}).catch(()=>{}),mD.set(t,n),t}(n);if(fD.has(n))return fD.get(n);const t=kye(n);return t!==n&&(fD.set(n,t),mD.set(t,n)),t}const gD=n=>mD.get(n),Tye=["get","getKey","getAll","getAllKeys","count"],Sye=["put","add","delete","clear"],_D=new Map;function e7(n,t){if(!(n instanceof IDBDatabase)||t in n||"string"!=typeof t)return;if(_D.get(t))return _D.get(t);const e=t.replace(/FromIndex$/,""),i=t!==e,r=Sye.includes(e);if(!(e in(i?IDBIndex:IDBObjectStore).prototype)||!r&&!Tye.includes(e))return;const o=function(){var s=xe(function*(a,...c){const l=this.transaction(a,r?"readwrite":"readonly");let d=l.store;return i&&(d=d.index(c.shift())),(yield Promise.all([d[e](...c),r&&l.done]))[0]});return function(c){return s.apply(this,arguments)}}();return _D.set(t,o),o}!function wye(n){pD=n(pD)}(n=>({...n,get:(t,e,i)=>e7(t,e)||n.get(t,e,i),has:(t,e)=>!!e7(t,e)||n.has(t,e)}));class Dye{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(function Aye(n){return"VERSION"===n.getComponent()?.type}(e)){const i=e.getImmediate();return`${i.library}/${i.version}`}return null}).filter(e=>e).join(" ")}}const bD="@firebase/app",vu=new K6("@firebase/app"),cx="[DEFAULT]",txe={[bD]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},yu=new Map,lx=new Map;function nxe(n,t){try{n.container.addComponent(t)}catch(e){vu.debug(`Component ${t.name} failed to register with FirebaseApp ${n.name}`,e)}}function dx(n){const t=n.name;if(lx.has(t))return vu.debug(`There were multiple attempts to register component ${t}.`),!1;lx.set(t,n);for(const e of yu.values())nxe(e,n);return!0}const qc=new G6("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class rxe{constructor(t,e,i){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new zg("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw qc.create("app-deleted",{appName:this._name})}}function i7(n,t={}){let e=n;"object"!=typeof t&&(t={name:t});const i=Object.assign({name:cx,automaticDataCollectionEnabled:!1},t),r=i.name;if("string"!=typeof r||!r)throw qc.create("bad-app-name",{appName:String(r)});if(e||(e=z6()),!e)throw qc.create("no-options");const o=yu.get(r);if(o){if(cD(e,o.options)&&cD(i,o.config))return o;throw qc.create("duplicate-app",{appName:r})}const s=new fye(r);for(const c of lx.values())s.addComponent(c);const a=new rxe(e,i,s);return yu.set(r,a),a}function zf(n,t,e){var i;let r=null!==(i=txe[n])&&void 0!==i?i:n;e&&(r+=`-${e}`);const o=r.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const a=[`Unable to register library "${r}" with version "${t}":`];return o&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void vu.warn(a.join(" "))}dx(new zg(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}const axe="firebase-heartbeat-database",cxe=1,jg="firebase-heartbeat-store";let yD=null;function r7(){return yD||(yD=function Eye(n,t,{blocked:e,upgrade:i,blocking:r,terminated:o}={}){const s=indexedDB.open(n,t),a=Zl(s);return i&&s.addEventListener("upgradeneeded",c=>{i(Zl(s.result),c.oldVersion,c.newVersion,Zl(s.transaction),c)}),e&&s.addEventListener("blocked",c=>e(c.oldVersion,c.newVersion,c)),a.then(c=>{o&&c.addEventListener("close",()=>o()),r&&c.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}(axe,cxe,{upgrade:(n,t)=>{if(0===t)try{n.createObjectStore(jg)}catch(e){console.warn(e)}}}).catch(n=>{throw qc.create("idb-open",{originalErrorMessage:n.message})})),yD}function xD(){return(xD=xe(function*(n){try{const e=(yield r7()).transaction(jg),i=yield e.objectStore(jg).get(s7(n));return yield e.done,i}catch(t){if(t instanceof Uf)vu.warn(t.message);else{const e=qc.create("idb-get",{originalErrorMessage:t?.message});vu.warn(e.message)}}})).apply(this,arguments)}function o7(n,t){return wD.apply(this,arguments)}function wD(){return(wD=xe(function*(n,t){try{const i=(yield r7()).transaction(jg,"readwrite");yield i.objectStore(jg).put(t,s7(n)),yield i.done}catch(e){if(e instanceof Uf)vu.warn(e.message);else{const i=qc.create("idb-set",{originalErrorMessage:e?.message});vu.warn(i.message)}}})).apply(this,arguments)}function s7(n){return`${n.name}!${n.options.appId}`}class hxe{constructor(t){this.container=t,this._heartbeatsCache=null;const e=this.container.getProvider("app").getImmediate();this._storage=new mxe(e),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){var t=this;return xe(function*(){var e,i;const o=t.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=a7();if((null!=(null===(e=t._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||(t._heartbeatsCache=yield t._heartbeatsCachePromise,null!=(null===(i=t._heartbeatsCache)||void 0===i?void 0:i.heartbeats)))&&t._heartbeatsCache.lastSentHeartbeatDate!==s&&!t._heartbeatsCache.heartbeats.some(a=>a.date===s))return t._heartbeatsCache.heartbeats.push({date:s,agent:o}),t._heartbeatsCache.heartbeats=t._heartbeatsCache.heartbeats.filter(a=>{const c=new Date(a.date).valueOf();return Date.now()-c<=2592e6}),t._storage.overwrite(t._heartbeatsCache)})()}getHeartbeatsHeader(){var t=this;return xe(function*(){var e;if(null===t._heartbeatsCache&&(yield t._heartbeatsCachePromise),null==(null===(e=t._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===t._heartbeatsCache.heartbeats.length)return"";const i=a7(),{heartbeatsToSend:r,unsentEntries:o}=function fxe(n,t=1024){const e=[];let i=n.slice();for(const r of n){const o=e.find(s=>s.agent===r.agent);if(o){if(o.dates.push(r.date),c7(e)>t){o.dates.pop();break}}else if(e.push({agent:r.agent,dates:[r.date]}),c7(e)>t){e.pop();break}i=i.slice(1)}return{heartbeatsToSend:e,unsentEntries:i}}(t._heartbeatsCache.heartbeats),s=ox(JSON.stringify({version:2,heartbeats:r}));return t._heartbeatsCache.lastSentHeartbeatDate=i,o.length>0?(t._heartbeatsCache.heartbeats=o,yield t._storage.overwrite(t._heartbeatsCache)):(t._heartbeatsCache.heartbeats=[],t._storage.overwrite(t._heartbeatsCache)),s})()}}function a7(){return(new Date).toISOString().substring(0,10)}class mxe{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return xe(function*(){return!!$6()&&function Jve(){return new Promise((n,t)=>{try{let e=!0;const i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var o;t((null===(o=r.error)||void 0===o?void 0:o.message)||"")}}catch(e){t(e)}})}().then(()=>!0).catch(()=>!1)})()}read(){var t=this;return xe(function*(){if(yield t._canUseIndexedDBPromise){const i=yield function lxe(n){return xD.apply(this,arguments)}(t.app);return i?.heartbeats?i:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(t){var e=this;return xe(function*(){var i;if(yield e._canUseIndexedDBPromise){const o=yield e.read();return o7(e.app,{lastSentHeartbeatDate:null!==(i=t.lastSentHeartbeatDate)&&void 0!==i?i:o.lastSentHeartbeatDate,heartbeats:t.heartbeats})}})()}add(t){var e=this;return xe(function*(){var i;if(yield e._canUseIndexedDBPromise){const o=yield e.read();return o7(e.app,{lastSentHeartbeatDate:null!==(i=t.lastSentHeartbeatDate)&&void 0!==i?i:o.lastSentHeartbeatDate,heartbeats:[...o.heartbeats,...t.heartbeats]})}})()}}function c7(n){return ox(JSON.stringify({version:2,heartbeats:n})).length}!function pxe(n){dx(new zg("platform-logger",t=>new Dye(t),"PRIVATE")),dx(new zg("heartbeat",t=>new hxe(t),"PRIVATE")),zf(bD,"0.9.29",n),zf(bD,"0.9.29","esm2017"),zf("fire-js","")}("");var Ye,gxe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},va={},CD=CD||{},Lt=gxe||self;function ux(n){var t=typeof n;return"array"==(t="object"!=t?t:n?Array.isArray(n)?"array":t:"null")||"object"==t&&"number"==typeof n.length}function $g(n){var t=typeof n;return"object"==t&&null!=n||"function"==t}var kD="closure_uid_"+(1e9*Math.random()>>>0),bxe=0;function vxe(n,t,e){return n.call.apply(n.bind,arguments)}function yxe(n,t,e){if(!n)throw Error();if(2{};Lt.addEventListener("test",e,t),Lt.removeEventListener("test",e,t)}catch{}return n}();function Gg(n){return/^[\s\xa0]*$/.test(n)}function fx(){var n=Lt.navigator;return n&&(n=n.userAgent)?n:""}function qa(n){return-1!=fx().indexOf(n)}function TD(n){return TD[" "](n),n}TD[" "]=function(){};var DD,n,kxe=qa("Opera"),jf=qa("Trident")||qa("MSIE"),u7=qa("Edge"),SD=u7||jf,h7=qa("Gecko")&&!(-1!=fx().toLowerCase().indexOf("webkit")&&!qa("Edge"))&&!(qa("Trident")||qa("MSIE"))&&!qa("Edge"),Exe=-1!=fx().toLowerCase().indexOf("webkit")&&!qa("Edge");function f7(){var n=Lt.document;return n?n.documentMode:void 0}e:{var AD="",ID=(n=fx(),h7?/rv:([^\);]+)(\)|;)/.exec(n):u7?/Edge\/([\d\.]+)/.exec(n):jf?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(n):Exe?/WebKit\/(\S+)/.exec(n):kxe?/(?:Version)[ \/]?(\S+)/.exec(n):void 0);if(ID&&(AD=ID?ID[1]:""),jf){var MD=f7();if(null!=MD&&MD>parseFloat(AD)){DD=String(MD);break e}}DD=AD}var Txe=Lt.document&&jf&&(f7()||parseInt(DD,10))||void 0;function Wg(n,t){if(uo.call(this,n?n.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,n){var e=this.type=n.type,i=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:null;if(this.target=n.target||n.srcElement,this.g=t,t=n.relatedTarget){if(h7){e:{try{TD(t.nodeName);var r=!0;break e}catch{}r=!1}r||(t=null)}}else"mouseover"==e?t=n.fromElement:"mouseout"==e&&(t=n.toElement);this.relatedTarget=t,i?(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0):(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0),this.button=n.button,this.key=n.key||"",this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.pointerId=n.pointerId||0,this.pointerType="string"==typeof n.pointerType?n.pointerType:Sxe[n.pointerType]||"",this.state=n.state,this.i=n,n.defaultPrevented&&Wg.$.h.call(this)}}Dr(Wg,uo);var Sxe={2:"touch",3:"pen",4:"mouse"};Wg.prototype.h=function(){Wg.$.h.call(this);var n=this.i;n.preventDefault?n.preventDefault():n.returnValue=!1};var qg="closure_listenable_"+(1e6*Math.random()|0),Dxe=0;function Axe(n,t,e,i,r){this.listener=n,this.proxy=null,this.src=t,this.type=e,this.capture=!!i,this.la=r,this.key=++Dxe,this.fa=this.ia=!1}function mx(n){n.fa=!0,n.listener=null,n.proxy=null,n.src=null,n.la=null}function FD(n,t,e){for(const i in n)t.call(e,n[i],i,n)}function p7(n){const t={};for(const e in n)t[e]=n[e];return t}const g7="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function _7(n,t){let e,i;for(let r=1;r>>0);function HD(n){return"function"==typeof n?n:(n[UD]||(n[UD]=function(t){return n.handleEvent(t)}),n[UD])}function Ar(){Jl.call(this),this.i=new px(this),this.S=this,this.J=null}function zr(n,t){var e,i=n.J;if(i)for(e=[];i;i=i.J)e.push(i);if(n=n.S,i=t.type||t,"string"==typeof t)t=new uo(t,n);else if(t instanceof uo)t.target=t.target||n;else{var r=t;_7(t=new uo(i,n),r)}if(r=!0,e)for(var o=e.length-1;0<=o;o--){var s=t.g=e[o];r=gx(s,i,!0,t)&&r}if(r=gx(s=t.g=n,i,!0,t)&&r,r=gx(s,i,!1,t)&&r,e)for(o=0;onew Nxe,n=>n.reset());class Nxe{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}function Lxe(n){var t=1;n=n.split(":");const e=[];for(;0{throw n},0)}let Qg,Kg=!1,jD=new class Oxe{constructor(){this.h=this.g=null}add(t,e){const i=C7.get();i.set(t,e),this.h?this.h.next=i:this.g=i,this.h=i}},k7=()=>{const n=Lt.Promise.resolve(void 0);Qg=()=>{n.then(Vxe)}};var Vxe=()=>{for(var n;n=Pxe();){try{n.h.call(n.g)}catch(e){Bxe(e)}var t=C7;t.j(n),100>t.h&&(t.h++,n.next=t.g,t.g=n)}Kg=!1};function _x(n,t){Ar.call(this),this.h=n||1,this.g=t||Lt,this.j=lo(this.qb,this),this.l=Date.now()}function $D(n){n.ga=!1,n.T&&(n.g.clearTimeout(n.T),n.T=null)}function GD(n,t,e){if("function"==typeof n)e&&(n=lo(n,e));else{if(!n||"function"!=typeof n.handleEvent)throw Error("Invalid listener argument");n=lo(n.handleEvent,n)}return 2147483647{n.g=null,n.i&&(n.i=!1,E7(n))},n.j);const t=n.h;n.h=null,n.m.apply(null,t)}Dr(_x,Ar),(Ye=_x.prototype).ga=!1,Ye.T=null,Ye.qb=function(){if(this.ga){var n=Date.now()-this.l;0i.length)){var r=i[1];if(Array.isArray(r)&&!(1>r.length)){var o=r[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var s=1;st.length?XD:(t=t.slice(i,i+e),n.o=i+e,t))}function t_(n){n.Y=Date.now()+n.P,H7(n,n.P)}function H7(n,t){if(null!=n.C)throw Error("WatchDog timer not null");n.C=Zg(lo(n.lb,n),t)}function wx(n){n.C&&(Lt.clearTimeout(n.C),n.C=null)}function n_(n){0==n.l.H||n.J||m9(n.l,n)}function wu(n){wx(n);var t=n.M;t&&"function"==typeof t.sa&&t.sa(),n.M=null,$D(n.V),D7(n.U),n.g&&(t=n.g,n.g=null,t.abort(),t.sa())}function ZD(n,t){try{var e=n.l;if(0!=e.H&&(e.g==n||JD(e.i,n)))if(!n.K&&JD(e.i,n)&&3==e.H){try{var i=e.Ja.g.parse(t)}catch{i=null}if(Array.isArray(i)&&3==i.length){var r=i;if(0==r[0]){e:if(!e.u){if(e.g){if(!(e.g.G+3e3r[2]&&e.G&&0==e.A&&!e.v&&(e.v=Zg(lo(e.ib,e),6e3));if(1>=Y7(e.i)&&e.oa){try{e.oa()}catch{}e.oa=void 0}}else ku(e,11)}else if((n.K||e.g==n)&&Mx(e),!Gg(t))for(r=e.Ja.g.parse(t),t=0;td)&&(3!=d||SD||this.g&&(this.h.h||this.g.ja()||s9(this.g)))){this.J||4!=d||7==t||Yg(),wx(this);var e=this.g.da();this.ca=e;t:if(V7(this)){var i=s9(this.g);n="";var r=i.length,o=4==Qa(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){wu(this),n_(this);var s="";break t}this.h.i=new Lt.TextDecoder}for(t=0;tt)throw Error("Bad port number "+t);n.m=t}else n.m=null}function $7(n,t,e){t instanceof o_?(n.i=t,function t1e(n,t){t&&!n.j&&(ed(n),n.i=null,n.g.forEach(function(e,i){var r=i.toLowerCase();i!=r&&(W7(this,i),Q7(this,r,e))},n)),n.j=t}(n.i,n.h)):(e||(t=r_(t,Jxe)),n.i=new o_(t,n.h))}function mi(n,t,e){n.i.set(t,e)}function Ex(n){return mi(n,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),n}function i_(n,t){return n?t?decodeURI(n.replace(/%25/g,"%2525")):decodeURIComponent(n):""}function r_(n,t,e){return"string"==typeof n?(n=encodeURI(n).replace(t,Xxe),e&&(n=n.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n):null}function Xxe(n){return"%"+((n=n.charCodeAt(0))>>4&15).toString(16)+(15&n).toString(16)}Cu.prototype.toString=function(){var n=[],t=this.j;t&&n.push(r_(t,G7,!0),":");var e=this.g;return(e||"file"==t)&&(n.push("//"),(t=this.s)&&n.push(r_(t,G7,!0),"@"),n.push(encodeURIComponent(String(e)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.m)&&n.push(":",String(e))),(e=this.l)&&(this.g&&"/"!=e.charAt(0)&&n.push("/"),n.push(r_(e,"/"==e.charAt(0)?Zxe:Yxe,!0))),(e=this.i.toString())&&n.push("?",e),(e=this.o)&&n.push("#",r_(e,e1e)),n.join("")};var G7=/[#\/\?@]/g,Yxe=/[#\?:]/g,Zxe=/[#\?]/g,Jxe=/[#\?@]/g,e1e=/#/g;function o_(n,t){this.h=this.g=null,this.i=n||null,this.j=!!t}function ed(n){n.g||(n.g=new Map,n.h=0,n.i&&function Kxe(n,t){if(n){n=n.split("&");for(var e=0;e=n.j}function Y7(n){return n.h?1:n.g?n.g.size:0}function JD(n,t){return n.h?n.h==t:!!n.g&&n.g.has(t)}function e2(n,t){n.g?n.g.add(t):n.h=t}function Z7(n,t){n.h&&n.h==t?n.h=null:n.g&&n.g.has(t)&&n.g.delete(t)}function J7(n){if(null!=n.h)return n.i.concat(n.h.F);if(null!=n.g&&0!==n.g.size){let t=n.i;for(const e of n.g.values())t=t.concat(e.F);return t}return ED(n.i)}K7.prototype.cancel=function(){if(this.i=J7(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const n of this.g.values())n.cancel();this.g.clear()}};var r1e=class{stringify(n){return Lt.JSON.stringify(n,void 0)}parse(n){return Lt.JSON.parse(n,void 0)}};function o1e(){this.g=new r1e}function s1e(n,t,e){const i=e||"";try{z7(n,function(r,o){let s=r;$g(r)&&(s=zD(r)),t.push(i+o+"="+encodeURIComponent(s))})}catch(r){throw t.push(i+"type="+encodeURIComponent("_badmap")),r}}function Tx(n,t,e,i,r){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,r(i)}catch{}}function s_(n){this.l=n.ec||null,this.j=n.ob||!1}function Sx(n,t){Ar.call(this),this.F=n,this.u=t,this.m=void 0,this.readyState=t2,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Dr(s_,WD),s_.prototype.g=function(){return new Sx(this.l,this.j)},s_.prototype.i=function(n){return function(){return n}}({}),Dr(Sx,Ar);var t2=0;function e9(n){n.j.read().then(n.Xa.bind(n)).catch(n.ka.bind(n))}function a_(n){n.readyState=4,n.l=null,n.j=null,n.A=null,c_(n)}function c_(n){n.onreadystatechange&&n.onreadystatechange.call(n)}(Ye=Sx.prototype).open=function(n,t){if(this.readyState!=t2)throw this.abort(),Error("Error reopening a connection");this.C=n,this.B=t,this.readyState=1,c_(this)},Ye.send=function(n){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};n&&(t.body=n),(this.F||Lt).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},Ye.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,a_(this)),this.readyState=t2},Ye.$a=function(n){if(this.g&&(this.l=n,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=n.headers,this.readyState=2,c_(this)),this.g&&(this.readyState=3,c_(this),this.g)))if("arraybuffer"===this.responseType)n.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof Lt.ReadableStream<"u"&&"body"in n){if(this.j=n.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;e9(this)}else n.text().then(this.Za.bind(this),this.ka.bind(this))},Ye.Xa=function(n){if(this.g){if(this.u&&n.value)this.response.push(n.value);else if(!this.u){var t=n.value?n.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!n.done}))&&(this.response=this.responseText+=t)}n.done?a_(this):c_(this),3==this.readyState&&e9(this)}},Ye.Za=function(n){this.g&&(this.response=this.responseText=n,a_(this))},Ye.Ya=function(n){this.g&&(this.response=n,a_(this))},Ye.ka=function(){this.g&&a_(this)},Ye.setRequestHeader=function(n,t){this.v.append(n,t)},Ye.getResponseHeader=function(n){return this.h&&this.h.get(n.toLowerCase())||""},Ye.getAllResponseHeaders=function(){if(!this.h)return"";const n=[],t=this.h.entries();for(var e=t.next();!e.done;)n.push((e=e.value)[0]+": "+e[1]),e=t.next();return n.join("\r\n")},Object.defineProperty(Sx.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(n){this.m=n?"include":"same-origin"}});var c1e=Lt.JSON.parse;function Ri(n){Ar.call(this),this.headers=new Map,this.u=n||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=t9,this.L=this.M=!1}Dr(Ri,Ar);var t9="",l1e=/^https?$/i,d1e=["POST","PUT"];function n9(n,t){n.h=!1,n.g&&(n.l=!0,n.g.abort(),n.l=!1),n.j=t,n.m=5,i9(n),Dx(n)}function i9(n){n.F||(n.F=!0,zr(n,"complete"),zr(n,"error"))}function r9(n){if(n.h&&typeof CD<"u"&&(!n.C[1]||4!=Qa(n)||2!=n.da()))if(n.v&&4==Qa(n))GD(n.La,0,n);else if(zr(n,"readystatechange"),4==Qa(n)){n.h=!1;try{const s=n.da();e:switch(s){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var e;if(!(e=t)){var i;if(i=0===s){var r=String(n.I).match(j7)[1]||null;!r&&Lt.self&&Lt.self.location&&(r=Lt.self.location.protocol.slice(0,-1)),i=!l1e.test(r?r.toLowerCase():"")}e=i}if(e)zr(n,"complete"),zr(n,"success");else{n.m=6;try{var o=2{}:null;n.g=null,n.C=null,t||zr(n,"ready");try{e.onreadystatechange=i}catch{}}}function o9(n){n.g&&n.L&&(n.g.ontimeout=null),n.A&&(Lt.clearTimeout(n.A),n.A=null)}function Qa(n){return n.g?n.g.readyState:0}function s9(n){try{if(!n.g)return null;if("response"in n.g)return n.g.response;switch(n.K){case t9:case"text":return n.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in n.g)return n.g.mozResponseArrayBuffer}return null}catch{return null}}function a9(n){let t="";return FD(n,function(e,i){t+=i,t+=":",t+=e,t+="\r\n"}),t}function n2(n,t,e){e:{for(i in e){var i=!1;break e}i=!0}i||(e=a9(e),"string"==typeof n?null!=e&&encodeURIComponent(String(e)):mi(n,t,e))}function l_(n,t,e){return e&&e.internalChannelParams&&e.internalChannelParams[n]||t}function c9(n){this.Ga=0,this.j=[],this.l=new bx,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=l_("failFast",!1,n),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=l_("baseRetryDelayMs",5e3,n),this.hb=l_("retryDelaySeedMs",1e4,n),this.eb=l_("forwardChannelMaxRetries",2,n),this.xa=l_("forwardChannelRequestTimeoutMs",2e4,n),this.va=n&&n.xmlHttpFactory||void 0,this.Ha=n&&n.useFetchStreams||!1,this.L=void 0,this.J=n&&n.supportsCrossDomainXhr||!1,this.K="",this.i=new K7(n&&n.concurrentRequestLimit),this.Ja=new o1e,this.P=n&&n.fastHandshake||!1,this.O=n&&n.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=n&&n.bc||!1,n&&n.Ea&&this.l.Ea(),n&&n.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&n&&n.detectBufferingProxy||!1,this.qa=void 0,n&&n.longPollingTimeout&&0l)o=Math.max(0,r[c].g-100),a=!1;else try{s1e(d,s,"req"+l+"_")}catch{i&&i(d)}}if(a){i=s.join("&");break e}}}return n=n.j.splice(0,e),t.F=n,i}function h9(n){if(!n.g&&!n.u){n.ba=1;var t=n.Ma;Qg||k7(),Kg||(Qg(),Kg=!0),jD.add(t,n),n.A=0}}function o2(n){return!(n.g||n.u||3<=n.A||(n.ba++,n.u=Zg(lo(n.Ma,n),p9(n,n.A)),n.A++,0))}function s2(n){null!=n.B&&(Lt.clearTimeout(n.B),n.B=null)}function f9(n){n.g=new e_(n,n.l,"rpc",n.ba),null===n.o&&(n.g.I=n.s),n.g.O=0;var t=Qc(n.wa);mi(t,"RID","rpc"),mi(t,"SID",n.K),mi(t,"AID",n.V),mi(t,"CI",n.G?"0":"1"),!n.G&&n.qa&&mi(t,"TO",n.qa),mi(t,"TYPE","xmlhttp"),d_(n,t),n.o&&n.s&&n2(t,n.o,n.s),n.L&&n.g.setTimeout(n.L);var e=n.g;n=n.pa,e.L=1,e.A=Ex(Qc(t)),e.u=null,e.S=!0,B7(e,n)}function Mx(n){null!=n.v&&(Lt.clearTimeout(n.v),n.v=null)}function m9(n,t){var e=null;if(n.g==t){Mx(n),s2(n),n.g=null;var i=2}else{if(!JD(n.i,t))return;e=t.F,Z7(n.i,t),i=1}if(0!=n.H)if(t.i)if(1==i){e=t.u?t.u.length:0,t=Date.now()-t.G;var r=n.C;zr(i=vx(),new R7(i,e)),Ix(n)}else h9(n);else if(3==(r=t.s)||0==r&&0=n.i.j-(n.m?1:0)||(n.m?(n.j=t.F.concat(n.j),0):1==n.H||2==n.H||n.C>=(n.cb?0:n.eb)||(n.m=Zg(lo(n.Na,n,t),p9(n,n.C)),n.C++,0)))}(n,t)||2==i&&o2(n)))switch(e&&0r;++r)i[r]=t.charCodeAt(e++)|t.charCodeAt(e++)<<8|t.charCodeAt(e++)<<16|t.charCodeAt(e++)<<24;else for(r=0;16>r;++r)i[r]=t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24;var o=n.g[3],s=(t=n.g[0])+(o^(e=n.g[1])&((r=n.g[2])^o))+i[0]+3614090360&4294967295;s=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=e+(s<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[1]+3905402710&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[2]+606105819&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[3]+3250441966&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^e&(r^o))+i[4]+4118548399&4294967295)<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[5]+1200080426&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[6]+2821735955&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[7]+4249261313&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^e&(r^o))+i[8]+1770035416&4294967295)<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[9]+2336552879&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[10]+4294925233&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[11]+2304563134&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^e&(r^o))+i[12]+1804603682&4294967295)<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[13]+4254626195&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[14]+2792965006&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[15]+1236535329&4294967295)<<22&4294967295|s>>>10))+((s=t+(r^o&(e^r))+i[1]+4129170786&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[6]+3225465664&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[11]+643717713&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[0]+3921069994&4294967295)<<20&4294967295|s>>>12))+((s=t+(r^o&(e^r))+i[5]+3593408605&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[10]+38016083&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[15]+3634488961&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[4]+3889429448&4294967295)<<20&4294967295|s>>>12))+((s=t+(r^o&(e^r))+i[9]+568446438&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[14]+3275163606&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[3]+4107603335&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[8]+1163531501&4294967295)<<20&4294967295|s>>>12))+((s=t+(r^o&(e^r))+i[13]+2850285829&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[2]+4243563512&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[7]+1735328473&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[12]+2368359562&4294967295)<<20&4294967295|s>>>12))+((s=t+(e^r^o)+i[5]+4294588738&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[8]+2272392833&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[11]+1839030562&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[14]+4259657740&4294967295)<<23&4294967295|s>>>9))+((s=t+(e^r^o)+i[1]+2763975236&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[4]+1272893353&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[7]+4139469664&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[10]+3200236656&4294967295)<<23&4294967295|s>>>9))+((s=t+(e^r^o)+i[13]+681279174&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[0]+3936430074&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[3]+3572445317&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[6]+76029189&4294967295)<<23&4294967295|s>>>9))+((s=t+(e^r^o)+i[9]+3654602809&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[12]+3873151461&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[15]+530742520&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[2]+3299628645&4294967295)<<23&4294967295|s>>>9))+((s=t+(r^(e|~o))+i[0]+4096336452&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[7]+1126891415&4294967295)<<10&4294967295|s>>>22))+((s=r+(t^(o|~e))+i[14]+2878612391&4294967295)<<15&4294967295|s>>>17))+((s=e+(o^(r|~t))+i[5]+4237533241&4294967295)<<21&4294967295|s>>>11))+((s=t+(r^(e|~o))+i[12]+1700485571&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[3]+2399980690&4294967295)<<10&4294967295|s>>>22))+((s=r+(t^(o|~e))+i[10]+4293915773&4294967295)<<15&4294967295|s>>>17))+((s=e+(o^(r|~t))+i[1]+2240044497&4294967295)<<21&4294967295|s>>>11))+((s=t+(r^(e|~o))+i[8]+1873313359&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[15]+4264355552&4294967295)<<10&4294967295|s>>>22))+((s=r+(t^(o|~e))+i[6]+2734768916&4294967295)<<15&4294967295|s>>>17))+((s=e+(o^(r|~t))+i[13]+1309151649&4294967295)<<21&4294967295|s>>>11))+((o=(t=e+((s=t+(r^(e|~o))+i[4]+4149444226&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[11]+3174756917&4294967295)<<10&4294967295|s>>>22))^((r=o+((s=r+(t^(o|~e))+i[2]+718787259&4294967295)<<15&4294967295|s>>>17))|~t))+i[9]+3951481745&4294967295,n.g[0]=n.g[0]+t&4294967295,n.g[1]=n.g[1]+(r+(s<<21&4294967295|s>>>11))&4294967295,n.g[2]=n.g[2]+r&4294967295,n.g[3]=n.g[3]+o&4294967295}function Gn(n,t){this.h=t;for(var e=[],i=!0,r=n.length-1;0<=r;r--){var o=0|n[r];i&&o==t||(e[r]=o,i=!1)}this.g=e}(Ye=Ri.prototype).Oa=function(n){this.M=n},Ye.ha=function(n,t,e,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+n);t=t?t.toUpperCase():"GET",this.I=n,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():KD.g(),this.C=function P7(n){return n.h||(n.h=n.i())}(this.u?this.u:KD),this.g.onreadystatechange=lo(this.La,this);try{this.G=!0,this.g.open(t,String(n),!0),this.G=!1}catch(o){return void n9(this,o)}if(n=e||"",e=new Map(this.headers),i)if(Object.getPrototypeOf(i)===Object.prototype)for(var r in i)e.set(r,i[r]);else{if("function"!=typeof i.keys||"function"!=typeof i.get)throw Error("Unknown input type for opt_headers: "+String(i));for(const o of i.keys())e.set(o,i.get(o))}i=Array.from(e.keys()).find(o=>"content-type"==o.toLowerCase()),r=Lt.FormData&&n instanceof Lt.FormData,!(0<=l7(d1e,t))||i||r||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[o,s]of e)this.g.setRequestHeader(o,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{o9(this),0=this.S)){var n=2*this.S;this.l.info("BP detection timer enabled: "+n),this.B=Zg(lo(this.jb,this),n)}},Ye.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Oo(10),Ax(this),f9(this))},Ye.ib=function(){null!=this.v&&(this.v=null,Ax(this),o2(this),Oo(19))},Ye.pb=function(n){n?(this.l.info("Successfully pinged google.com"),Oo(2)):(this.l.info("Failed to ping google.com"),Oo(1))},Ye.isActive=function(){return!!this.h&&this.h.isActive(this)},(Ye=v9.prototype).Ba=function(){},Ye.Aa=function(){},Ye.za=function(){},Ye.ya=function(){},Ye.isActive=function(){return!0},Ye.Va=function(){},Rx.prototype.g=function(n,t){return new _s(n,t)},Dr(_s,Ar),_s.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var n=this.g,t=this.l,e=this.h||void 0;Oo(0),n.Y=t,n.na=e||{},n.G=n.aa,n.I=_9(n,null,n.Y),Ix(n)},_s.prototype.close=function(){r2(this.g)},_s.prototype.u=function(n){var t=this.g;if("string"==typeof n){var e={};e.__data__=n,n=e}else this.v&&((e={}).__data__=zD(n),n=e);t.j.push(new class{constructor(n,t){this.g=n,this.map=t}}(t.fb++,n)),3==t.H&&Ix(t)},_s.prototype.N=function(){this.g.h=null,delete this.j,r2(this.g),delete this.g,_s.$.N.call(this)},Dr(y9,qD),Dr(x9,QD),Dr(Wf,v9),Wf.prototype.Ba=function(){zr(this.g,"a")},Wf.prototype.Aa=function(n){zr(this.g,new y9(n))},Wf.prototype.za=function(n){zr(this.g,new x9)},Wf.prototype.ya=function(){zr(this.g,"b")},Dr(ya,function m1e(){this.blockSize=-1}),ya.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},ya.prototype.j=function(n,t){void 0===t&&(t=n.length);for(var e=t-this.blockSize,i=this.m,r=this.h,o=0;othis.h?this.blockSize:2*this.blockSize)-this.h);n[0]=128;for(var t=1;tt;++t)for(var i=0;32>i;i+=8)n[e++]=this.g[t]>>>i&255;return n};var p1e={};function c2(n){return-128<=n&&128>n?function Cxe(n,t){var e=p1e;return Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=t(n)}(n,function(t){return new Gn([0|t],0>t?-1:0)}):new Gn([0|n],0>n?-1:0)}function Ka(n){if(isNaN(n)||!isFinite(n))return qf;if(0>n)return jr(Ka(-n));for(var t=[],e=1,i=0;n>=e;i++)t[i]=n/e|0,e*=l2;return new Gn(t,0)}var l2=4294967296,qf=c2(0),d2=c2(1),C9=c2(16777216);function Kc(n){if(0!=n.h)return!1;for(var t=0;t>>16,n[t]&=65535,t++}function u_(n,t){this.g=n,this.h=t}function Ox(n,t){if(Kc(t))throw Error("division by zero");if(Kc(n))return new u_(qf,qf);if(Hs(n))return t=Ox(jr(n),t),new u_(jr(t.g),jr(t.h));if(Hs(t))return t=Ox(n,jr(t)),new u_(jr(t.g),t.h);if(30=i.X(n);)e=k9(e),i=k9(i);var r=Qf(e,1),o=Qf(i,1);for(i=Qf(i,2),e=Qf(e,2);!Kc(i);){var s=o.add(i);0>=s.X(n)&&(r=r.add(e),o=s),i=Qf(i,1),e=Qf(e,1)}return t=Fx(n,r.R(t)),new u_(r,t)}for(r=qf;0<=n.X(t);){for(e=Math.max(1,Math.floor(n.ea()/t.ea())),i=48>=(i=Math.ceil(Math.log(e)/Math.LN2))?1:Math.pow(2,i-48),s=(o=Ka(e)).R(t);Hs(s)||0>>31;return new Gn(e,n.h)}function Qf(n,t){var e=t>>5;t%=32;for(var i=n.g.length-e,r=[],o=0;o>>t|n.D(o+e+1)<<32-t:n.D(o+e);return new Gn(r,n.h)}(Ye=Gn.prototype).ea=function(){if(Hs(this))return-jr(this).ea();for(var n=0,t=1,e=0;e(n=n||10)||36>>0).toString(n);if(Kc(e=r))return o+i;for(;6>o.length;)o="0"+o;i=o+i}},Ye.D=function(n){return 0>n?0:n>>16)+(this.D(r)>>>16)+(n.D(r)>>>16);i=s>>>16,e[r]=(s&=65535)<<16|(o&=65535)}return new Gn(e,-2147483648&e[e.length-1]?-1:0)},Ye.R=function(n){if(Kc(this)||Kc(n))return qf;if(Hs(this))return Hs(n)?jr(this).R(jr(n)):jr(jr(this).R(n));if(Hs(n))return jr(this.R(jr(n)));if(0>this.X(C9)&&0>n.X(C9))return Ka(this.ea()*n.ea());for(var t=this.g.length+n.g.length,e=[],i=0;i<2*t;i++)e[i]=0;for(i=0;i>>16,s=65535&this.D(i),a=n.D(r)>>>16,c=65535&n.D(r);e[2*i+2*r]+=s*c,Px(e,2*i+2*r),e[2*i+2*r+1]+=o*c,Px(e,2*i+2*r+1),e[2*i+2*r+1]+=s*a,Px(e,2*i+2*r+1),e[2*i+2*r+2]+=o*a,Px(e,2*i+2*r+2)}for(i=0;i(t=t||10)||36o?(o=Ka(Math.pow(t,o)),i=i.R(o).add(Ka(s))):i=(i=i.R(e)).add(Ka(s))}return i};var g1e=va.createWebChannelTransport=function(){return new Rx},_1e=va.getStatEventTarget=function(){return vx()},u2=va.ErrorCode=yx,b1e=va.EventType=F7,v1e=va.Event=xu,E9=va.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},Nx=(va.FetchXmlHttpFactory=s_,va.WebChannel=O7),y1e=va.XhrIo=Ri,x1e=va.Md5=ya,Kf=va.Integer=Gn;const T9="@firebase/firestore";class Ir{constructor(t){this.uid=t}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}Ir.UNAUTHENTICATED=new Ir(null),Ir.GOOGLE_CREDENTIALS=new Ir("google-credentials-uid"),Ir.FIRST_PARTY=new Ir("first-party-uid"),Ir.MOCK_USER=new Ir("mock-user");let Xf="10.9.0";const td=new K6("@firebase/firestore");function Yf(){return td.logLevel}function Ee(n,...t){if(td.logLevel<=En.DEBUG){const e=t.map(h2);td.debug(`Firestore (${Xf}): ${n}`,...e)}}function zi(n,...t){if(td.logLevel<=En.ERROR){const e=t.map(h2);td.error(`Firestore (${Xf}): ${n}`,...e)}}function bs(n,...t){if(td.logLevel<=En.WARN){const e=t.map(h2);td.warn(`Firestore (${Xf}): ${n}`,...e)}}function h2(n){if("string"==typeof n)return n;try{return JSON.stringify(n)}catch{return n}}function at(n="Unexpected state"){const t=`FIRESTORE (${Xf}) INTERNAL ASSERTION FAILED: `+n;throw zi(t),new Error(t)}function ft(n,t){n||at()}function je(n,t){return n}const oe={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Te extends Uf{constructor(t,e){super(t,e),this.code=t,this.message=e,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class _r{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}class S9{constructor(t,e){this.user=e,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}}class w1e{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,e){t.enqueueRetryable(()=>e(Ir.UNAUTHENTICATED))}shutdown(){}}class C1e{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,e){this.changeListener=e,t.enqueueRetryable(()=>e(this.token.user))}shutdown(){this.changeListener=null}}class k1e{constructor(t){this.t=t,this.currentUser=Ir.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,e){var i=this;let r=this.i;const o=l=>this.i!==r?(r=this.i,e(l)):Promise.resolve();let s=new _r;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new _r,t.enqueueRetryable(()=>o(this.currentUser))};const a=()=>{const l=s;t.enqueueRetryable(xe(function*(){yield l.promise,yield o(i.currentUser)}))},c=l=>{Ee("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),a()};this.t.onInit(l=>c(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?c(l):(Ee("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new _r)}},0),a()}getToken(){const t=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then(i=>this.i!==t?(Ee("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):i?(ft("string"==typeof i.accessToken),new S9(i.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const t=this.auth&&this.auth.getUid();return ft(null===t||"string"==typeof t),new Ir(t)}}class E1e{constructor(t,e,i){this.l=t,this.h=e,this.P=i,this.type="FirstParty",this.user=Ir.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const t=this.T();return t&&this.I.set("Authorization",t),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class T1e{constructor(t,e,i){this.l=t,this.h=e,this.P=i}getToken(){return Promise.resolve(new E1e(this.l,this.h,this.P))}start(t,e){t.enqueueRetryable(()=>e(Ir.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class D9{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class S1e{constructor(t){this.A=t,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(t,e){const i=o=>{null!=o.error&&Ee("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);const s=o.token!==this.R;return this.R=o.token,Ee("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?e(o.token):Promise.resolve()};this.o=o=>{t.enqueueRetryable(()=>i(o))};const r=o=>{Ee("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.appCheck.addTokenListener(this.o)};this.A.onInit(o=>r(o)),setTimeout(()=>{if(!this.appCheck){const o=this.A.getImmediate({optional:!0});o?r(o):Ee("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then(e=>e?(ft("string"==typeof e.token),this.R=e.token,new D9(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function D1e(n){const t=typeof self<"u"&&(self.crypto||self.msCrypto),e=new Uint8Array(n);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(e);else for(let i=0;it?1:0}function Zf(n,t,e){return n.length===t.length&&n.every((i,r)=>e(i,t[r]))}class _i{constructor(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new Te(oe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new Te(oe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new Te(oe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Te(oe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return _i.fromMillis(Date.now())}static fromDate(t){return _i.fromMillis(t.getTime())}static fromMillis(t){const e=Math.floor(t/1e3),i=Math.floor(1e6*(t-1e3*e));return new _i(e,i)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?Ot(this.nanoseconds,t.nanoseconds):Ot(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class _t{constructor(t){this.timestamp=t}static fromTimestamp(t){return new _t(t)}static min(){return new _t(new _i(0,0))}static max(){return new _t(new _i(253402300799,999999999))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class h_{constructor(t,e,i){void 0===e?e=0:e>t.length&&at(),void 0===i?i=t.length-e:i>t.length-e&&at(),this.segments=t,this.offset=e,this.len=i}get length(){return this.len}isEqual(t){return 0===h_.comparator(this,t)}child(t){const e=this.segments.slice(this.offset,this.limit());return t instanceof h_?t.forEach(i=>{e.push(i)}):e.push(t),this.construct(e)}limit(){return this.offset+this.length}popFirst(t){return this.construct(this.segments,this.offset+(t=void 0===t?1:t),this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return 0===this.length}isPrefixOf(t){if(t.lengths)return 1}return t.lengthe.length?1:0}}class gn extends h_{construct(t,e,i){return new gn(t,e,i)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){const e=[];for(const i of t){if(i.indexOf("//")>=0)throw new Te(oe.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);e.push(...i.split("/").filter(r=>r.length>0))}return new gn(e)}static emptyPath(){return new gn([])}}const A1e=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class bi extends h_{construct(t,e,i){return new bi(t,e,i)}static isValidIdentifier(t){return A1e.test(t)}canonicalString(){return this.toArray().map(t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),bi.isValidIdentifier(t)||(t="`"+t+"`"),t)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new bi(["__name__"])}static fromServerFormat(t){const e=[];let i="",r=0;const o=()=>{if(0===i.length)throw new Te(oe.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(i),i=""};let s=!1;for(;r=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return null!==t&&0===gn.comparator(this.path,t.path)}toString(){return this.path.toString()}static comparator(t,e){return gn.comparator(t.path,e.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new Ge(new gn(t.slice()))}}function R9(n){return new vs(n.readTime,n.key,-1)}class vs{constructor(t,e,i){this.readTime=t,this.documentKey=e,this.largestBatchId=i}static min(){return new vs(_t.min(),Ge.empty(),-1)}static max(){return new vs(_t.max(),Ge.empty(),-1)}}function m2(n,t){let e=n.readTime.compareTo(t.readTime);return 0!==e?e:(e=Ge.comparator(n.documentKey,t.documentKey),0!==e?e:Ot(n.largestBatchId,t.largestBatchId))}const F9="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class R1e{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(t=>t())}}function nd(n){return p2.apply(this,arguments)}function p2(){return p2=xe(function*(n){if(n.code!==oe.FAILED_PRECONDITION||n.message!==F9)throw n;Ee("LocalStore","Unexpectedly lost primary lease")}),p2.apply(this,arguments)}class K{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(t){return this.next(void 0,t)}next(t,e){return this.callbackAttached&&at(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(t,this.result):new K((i,r)=>{this.nextCallback=o=>{this.wrapSuccess(t,o).next(i,r)},this.catchCallback=o=>{this.wrapFailure(e,o).next(i,r)}})}toPromise(){return new Promise((t,e)=>{this.next(t,e)})}wrapUserFunction(t){try{const e=t();return e instanceof K?e:K.resolve(e)}catch(e){return K.reject(e)}}wrapSuccess(t,e){return t?this.wrapUserFunction(()=>t(e)):K.resolve(e)}wrapFailure(t,e){return t?this.wrapUserFunction(()=>t(e)):K.reject(e)}static resolve(t){return new K((e,i)=>{e(t)})}static reject(t){return new K((e,i)=>{i(t)})}static waitFor(t){return new K((e,i)=>{let r=0,o=0,s=!1;t.forEach(a=>{++r,a.next(()=>{++o,s&&o===r&&e()},c=>i(c))}),s=!0,o===r&&e()})}static or(t){let e=K.resolve(!1);for(const i of t)e=e.next(r=>r?K.resolve(r):i());return e}static forEach(t,e){const i=[];return t.forEach((r,o)=>{i.push(e.call(this,r,o))}),this.waitFor(i)}static mapArray(t,e){return new K((i,r)=>{const o=t.length,s=new Array(o);let a=0;for(let c=0;c{s[l]=d,++a,a===o&&i(s)},d=>r(d))}})}static doWhile(t,e){return new K((i,r)=>{const o=()=>{!0===t()?e().next(()=>{o()},r):i()};o()})}}class Lx{constructor(t,e){this.action=t,this.transaction=e,this.aborted=!1,this.V=new _r,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{e.error?this.V.reject(new f_(t,e.error)):this.V.resolve()},this.transaction.onerror=i=>{const r=g2(i.target.error);this.V.reject(new f_(t,r))}}static open(t,e,i,r){try{return new Lx(e,t.transaction(r,i))}catch(o){throw new f_(e,o)}}get m(){return this.V.promise}abort(t){t&&this.V.reject(t),this.aborted||(Ee("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){const t=this.transaction;this.aborted||"function"!=typeof t.commit||t.commit()}store(t){const e=this.transaction.objectStore(t);return new P1e(e)}}class zs{constructor(t,e,i){this.name=t,this.version=e,this.p=i,12.2===zs.S(Yl())&&zi("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return Ee("SimpleDb","Removing database:",t),Su(window.indexedDB.deleteDatabase(t)).toPromise()}static D(){if(!$6())return!1;if(zs.C())return!0;const t=Yl(),e=zs.S(t),i=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||i||o)}static C(){var t;return typeof process<"u"&&"YES"===(null===(t=process.__PRIVATE_env)||void 0===t?void 0:t.F)}static M(t,e){return t.store(e)}static S(t){const e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),i=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(i)}static v(t){const e=t.match(/Android ([\d.]+)/i),i=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(i)}O(t){var e=this;return xe(function*(){return e.db||(Ee("SimpleDb","Opening database:",e.name),e.db=yield new Promise((i,r)=>{const o=indexedDB.open(e.name,e.version);o.onsuccess=s=>{i(s.target.result)},o.onblocked=()=>{r(new f_(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},o.onerror=s=>{const a=s.target.error;r("VersionError"===a.name?new Te(oe.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh."):"InvalidStateError"===a.name?new Te(oe.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+a):new f_(t,a))},o.onupgradeneeded=s=>{Ee("SimpleDb",'Database "'+e.name+'" requires upgrade from version:',s.oldVersion),e.p.N(s.target.result,o.transaction,s.oldVersion,e.version).next(()=>{Ee("SimpleDb","Database upgrade to version "+e.version+" complete")})}})),e.L&&(e.db.onversionchange=i=>e.L(i)),e.db})()}B(t){this.L=t,this.db&&(this.db.onversionchange=e=>t(e))}runTransaction(t,e,i,r){var o=this;return xe(function*(){const s="readonly"===e;let a=0;for(;;){++a;try{o.db=yield o.O(t);const c=Lx.open(o.db,t,s?"readonly":"readwrite",i),l=r(c).next(d=>(c.g(),d)).catch(d=>(c.abort(d),K.reject(d))).toPromise();return l.catch(()=>{}),yield c.m,l}catch(c){const l=c,d="FirebaseError"!==l.name&&a<3;if(Ee("SimpleDb","Transaction failed with error:",l.message,"Retrying:",d),o.close(),!d)return Promise.reject(l)}}})()}close(){this.db&&this.db.close(),this.db=void 0}}class F1e{constructor(t){this.k=t,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(t){this.k=t}done(){this.q=!0}U(t){this.K=t}delete(){return Su(this.k.delete())}}class f_ extends Te{constructor(t,e){super(oe.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${e}`),this.name="IndexedDbTransactionError"}}function id(n){return"IndexedDbTransactionError"===n.name}class P1e{constructor(t){this.store=t}put(t,e){let i;return void 0!==e?(Ee("SimpleDb","PUT",this.store.name,t,e),i=this.store.put(e,t)):(Ee("SimpleDb","PUT",this.store.name,"",t),i=this.store.put(t)),Su(i)}add(t){return Ee("SimpleDb","ADD",this.store.name,t,t),Su(this.store.add(t))}get(t){return Su(this.store.get(t)).next(e=>(void 0===e&&(e=null),Ee("SimpleDb","GET",this.store.name,t,e),e))}delete(t){return Ee("SimpleDb","DELETE",this.store.name,t),Su(this.store.delete(t))}count(){return Ee("SimpleDb","COUNT",this.store.name),Su(this.store.count())}W(t,e){const i=this.options(t,e),r=i.index?this.store.index(i.index):this.store;if("function"==typeof r.getAll){const o=r.getAll(i.range);return new K((s,a)=>{o.onerror=c=>{a(c.target.error)},o.onsuccess=c=>{s(c.target.result)}})}{const o=this.cursor(i),s=[];return this.G(o,(a,c)=>{s.push(c)}).next(()=>s)}}j(t,e){const i=this.store.getAll(t,null===e?void 0:e);return new K((r,o)=>{i.onerror=s=>{o(s.target.error)},i.onsuccess=s=>{r(s.target.result)}})}H(t,e){Ee("SimpleDb","DELETE ALL",this.store.name);const i=this.options(t,e);i.J=!1;const r=this.cursor(i);return this.G(r,(o,s,a)=>a.delete())}Y(t,e){let i;e?i=t:(i={},e=t);const r=this.cursor(i);return this.G(r,e)}Z(t){const e=this.cursor({});return new K((i,r)=>{e.onerror=o=>{const s=g2(o.target.error);r(s)},e.onsuccess=o=>{const s=o.target.result;s?t(s.primaryKey,s.value).next(a=>{a?s.continue():i()}):i()}})}G(t,e){const i=[];return new K((r,o)=>{t.onerror=s=>{o(s.target.error)},t.onsuccess=s=>{const a=s.target.result;if(!a)return void r();const c=new F1e(a),l=e(a.primaryKey,a.value,c);if(l instanceof K){const d=l.catch(u=>(c.done(),K.reject(u)));i.push(d)}c.isDone?r():null===c.$?a.continue():a.continue(c.$)}}).next(()=>K.waitFor(i))}options(t,e){let i;return void 0!==t&&("string"==typeof t?i=t:e=t),{index:i,range:e}}cursor(t){let e="next";if(t.reverse&&(e="prev"),t.index){const i=this.store.index(t.index);return t.J?i.openKeyCursor(t.range,e):i.openCursor(t.range,e)}return this.store.openCursor(t.range,e)}}function Su(n){return new K((t,e)=>{n.onsuccess=i=>{t(i.target.result)},n.onerror=i=>{const r=g2(i.target.error);e(r)}})}let P9=!1;function g2(n){const t=zs.S(Yl());if(t>=12.2&&t<13){const e="An internal error was encountered in the Indexed Database server";if(n.message.indexOf(e)>=0){const i=new Te("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return P9||(P9=!0,setTimeout(()=>{throw i},0)),i}}return n}let ys=(()=>{class n{constructor(e,i){this.previousValue=e,i&&(i.sequenceNumberHandler=r=>this.se(r),this.oe=r=>i.writeSequenceNumber(r))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.oe&&this.oe(e),e}}return n._e=-1,n})();function m_(n){return null==n}function p_(n){return 0===n&&1/n==-1/0}function z9(n){let t=0;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t++;return t}function rd(n,t){for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t(e,n[e])}function j9(n){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}class ci{constructor(t,e){this.comparator=t,this.root=e||$r.EMPTY}insert(t,e){return new ci(this.comparator,this.root.insert(t,e,this.comparator).copy(null,null,$r.BLACK,null,null))}remove(t){return new ci(this.comparator,this.root.remove(t,this.comparator).copy(null,null,$r.BLACK,null,null))}get(t){let e=this.root;for(;!e.isEmpty();){const i=this.comparator(t,e.key);if(0===i)return e.value;i<0?e=e.left:i>0&&(e=e.right)}return null}indexOf(t){let e=0,i=this.root;for(;!i.isEmpty();){const r=this.comparator(t,i.key);if(0===r)return e+i.left.size;r<0?i=i.left:(e+=i.left.size+1,i=i.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal((e,i)=>(t(e,i),!1))}toString(){const t=[];return this.inorderTraversal((e,i)=>(t.push(`${e}:${i}`),!1)),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new Vx(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new Vx(this.root,t,this.comparator,!1)}getReverseIterator(){return new Vx(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new Vx(this.root,t,this.comparator,!0)}}class Vx{constructor(t,e,i,r){this.isReverse=r,this.nodeStack=[];let o=1;for(;!t.isEmpty();)if(o=e?i(t.key,e):1,e&&r&&(o*=-1),o<0)t=this.isReverse?t.left:t.right;else{if(0===o){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class $r{constructor(t,e,i,r,o){this.key=t,this.value=e,this.color=i??$r.RED,this.left=r??$r.EMPTY,this.right=o??$r.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,e,i,r,o){return new $r(t??this.key,e??this.value,i??this.color,r??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,e,i){let r=this;const o=i(t,r.key);return r=o<0?r.copy(null,null,null,r.left.insert(t,e,i),null):0===o?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,i)),r.fixUp()}removeMin(){if(this.left.isEmpty())return $r.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,e){let i,r=this;if(e(t,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(t,e),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===e(t,r.key)){if(r.right.isEmpty())return $r.EMPTY;i=r.right.min(),r=r.copy(i.key,i.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(t,e))}return r.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,$r.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,$r.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw at();const t=this.left.check();if(t!==this.right.check())throw at();return t+(this.isRed()?0:1)}}$r.EMPTY=null,$r.RED=!0,$r.BLACK=!1,$r.EMPTY=new class{constructor(){this.size=0}get key(){throw at()}get value(){throw at()}get color(){throw at()}get left(){throw at()}get right(){throw at()}copy(t,e,i,r,o){return this}insert(t,e,i){return new $r(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class ei{constructor(t){this.comparator=t,this.data=new ci(this.comparator)}has(t){return null!==this.data.get(t)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal((e,i)=>(t(e),!1))}forEachInRange(t,e){const i=this.data.getIteratorFrom(t[0]);for(;i.hasNext();){const r=i.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}}forEachWhile(t,e){let i;for(i=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();i.hasNext();)if(!t(i.getNext().key))return}firstAfterOrEqual(t){const e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null}getIterator(){return new $9(this.data.getIterator())}getIteratorFrom(t){return new $9(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let e=this;return e.size{e=e.add(i)}),e}isEqual(t){if(!(t instanceof ei)||this.size!==t.size)return!1;const e=this.data.getIterator(),i=t.data.getIterator();for(;e.hasNext();){const r=e.getNext().key,o=i.getNext().key;if(0!==this.comparator(r,o))return!1}return!0}toArray(){const t=[];return this.forEach(e=>{t.push(e)}),t}toString(){const t=[];return this.forEach(e=>t.push(e)),"SortedSet("+t.toString()+")"}copy(t){const e=new ei(this.comparator);return e.data=t,e}}class $9{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class Ko{constructor(t){this.fields=t,t.sort(bi.comparator)}static empty(){return new Ko([])}unionWith(t){let e=new ei(bi.comparator);for(const i of this.fields)e=e.add(i);for(const i of t)e=e.add(i);return new Ko(e.toArray())}covers(t){for(const e of this.fields)if(e.isPrefixOf(t))return!0;return!1}isEqual(t){return Zf(this.fields,t.fields,(e,i)=>e.isEqual(i))}}class G9 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class br{constructor(t){this.binaryString=t}static fromBase64String(t){const e=function(r){try{return atob(r)}catch(o){throw typeof DOMException<"u"&&o instanceof DOMException?new G9("Invalid base64 string: "+o):o}}(t);return new br(e)}static fromUint8Array(t){const e=function(r){let o="";for(let s=0;stYa(e,t))}function cd(n,t){if(n===t)return 0;const e=ad(n),i=ad(t);if(e!==i)return Ot(e,i);switch(e){case 0:case 9007199254740991:return 0;case 1:return Ot(n.booleanValue,t.booleanValue);case 2:return function(o,s){const a=Fi(o.integerValue||o.doubleValue),c=Fi(s.integerValue||s.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(n,t);case 3:return W9(n.timestampValue,t.timestampValue);case 4:return W9(g_(n),g_(t));case 5:return Ot(n.stringValue,t.stringValue);case 6:return function(o,s){const a=Xc(o),c=Xc(s);return a.compareTo(c)}(n.bytesValue,t.bytesValue);case 7:return function(o,s){const a=o.split("/"),c=s.split("/");for(let l=0;lt.mapValue.fields[e]=v_(i)),t}if(n.arrayValue){const t={arrayValue:{values:[]}};for(let e=0;e<(n.arrayValue.values||[]).length;++e)t.arrayValue.values[e]=v_(n.arrayValue.values[e]);return t}return Object.assign({},n)}function K9(n){return"__max__"===(((n.mapValue||{}).fields||{}).__type__||{}).stringValue}class Gr{constructor(t){this.value=t}static empty(){return new Gr({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let e=this.value;for(let i=0;i{if(!e.isImmediateParentOf(a)){const c=this.getFieldsMap(e);this.applyChanges(c,i,r),i={},r=[],e=a.popLast()}s?i[a.lastSegment()]=v_(s):r.push(a.lastSegment())});const o=this.getFieldsMap(e);this.applyChanges(o,i,r)}delete(t){const e=this.field(t.popLast());$x(e)&&e.mapValue.fields&&delete e.mapValue.fields[t.lastSegment()]}isEqual(t){return Ya(this.value,t.value)}getFieldsMap(t){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let i=0;it[r]=o);for(const r of i)delete t[r]}clone(){return new Gr(v_(this.value))}}function Z9(n){const t=[];return rd(n.fields,(e,i)=>{const r=new bi([e]);if($x(i)){const o=Z9(i.mapValue).fields;if(0===o.length)t.push(r);else for(const s of o)t.push(r.child(s))}else t.push(r)}),new Ko(t)}class pi{constructor(t,e,i,r,o,s,a){this.key=t,this.documentType=e,this.version=i,this.readTime=r,this.createTime=o,this.data=s,this.documentState=a}static newInvalidDocument(t){return new pi(t,0,_t.min(),_t.min(),_t.min(),Gr.empty(),0)}static newFoundDocument(t,e,i,r){return new pi(t,1,e,_t.min(),i,r,0)}static newNoDocument(t,e){return new pi(t,2,e,_t.min(),_t.min(),Gr.empty(),0)}static newUnknownDocument(t,e){return new pi(t,3,e,_t.min(),_t.min(),Gr.empty(),2)}convertToFoundDocument(t,e){return!this.createTime.isEqual(_t.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=t),this.version=t,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=Gr.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=Gr.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=_t.min(),this}setReadTime(t){return this.readTime=t,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(t){return t instanceof pi&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new pi(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class ld{constructor(t,e){this.position=t,this.inclusive=e}}function J9(n,t,e){let i=0;for(let r=0;r":return t>0;case">=":return t>=0;default:return at()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Wn extends tU{constructor(t,e){super(),this.filters=t,this.op=e,this.ue=null}static create(t,e){return new Wn(t,e)}matches(t){return im(this)?void 0===this.filters.find(e=>!e.matches(t)):void 0!==this.filters.find(e=>e.matches(t))}getFlattenedFilters(){return null!==this.ue||(this.ue=this.filters.reduce((t,e)=>t.concat(e.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function im(n){return"and"===n.op}function x2(n){return function nU(n){for(const t of n.filters)if(t instanceof Wn)return!1;return!0}(n)&&im(n)}function w2(n){if(n instanceof _n)return n.field.canonicalString()+n.op.toString()+nm(n.value);if(x2(n))return n.filters.map(t=>w2(t)).join(",");{const t=n.filters.map(e=>w2(e)).join(",");return`${n.op}(${t})`}}function iU(n,t){return n instanceof _n?(i=n,(r=t)instanceof _n&&i.op===r.op&&i.field.isEqual(r.field)&&Ya(i.value,r.value)):n instanceof Wn?function(i,r){return r instanceof Wn&&i.op===r.op&&i.filters.length===r.filters.length&&i.filters.reduce((o,s,a)=>o&&iU(s,r.filters[a]),!0)}(n,t):void at();var i,r}function oU(n){return n instanceof _n?`${(e=n).field.canonicalString()} ${e.op} ${nm(e.value)}`:n instanceof Wn?function(e){return e.op.toString()+" {"+e.getFilters().map(oU).join(" ,")+"}"}(n):"Filter";var e}class swe extends _n{constructor(t,e,i){super(t,e,i),this.key=Ge.fromName(i.referenceValue)}matches(t){const e=Ge.comparator(t.key,this.key);return this.matchesComparison(e)}}class awe extends _n{constructor(t,e){super(t,"in",e),this.keys=sU(0,e)}matches(t){return this.keys.some(e=>e.isEqual(t.key))}}class cwe extends _n{constructor(t,e){super(t,"not-in",e),this.keys=sU(0,e)}matches(t){return!this.keys.some(e=>e.isEqual(t.key))}}function sU(n,t){var e;return((null===(e=t.arrayValue)||void 0===e?void 0:e.values)||[]).map(i=>Ge.fromName(i.referenceValue))}class lwe extends _n{constructor(t,e){super(t,"array-contains",e)}matches(t){const e=t.data.field(this.field);return b_(e)&&__(e.arrayValue,this.value)}}class aU extends _n{constructor(t,e){super(t,"in",e)}matches(t){const e=t.data.field(this.field);return null!==e&&__(this.value.arrayValue,e)}}class dwe extends _n{constructor(t,e){super(t,"not-in",e)}matches(t){if(__(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const e=t.data.field(this.field);return null!==e&&!__(this.value.arrayValue,e)}}class uwe extends _n{constructor(t,e){super(t,"array-contains-any",e)}matches(t){const e=t.data.field(this.field);return!(!b_(e)||!e.arrayValue.values)&&e.arrayValue.values.some(i=>__(this.value.arrayValue,i))}}class hwe{constructor(t,e=null,i=[],r=[],o=null,s=null,a=null){this.path=t,this.collectionGroup=e,this.orderBy=i,this.filters=r,this.limit=o,this.startAt=s,this.endAt=a,this.ce=null}}function C2(n,t=null,e=[],i=[],r=null,o=null,s=null){return new hwe(n,t,e,i,r,o,s)}function Iu(n){const t=je(n);if(null===t.ce){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map(i=>w2(i)).join(","),e+="|ob:",e+=t.orderBy.map(i=>{return(o=i).field.canonicalString()+o.dir;var o}).join(","),m_(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map(i=>nm(i)).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map(i=>nm(i)).join(",")),t.ce=e}return t.ce}function x_(n,t){if(n.limit!==t.limit||n.orderBy.length!==t.orderBy.length)return!1;for(let e=0;e0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";(function(s){let a=new ei(bi.comparator);return s.filters.forEach(c=>{c.getFlattenedFilters().forEach(l=>{l.isInequality()&&(a=a.add(l.field))})}),a})(t).forEach(o=>{e.has(o.canonicalString())||o.isKeyField()||t.le.push(new y_(o,i))}),e.has(bi.keyField().canonicalString())||t.le.push(new y_(bi.keyField(),i))}return t.le}function No(n){const t=je(n);return t.he||(t.he=function hU(n,t){if("F"===n.limitType)return C2(n.path,n.collectionGroup,t,n.filters,n.limit,n.startAt,n.endAt);{t=t.map(r=>new y_(r.field,"desc"===r.dir?"asc":"desc"));const e=n.endAt?new ld(n.endAt.position,n.endAt.inclusive):null,i=n.startAt?new ld(n.startAt.position,n.startAt.inclusive):null;return C2(n.path,n.collectionGroup,t,n.filters,n.limit,e,i)}}(t,om(n))),t.he}function E2(n,t){const e=n.filters.concat([t]);return new Yc(n.path,n.collectionGroup,n.explicitOrderBy.slice(),e,n.limit,n.limitType,n.startAt,n.endAt)}function qx(n,t,e){return new Yc(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),t,e,n.startAt,n.endAt)}function w_(n,t){return x_(No(n),No(t))&&n.limitType===t.limitType}function fU(n){return`${Iu(No(n))}|lt:${n.limitType}`}function sm(n){return`Query(target=${function(e){let i=e.path.canonicalString();return null!==e.collectionGroup&&(i+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(i+=`, filters: [${e.filters.map(r=>oU(r)).join(", ")}]`),m_(e.limit)||(i+=", limit: "+e.limit),e.orderBy.length>0&&(i+=`, orderBy: [${e.orderBy.map(r=>{return`${(s=r).field.canonicalString()} (${s.dir})`;var s}).join(", ")}]`),e.startAt&&(i+=", startAt: ",i+=e.startAt.inclusive?"b:":"a:",i+=e.startAt.position.map(r=>nm(r)).join(",")),e.endAt&&(i+=", endAt: ",i+=e.endAt.inclusive?"a:":"b:",i+=e.endAt.position.map(r=>nm(r)).join(",")),`Target(${i})`}(No(n))}; limitType=${n.limitType})`}function C_(n,t){return t.isFoundDocument()&&function(i,r){const o=r.key.path;return null!==i.collectionGroup?r.key.hasCollectionId(i.collectionGroup)&&i.path.isPrefixOf(o):Ge.isDocumentKey(i.path)?i.path.isEqual(o):i.path.isImmediateParentOf(o)}(n,t)&&function(i,r){for(const o of om(i))if(!o.field.isKeyField()&&null===r.data.field(o.field))return!1;return!0}(n,t)&&function(i,r){for(const o of i.filters)if(!o.matches(r))return!1;return!0}(n,t)&&(r=t,!((i=n).startAt&&!function(s,a,c){const l=J9(s,a,c);return s.inclusive?l<=0:l<0}(i.startAt,om(i),r)||i.endAt&&!function(s,a,c){const l=J9(s,a,c);return s.inclusive?l>=0:l>0}(i.endAt,om(i),r)));var i,r}function pU(n){return(t,e)=>{let i=!1;for(const r of om(n)){const o=fwe(r,t,e);if(0!==o)return o;i=i||r.field.isKeyField()}return 0}}function fwe(n,t,e){const i=n.field.isKeyField()?Ge.comparator(t.key,e.key):function(o,s,a){const c=s.data.field(o),l=a.data.field(o);return null!==c&&null!==l?cd(c,l):at()}(n.field,t,e);switch(n.dir){case"asc":return i;case"desc":return-1*i;default:return at()}}class Zc{constructor(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={},this.innerSize=0}get(t){const e=this.mapKeyFn(t),i=this.inner[e];if(void 0!==i)for(const[r,o]of i)if(this.equalsFn(r,t))return o}has(t){return void 0!==this.get(t)}set(t,e){const i=this.mapKeyFn(t),r=this.inner[i];if(void 0===r)return this.inner[i]=[[t,e]],void this.innerSize++;for(let o=0;o{for(const[r,o]of i)t(r,o)})}isEmpty(){return j9(this.inner)}size(){return this.innerSize}}const mwe=new ci(Ge.comparator);function Xo(){return mwe}const gU=new ci(Ge.comparator);function k_(...n){let t=gU;for(const e of n)t=t.insert(e.key,e);return t}function _U(n){let t=gU;return n.forEach((e,i)=>t=t.insert(e,i.overlayedDocument)),t}function Za(){return E_()}function bU(){return E_()}function E_(){return new Zc(n=>n.toString(),(n,t)=>n.isEqual(t))}const pwe=new ci(Ge.comparator),gwe=new ei(Ge.comparator);function Kt(...n){let t=gwe;for(const e of n)t=t.add(e);return t}const _we=new ei(Ot);function vU(n,t){if(n.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:p_(t)?"-0":t}}function yU(n){return{integerValue:""+n}}function xU(n,t){return function O9(n){return"number"==typeof n&&Number.isInteger(n)&&!p_(n)&&n<=Number.MAX_SAFE_INTEGER&&n>=Number.MIN_SAFE_INTEGER}(t)?yU(t):vU(n,t)}class Qx{constructor(){this._=void 0}}function bwe(n,t,e){return n instanceof am?function(r,o){const s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return o&&Ux(o)&&(o=Hx(o)),o&&(s.fields.__previous_value__=o),{mapValue:s}}(e,t):n instanceof Mu?CU(n,t):n instanceof Ru?kU(n,t):function(r,o){const s=wU(r,o),a=EU(s)+EU(r.Ie);return v2(s)&&v2(r.Ie)?yU(a):vU(r.serializer,a)}(n,t)}function vwe(n,t,e){return n instanceof Mu?CU(n,t):n instanceof Ru?kU(n,t):e}function wU(n,t){return n instanceof cm?v2(i=t)||(o=i)&&"doubleValue"in o?t:{integerValue:0}:null;var i,o}class am extends Qx{}class Mu extends Qx{constructor(t){super(),this.elements=t}}function CU(n,t){const e=TU(t);for(const i of n.elements)e.some(r=>Ya(r,i))||e.push(i);return{arrayValue:{values:e}}}class Ru extends Qx{constructor(t){super(),this.elements=t}}function kU(n,t){let e=TU(t);for(const i of n.elements)e=e.filter(r=>!Ya(r,i));return{arrayValue:{values:e}}}class cm extends Qx{constructor(t,e){super(),this.serializer=t,this.Ie=e}}function EU(n){return Fi(n.integerValue||n.doubleValue)}function TU(n){return b_(n)&&n.arrayValue.values?n.arrayValue.values.slice():[]}class xwe{constructor(t,e){this.version=t,this.transformResults=e}}class vi{constructor(t,e){this.updateTime=t,this.exists=e}static none(){return new vi}static exists(t){return new vi(void 0,t)}static updateTime(t){return new vi(t)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function Kx(n,t){return void 0!==n.updateTime?t.isFoundDocument()&&t.version.isEqual(n.updateTime):void 0===n.exists||n.exists===t.isFoundDocument()}class Xx{}function SU(n,t){if(!n.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return n.isNoDocument()?new dm(n.key,vi.none()):new lm(n.key,n.data,vi.none());{const e=n.data,i=Gr.empty();let r=new ei(bi.comparator);for(let o of t.fields)if(!r.has(o)){let s=e.field(o);null===s&&o.length>1&&(o=o.popLast(),s=e.field(o)),null===s?i.delete(o):i.set(o,s),r=r.add(o)}return new Jc(n.key,i,new Ko(r.toArray()),vi.none())}}function wwe(n,t,e){n instanceof lm?function(r,o,s){const a=r.value.clone(),c=IU(r.fieldTransforms,o,s.transformResults);a.setAll(c),o.convertToFoundDocument(s.version,a).setHasCommittedMutations()}(n,t,e):n instanceof Jc?function(r,o,s){if(!Kx(r.precondition,o))return void o.convertToUnknownDocument(s.version);const a=IU(r.fieldTransforms,o,s.transformResults),c=o.data;c.setAll(AU(r)),c.setAll(a),o.convertToFoundDocument(s.version,c).setHasCommittedMutations()}(n,t,e):t.convertToNoDocument(e.version).setHasCommittedMutations()}function S_(n,t,e,i){return n instanceof lm?function(o,s,a,c){if(!Kx(o.precondition,s))return a;const l=o.value.clone(),d=MU(o.fieldTransforms,c,s);return l.setAll(d),s.convertToFoundDocument(s.version,l).setHasLocalMutations(),null}(n,t,e,i):n instanceof Jc?function(o,s,a,c){if(!Kx(o.precondition,s))return a;const l=MU(o.fieldTransforms,c,s),d=s.data;return d.setAll(AU(o)),d.setAll(l),s.convertToFoundDocument(s.version,d).setHasLocalMutations(),null===a?null:a.unionWith(o.fieldMask.fields).unionWith(o.fieldTransforms.map(u=>u.field))}(n,t,e,i):(a=e,Kx(n.precondition,s=t)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):a);var s,a}function Cwe(n,t){let e=null;for(const i of n.fieldTransforms){const r=t.data.field(i.field),o=wU(i.transform,r||null);null!=o&&(null===e&&(e=Gr.empty()),e.set(i.field,o))}return e||null}function DU(n,t){return n.type===t.type&&!!n.key.isEqual(t.key)&&!!n.precondition.isEqual(t.precondition)&&(r=t.fieldTransforms,!!(void 0===(i=n.fieldTransforms)&&void 0===r||i&&r&&Zf(i,r,(o,s)=>function ywe(n,t){return n.field.isEqual(t.field)&&(r=t.transform,(i=n.transform)instanceof Mu&&r instanceof Mu||i instanceof Ru&&r instanceof Ru?Zf(i.elements,r.elements,Ya):i instanceof cm&&r instanceof cm?Ya(i.Ie,r.Ie):i instanceof am&&r instanceof am);var i,r}(o,s))))&&(0===n.type?n.value.isEqual(t.value):1!==n.type||n.data.isEqual(t.data)&&n.fieldMask.isEqual(t.fieldMask));var i,r}class lm extends Xx{constructor(t,e,i,r=[]){super(),this.key=t,this.value=e,this.precondition=i,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Jc extends Xx{constructor(t,e,i,r,o=[]){super(),this.key=t,this.data=e,this.fieldMask=i,this.precondition=r,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function AU(n){const t=new Map;return n.fieldMask.fields.forEach(e=>{if(!e.isEmpty()){const i=n.data.field(e);t.set(e,i)}}),t}function IU(n,t,e){const i=new Map;ft(n.length===e.length);for(let r=0;r{const o=t.get(r.key),s=o.overlayedDocument;let a=this.applyToLocalView(s,o.mutatedFields);a=e.has(r.key)?null:a;const c=SU(s,a);null!==c&&i.set(r.key,c),s.isValidDocument()||s.convertToNoDocument(_t.min())}),i}keys(){return this.mutations.reduce((t,e)=>t.add(e.key),Kt())}isEqual(t){return this.batchId===t.batchId&&Zf(this.mutations,t.mutations,(e,i)=>DU(e,i))&&Zf(this.baseMutations,t.baseMutations,(e,i)=>DU(e,i))}}class A2{constructor(t,e,i,r){this.batch=t,this.commitVersion=e,this.mutationResults=i,this.docVersions=r}static from(t,e,i){ft(t.mutations.length===i.length);let r=pwe;const o=t.mutations;for(let s=0;s=8)throw new D_(`Invalid padding: ${e}`);if(i<0)throw new D_(`Invalid hash count: ${i}`);if(t.length>0&&0===this.hashCount)throw new D_(`Invalid hash count: ${i}`);if(0===t.length&&0!==e)throw new D_(`Invalid padding when bitmap length is 0: ${e}`);this.Te=8*t.length-e,this.Ee=Kf.fromNumber(this.Te)}de(t,e,i){let r=t.add(e.multiply(Kf.fromNumber(i)));return 1===r.compare(Twe)&&(r=new Kf([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Ee).toNumber()}Ae(t){return 0!=(this.bitmap[Math.floor(t/8)]&1<s.insert(a)),s}insert(t){if(0===this.Te)return;const e=OU(t),[i,r]=NU(e);for(let o=0;o0&&(this.Se=!0,this.ye=t)}ve(){let t=Kt(),e=Kt(),i=Kt();return this.pe.forEach((r,o)=>{switch(o){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:i=i.add(r);break;default:at()}}),new I_(this.ye,this.we,t,e,i)}Fe(){this.Se=!1,this.pe=HU()}Me(t,e){this.Se=!0,this.pe=this.pe.insert(t,e)}xe(t){this.Se=!0,this.pe=this.pe.remove(t)}Oe(){this.ge+=1}Ne(){this.ge-=1,ft(this.ge>=0)}Le(){this.Se=!0,this.we=!0}}class Swe{constructor(t){this.Be=t,this.ke=new Map,this.qe=Xo(),this.Qe=UU(),this.Ke=new ci(Ot)}$e(t){for(const e of t.Ve)t.me&&t.me.isFoundDocument()?this.Ue(e,t.me):this.We(e,t.key,t.me);for(const e of t.removedTargetIds)this.We(e,t.key,t.me)}Ge(t){this.forEachTarget(t,e=>{const i=this.ze(e);switch(t.state){case 0:this.je(e)&&i.Ce(t.resumeToken);break;case 1:i.Ne(),i.be||i.Fe(),i.Ce(t.resumeToken);break;case 2:i.Ne(),i.be||this.removeTarget(e);break;case 3:this.je(e)&&(i.Le(),i.Ce(t.resumeToken));break;case 4:this.je(e)&&(this.He(e),i.Ce(t.resumeToken));break;default:at()}})}forEachTarget(t,e){t.targetIds.length>0?t.targetIds.forEach(e):this.ke.forEach((i,r)=>{this.je(r)&&e(r)})}Je(t){const e=t.targetId,i=t.fe.count,r=this.Ye(e);if(r){const o=r.target;if(Gx(o))if(0===i){const s=new Ge(o.path);this.We(e,s,pi.newNoDocument(s,_t.min()))}else ft(1===i);else{const s=this.Ze(e);if(s!==i){const a=this.Xe(t),c=a?this.et(a,t,s):1;0!==c&&(this.He(e),this.Ke=this.Ke.insert(e,2===c?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Xe(t){const e=t.fe.unchangedNames;if(!e||!e.bits)return null;const{bits:{bitmap:i="",padding:r=0},hashCount:o=0}=e;let s,a;try{s=Xc(i).toUint8Array()}catch(c){if(c instanceof G9)return bs("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw c}try{a=new M2(s,r,o)}catch(c){return bs(c instanceof D_?"BloomFilter error: ":"Applying bloom filter failed: ",c),null}return 0===a.Te?null:a}et(t,e,i){return e.fe.count===i-this.rt(t,e.targetId)?0:2}rt(t,e){const i=this.Be.getRemoteKeysForTarget(e);let r=0;return i.forEach(o=>{const s=this.Be.nt(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;t.mightContain(a)||(this.We(e,o,null),r++)}),r}it(t){const e=new Map;this.ke.forEach((o,s)=>{const a=this.Ye(s);if(a){if(o.current&&Gx(a.target)){const c=new Ge(a.target.path);null!==this.qe.get(c)||this.st(s,c)||this.We(s,c,pi.newNoDocument(c,t))}o.De&&(e.set(s,o.ve()),o.Fe())}});let i=Kt();this.Qe.forEach((o,s)=>{let a=!0;s.forEachWhile(c=>{const l=this.Ye(c);return!l||"TargetPurposeLimboResolution"===l.purpose||(a=!1,!1)}),a&&(i=i.add(o))}),this.qe.forEach((o,s)=>s.setReadTime(t));const r=new A_(t,e,this.Ke,this.qe,i);return this.qe=Xo(),this.Qe=UU(),this.Ke=new ci(Ot),r}Ue(t,e){if(!this.je(t))return;const i=this.st(t,e.key)?2:0;this.ze(t).Me(e.key,i),this.qe=this.qe.insert(e.key,e),this.Qe=this.Qe.insert(e.key,this.ot(e.key).add(t))}We(t,e,i){if(!this.je(t))return;const r=this.ze(t);this.st(t,e)?r.Me(e,1):r.xe(e),this.Qe=this.Qe.insert(e,this.ot(e).delete(t)),i&&(this.qe=this.qe.insert(e,i))}removeTarget(t){this.ke.delete(t)}Ze(t){const e=this.ze(t).ve();return this.Be.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size}Oe(t){this.ze(t).Oe()}ze(t){let e=this.ke.get(t);return e||(e=new VU,this.ke.set(t,e)),e}ot(t){let e=this.Qe.get(t);return e||(e=new ei(Ot),this.Qe=this.Qe.insert(t,e)),e}je(t){const e=null!==this.Ye(t);return e||Ee("WatchChangeAggregator","Detected inactive target",t),e}Ye(t){const e=this.ke.get(t);return e&&e.be?null:this.Be._t(t)}He(t){this.ke.set(t,new VU),this.Be.getRemoteKeysForTarget(t).forEach(e=>{this.We(t,e,null)})}st(t,e){return this.Be.getRemoteKeysForTarget(t).has(e)}}function UU(){return new ci(Ge.comparator)}function HU(){return new ci(Ge.comparator)}const Dwe={asc:"ASCENDING",desc:"DESCENDING"},Awe={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Iwe={and:"AND",or:"OR"};class Mwe{constructor(t,e){this.databaseId=t,this.useProto3Json=e}}function R2(n,t){return n.useProto3Json||m_(t)?t:{value:t}}function um(n,t){return n.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function zU(n,t){return n.useProto3Json?t.toBase64():t.toUint8Array()}function Rwe(n,t){return um(n,t.toTimestamp())}function ji(n){return ft(!!n),_t.fromTimestamp(function(e){const i=od(e);return new _i(i.seconds,i.nanos)}(n))}function F2(n,t){return P2(n,t).canonicalString()}function P2(n,t){const e=(r=n,new gn(["projects",r.projectId,"databases",r.database])).child("documents");var r;return void 0===t?e:e.child(t)}function jU(n){const t=gn.fromString(n);return ft(JU(t)),t}function M_(n,t){return F2(n.databaseId,t.path)}function Ja(n,t){const e=jU(t);if(e.get(1)!==n.databaseId.projectId)throw new Te(oe.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+e.get(1)+" vs "+n.databaseId.projectId);if(e.get(3)!==n.databaseId.database)throw new Te(oe.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+e.get(3)+" vs "+n.databaseId.database);return new Ge(WU(e))}function $U(n,t){return F2(n.databaseId,t)}function O2(n){return new gn(["projects",n.databaseId.projectId,"databases",n.databaseId.database]).canonicalString()}function WU(n){return ft(n.length>4&&"documents"===n.get(4)),n.popFirst(5)}function qU(n,t,e){return{name:M_(n,t),fields:e.value.mapValue.fields}}function KU(n,t){return{documents:[$U(n,t.path)]}}function L2(n,t){const e={structuredQuery:{}},i=t.path;let r;null!==t.collectionGroup?(r=i,e.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(r=i.popLast(),e.structuredQuery.from=[{collectionId:i.lastSegment()}]),e.parent=$U(n,r);const o=function(l){if(0!==l.length)return ZU(Wn.create(l,"and"))}(t.filters);o&&(e.structuredQuery.where=o);const s=function(l){if(0!==l.length)return l.map(d=>{return{field:dd((h=d).field),direction:Lwe(h.dir)};var h})}(t.orderBy);s&&(e.structuredQuery.orderBy=s);const a=R2(n,t.limit);return null!==a&&(e.structuredQuery.limit=a),t.startAt&&(e.structuredQuery.startAt={before:(l=t.startAt).inclusive,values:l.position}),t.endAt&&(e.structuredQuery.endAt=function(l){return{before:!l.inclusive,values:l.position}}(t.endAt)),{ut:e,parent:r};var l}function XU(n){let t=function GU(n){const t=jU(n);return 4===t.length?gn.emptyPath():WU(t)}(n.parent);const e=n.structuredQuery,i=e.from?e.from.length:0;let r=null;if(i>0){ft(1===i);const d=e.from[0];d.allDescendants?r=d.collectionId:t=t.child(d.collectionId)}let o=[];e.where&&(o=function(u){const h=YU(u);return h instanceof Wn&&x2(h)?h.getFilters():[h]}(e.where));let s=[];e.orderBy&&(s=e.orderBy.map(h=>{return new y_(hm((m=h).field),function(p){switch(p){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(m.direction));var m}));let a=null;e.limit&&(a=function(u){let h;return h="object"==typeof u?u.value:u,m_(h)?null:h}(e.limit));let c=null;var u;e.startAt&&(c=new ld((u=e.startAt).values||[],!!u.before));let l=null;return e.endAt&&(l=function(u){return new ld(u.values||[],!u.before)}(e.endAt)),function dU(n,t,e,i,r,o,s,a){return new Yc(n,t,e,i,r,o,s,a)}(t,r,s,o,a,"F",c,l)}function YU(n){return void 0!==n.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const i=hm(e.unaryFilter.field);return _n.create(i,"==",{doubleValue:NaN});case"IS_NULL":const r=hm(e.unaryFilter.field);return _n.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const o=hm(e.unaryFilter.field);return _n.create(o,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const s=hm(e.unaryFilter.field);return _n.create(s,"!=",{nullValue:"NULL_VALUE"});default:return at()}}(n):void 0!==n.fieldFilter?_n.create(hm((e=n).fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return at()}}(e.fieldFilter.op),e.fieldFilter.value):void 0!==n.compositeFilter?function(e){return Wn.create(e.compositeFilter.filters.map(i=>YU(i)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return at()}}(e.compositeFilter.op))}(n):at();var e}function Lwe(n){return Dwe[n]}function Bwe(n){return Awe[n]}function Vwe(n){return Iwe[n]}function dd(n){return{fieldPath:n.canonicalString()}}function hm(n){return bi.fromServerFormat(n.fieldPath)}function ZU(n){return n instanceof _n?function(e){if("=="===e.op){if(Q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NAN"}};if(q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NOT_NAN"}};if(q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:dd(e.field),op:Bwe(e.op),value:e.value}}}(n):n instanceof Wn?function(e){const i=e.getFilters().map(r=>ZU(r));return 1===i.length?i[0]:{compositeFilter:{op:Vwe(e.op),filters:i}}}(n):at()}function Uwe(n){const t=[];return n.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}function JU(n){return n.length>=4&&"projects"===n.get(0)&&"databases"===n.get(2)}class el{constructor(t,e,i,r,o=_t.min(),s=_t.min(),a=br.EMPTY_BYTE_STRING,c=null){this.target=t,this.targetId=e,this.purpose=i,this.sequenceNumber=r,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=c}withSequenceNumber(t){return new el(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,e){return new el(this.target,this.targetId,this.purpose,this.sequenceNumber,e,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new el(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new el(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}class eH{constructor(t){this.ct=t}}function B2(n){const t=XU({parent:n.parent,structuredQuery:n.structuredQuery});return"LAST"===n.limitType?qx(t,t.limit,"L"):t}class Nu{constructor(){}Pt(t,e){this.It(t,e),e.Tt()}It(t,e){if("nullValue"in t)this.Et(e,5);else if("booleanValue"in t)this.Et(e,10),e.dt(t.booleanValue?1:0);else if("integerValue"in t)this.Et(e,15),e.dt(Fi(t.integerValue));else if("doubleValue"in t){const i=Fi(t.doubleValue);isNaN(i)?this.Et(e,13):(this.Et(e,15),p_(i)?e.dt(0):e.dt(i))}else if("timestampValue"in t){const i=t.timestampValue;this.Et(e,20),"string"==typeof i?e.At(i):(e.At(`${i.seconds||""}`),e.dt(i.nanos||0))}else if("stringValue"in t)this.Rt(t.stringValue,e),this.Vt(e);else if("bytesValue"in t)this.Et(e,30),e.ft(Xc(t.bytesValue)),this.Vt(e);else if("referenceValue"in t)this.gt(t.referenceValue,e);else if("geoPointValue"in t){const i=t.geoPointValue;this.Et(e,45),e.dt(i.latitude||0),e.dt(i.longitude||0)}else"mapValue"in t?K9(t)?this.Et(e,Number.MAX_SAFE_INTEGER):(this.yt(t.mapValue,e),this.Vt(e)):"arrayValue"in t?(this.wt(t.arrayValue,e),this.Vt(e)):at()}Rt(t,e){this.Et(e,25),this.St(t,e)}St(t,e){e.At(t)}yt(t,e){const i=t.fields||{};this.Et(e,55);for(const r of Object.keys(i))this.Rt(r,e),this.It(i[r],e)}wt(t,e){const i=t.values||[];this.Et(e,50);for(const r of i)this.It(r,e)}gt(t,e){this.Et(e,37),Ge.fromName(t).path.forEach(i=>{this.Et(e,60),this.St(i,e)})}Et(t,e){t.dt(e)}Vt(t){t.dt(2)}}Nu.bt=new Nu;class Qwe{constructor(){this._n=new $2}addToCollectionParentIndex(t,e){return this._n.add(e),K.resolve()}getCollectionParents(t,e){return K.resolve(this._n.getEntries(e))}addFieldIndex(t,e){return K.resolve()}deleteFieldIndex(t,e){return K.resolve()}deleteAllFieldIndexes(t){return K.resolve()}createTargetIndexes(t,e){return K.resolve()}getDocumentsMatchingTarget(t,e){return K.resolve(null)}getIndexType(t,e){return K.resolve(0)}getFieldIndexes(t,e){return K.resolve([])}getNextCollectionGroupToUpdate(t){return K.resolve(null)}getMinOffset(t,e){return K.resolve(vs.min())}getMinOffsetFromCollectionGroup(t,e){return K.resolve(vs.min())}updateCollectionGroup(t,e,i){return K.resolve()}updateIndexEntries(t,e){return K.resolve()}}class $2{constructor(){this.index={}}add(t){const e=t.lastSegment(),i=t.popLast(),r=this.index[e]||new ei(gn.comparator),o=!r.has(i);return this.index[e]=r.add(i),o}has(t){const e=t.lastSegment(),i=t.popLast(),r=this.index[e];return r&&r.has(i)}getEntries(t){return(this.index[t]||new ei(gn.comparator)).toArray()}}new Uint8Array(0);class fo{constructor(t,e,i){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=i}static withCacheSize(t){return new fo(t,fo.DEFAULT_COLLECTION_PERCENTILE,fo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}fo.DEFAULT_COLLECTION_PERCENTILE=10,fo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,fo.DEFAULT=new fo(41943040,fo.DEFAULT_COLLECTION_PERCENTILE,fo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),fo.DISABLED=new fo(-1,0,0);class Bu{constructor(t){this.On=t}next(){return this.On+=2,this.On}static Nn(){return new Bu(0)}static Ln(){return new Bu(-1)}}class eCe{constructor(){this.changes=new Zc(t=>t.toString(),(t,e)=>t.isEqual(e)),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,e){this.assertNotApplied(),this.changes.set(t,pi.newInvalidDocument(t).setReadTime(e))}getEntry(t,e){this.assertNotApplied();const i=this.changes.get(e);return void 0!==i?K.resolve(i):this.getFromCache(t,e)}getEntries(t,e){return this.getAllFromCache(t,e)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}}class iCe{constructor(t,e){this.overlayedDocument=t,this.mutatedFields=e}}class SH{constructor(t,e,i,r){this.remoteDocumentCache=t,this.mutationQueue=e,this.documentOverlayCache=i,this.indexManager=r}getDocument(t,e){let i=null;return this.documentOverlayCache.getOverlay(t,e).next(r=>(i=r,this.remoteDocumentCache.getEntry(t,e))).next(r=>(null!==i&&S_(i.mutation,r,Ko.empty(),_i.now()),r))}getDocuments(t,e){return this.remoteDocumentCache.getEntries(t,e).next(i=>this.getLocalViewOfDocuments(t,i,Kt()).next(()=>i))}getLocalViewOfDocuments(t,e,i=Kt()){const r=Za();return this.populateOverlays(t,r,e).next(()=>this.computeViews(t,e,r,i).next(o=>{let s=k_();return o.forEach((a,c)=>{s=s.insert(a,c.overlayedDocument)}),s}))}getOverlayedDocuments(t,e){const i=Za();return this.populateOverlays(t,i,e).next(()=>this.computeViews(t,e,i,Kt()))}populateOverlays(t,e,i){const r=[];return i.forEach(o=>{e.has(o)||r.push(o)}),this.documentOverlayCache.getOverlays(t,r).next(o=>{o.forEach((s,a)=>{e.set(s,a)})})}computeViews(t,e,i,r){let o=Xo();const s=E_(),a=E_();return e.forEach((c,l)=>{const d=i.get(l.key);r.has(l.key)&&(void 0===d||d.mutation instanceof Jc)?o=o.insert(l.key,l):void 0!==d?(s.set(l.key,d.mutation.getFieldMask()),S_(d.mutation,l,d.mutation.getFieldMask(),_i.now())):s.set(l.key,Ko.empty())}),this.recalculateAndSaveOverlays(t,o).next(c=>(c.forEach((l,d)=>s.set(l,d)),e.forEach((l,d)=>{var u;return a.set(l,new iCe(d,null!==(u=s.get(l))&&void 0!==u?u:null))}),a))}recalculateAndSaveOverlays(t,e){const i=E_();let r=new ci((s,a)=>s-a),o=Kt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,e).next(s=>{for(const a of s)a.keys().forEach(c=>{const l=e.get(c);if(null===l)return;let d=i.get(c)||Ko.empty();d=a.applyToLocalView(l,d),i.set(c,d);const u=(r.get(a.batchId)||Kt()).add(c);r=r.insert(a.batchId,u)})}).next(()=>{const s=[],a=r.getReverseIterator();for(;a.hasNext();){const c=a.getNext(),l=c.key,d=c.value,u=bU();d.forEach(h=>{if(!o.has(h)){const f=SU(e.get(h),i.get(h));null!==f&&u.set(h,f),o=o.add(h)}}),s.push(this.documentOverlayCache.saveOverlays(t,l,u))}return K.waitFor(s)}).next(()=>i)}recalculateAndSaveOverlaysForDocumentKeys(t,e){return this.remoteDocumentCache.getEntries(t,e).next(i=>this.recalculateAndSaveOverlays(t,i))}getDocumentsMatchingQuery(t,e,i,r){return Ge.isDocumentKey((s=e).path)&&null===s.collectionGroup&&0===s.filters.length?this.getDocumentsMatchingDocumentQuery(t,e.path):k2(e)?this.getDocumentsMatchingCollectionGroupQuery(t,e,i,r):this.getDocumentsMatchingCollectionQuery(t,e,i,r);var s}getNextDocuments(t,e,i,r){return this.remoteDocumentCache.getAllFromCollectionGroup(t,e,i,r).next(o=>{const s=r-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,e,i.largestBatchId,r-o.size):K.resolve(Za());let a=-1,c=o;return s.next(l=>K.forEach(l,(d,u)=>(a{c=c.insert(d,h)}))).next(()=>this.populateOverlays(t,l,o)).next(()=>this.computeViews(t,c,l,Kt())).next(d=>({batchId:a,changes:_U(d)})))})}getDocumentsMatchingDocumentQuery(t,e){return this.getDocument(t,new Ge(e)).next(i=>{let r=k_();return i.isFoundDocument()&&(r=r.insert(i.key,i)),r})}getDocumentsMatchingCollectionGroupQuery(t,e,i,r){const o=e.collectionGroup;let s=k_();return this.indexManager.getCollectionParents(t,o).next(a=>K.forEach(a,c=>{const l=(u=e,h=c.child(o),new Yc(h,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt));var u,h;return this.getDocumentsMatchingCollectionQuery(t,l,i,r).next(d=>{d.forEach((u,h)=>{s=s.insert(u,h)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(t,e,i,r){let o;return this.documentOverlayCache.getOverlaysForCollection(t,e.path,i.largestBatchId).next(s=>(o=s,this.remoteDocumentCache.getDocumentsMatchingQuery(t,e,i,o,r))).next(s=>{o.forEach((c,l)=>{const d=l.getKey();null===s.get(d)&&(s=s.insert(d,pi.newInvalidDocument(d)))});let a=k_();return s.forEach((c,l)=>{const d=o.get(c);void 0!==d&&S_(d.mutation,l,Ko.empty(),_i.now()),C_(e,l)&&(a=a.insert(c,l))}),a})}}class rCe{constructor(t){this.serializer=t,this.cr=new Map,this.lr=new Map}getBundleMetadata(t,e){return K.resolve(this.cr.get(e))}saveBundleMetadata(t,e){return this.cr.set(e.id,{id:(r=e).id,version:r.version,createTime:ji(r.createTime)}),K.resolve();var r}getNamedQuery(t,e){return K.resolve(this.lr.get(e))}saveNamedQuery(t,e){return this.lr.set(e.name,{name:(r=e).name,query:B2(r.bundledQuery),readTime:ji(r.readTime)}),K.resolve();var r}}class oCe{constructor(){this.overlays=new ci(Ge.comparator),this.hr=new Map}getOverlay(t,e){return K.resolve(this.overlays.get(e))}getOverlays(t,e){const i=Za();return K.forEach(e,r=>this.getOverlay(t,r).next(o=>{null!==o&&i.set(r,o)})).next(()=>i)}saveOverlays(t,e,i){return i.forEach((r,o)=>{this.ht(t,e,o)}),K.resolve()}removeOverlaysForBatchId(t,e,i){const r=this.hr.get(i);return void 0!==r&&(r.forEach(o=>this.overlays=this.overlays.remove(o)),this.hr.delete(i)),K.resolve()}getOverlaysForCollection(t,e,i){const r=Za(),o=e.length+1,s=new Ge(e.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const c=a.getNext().value,l=c.getKey();if(!e.isPrefixOf(l.path))break;l.path.length===o&&c.largestBatchId>i&&r.set(c.getKey(),c)}return K.resolve(r)}getOverlaysForCollectionGroup(t,e,i,r){let o=new ci((l,d)=>l-d);const s=this.overlays.getIterator();for(;s.hasNext();){const l=s.getNext().value;if(l.getKey().getCollectionGroup()===e&&l.largestBatchId>i){let d=o.get(l.largestBatchId);null===d&&(d=Za(),o=o.insert(l.largestBatchId,d)),d.set(l.getKey(),l)}}const a=Za(),c=o.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((l,d)=>a.set(l,d)),!(a.size()>=r)););return K.resolve(a)}ht(t,e,i){const r=this.overlays.get(i.key);if(null!==r){const s=this.hr.get(r.largestBatchId).delete(i.key);this.hr.set(r.largestBatchId,s)}this.overlays=this.overlays.insert(i.key,new I2(e,i));let o=this.hr.get(e);void 0===o&&(o=Kt(),this.hr.set(e,o)),this.hr.set(e,o.add(i.key))}}class G2{constructor(){this.Pr=new ei(Rr.Ir),this.Tr=new ei(Rr.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(t,e){const i=new Rr(t,e);this.Pr=this.Pr.add(i),this.Tr=this.Tr.add(i)}dr(t,e){t.forEach(i=>this.addReference(i,e))}removeReference(t,e){this.Ar(new Rr(t,e))}Rr(t,e){t.forEach(i=>this.removeReference(i,e))}Vr(t){const e=new Ge(new gn([])),i=new Rr(e,t),r=new Rr(e,t+1),o=[];return this.Tr.forEachInRange([i,r],s=>{this.Ar(s),o.push(s.key)}),o}mr(){this.Pr.forEach(t=>this.Ar(t))}Ar(t){this.Pr=this.Pr.delete(t),this.Tr=this.Tr.delete(t)}gr(t){const e=new Ge(new gn([])),i=new Rr(e,t),r=new Rr(e,t+1);let o=Kt();return this.Tr.forEachInRange([i,r],s=>{o=o.add(s.key)}),o}containsKey(t){const e=new Rr(t,0),i=this.Pr.firstAfterOrEqual(e);return null!==i&&t.isEqual(i.key)}}class Rr{constructor(t,e){this.key=t,this.pr=e}static Ir(t,e){return Ge.comparator(t.key,e.key)||Ot(t.pr,e.pr)}static Er(t,e){return Ot(t.pr,e.pr)||Ge.comparator(t.key,e.key)}}class sCe{constructor(t,e){this.indexManager=t,this.referenceDelegate=e,this.mutationQueue=[],this.yr=1,this.wr=new ei(Rr.Ir)}checkEmpty(t){return K.resolve(0===this.mutationQueue.length)}addMutationBatch(t,e,i,r){const o=this.yr;this.yr++;const s=new D2(o,e,i,r);this.mutationQueue.push(s);for(const a of r)this.wr=this.wr.add(new Rr(a.key,o)),this.indexManager.addToCollectionParentIndex(t,a.key.path.popLast());return K.resolve(s)}lookupMutationBatch(t,e){return K.resolve(this.Sr(e))}getNextMutationBatchAfterBatchId(t,e){const r=this.br(e+1),o=r<0?0:r;return K.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return K.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(t){return K.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,e){const i=new Rr(e,0),r=new Rr(e,Number.POSITIVE_INFINITY),o=[];return this.wr.forEachInRange([i,r],s=>{const a=this.Sr(s.pr);o.push(a)}),K.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(t,e){let i=new ei(Ot);return e.forEach(r=>{const o=new Rr(r,0),s=new Rr(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([o,s],a=>{i=i.add(a.pr)})}),K.resolve(this.Dr(i))}getAllMutationBatchesAffectingQuery(t,e){const i=e.path,r=i.length+1;let o=i;Ge.isDocumentKey(o)||(o=o.child(""));const s=new Rr(new Ge(o),0);let a=new ei(Ot);return this.wr.forEachWhile(c=>{const l=c.key.path;return!!i.isPrefixOf(l)&&(l.length===r&&(a=a.add(c.pr)),!0)},s),K.resolve(this.Dr(a))}Dr(t){const e=[];return t.forEach(i=>{const r=this.Sr(i);null!==r&&e.push(r)}),e}removeMutationBatch(t,e){ft(0===this.Cr(e.batchId,"removed")),this.mutationQueue.shift();let i=this.wr;return K.forEach(e.mutations,r=>{const o=new Rr(r.key,e.batchId);return i=i.delete(o),this.referenceDelegate.markPotentiallyOrphaned(t,r.key)}).next(()=>{this.wr=i})}Mn(t){}containsKey(t,e){const i=new Rr(e,0),r=this.wr.firstAfterOrEqual(i);return K.resolve(e.isEqual(r&&r.key))}performConsistencyCheck(t){return K.resolve()}Cr(t,e){return this.br(t)}br(t){return 0===this.mutationQueue.length?0:t-this.mutationQueue[0].batchId}Sr(t){const e=this.br(t);return e<0||e>=this.mutationQueue.length?null:this.mutationQueue[e]}}class aCe{constructor(t){this.vr=t,this.docs=new ci(Ge.comparator),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,e){const i=e.key,r=this.docs.get(i),o=r?r.size:0,s=this.vr(e);return this.docs=this.docs.insert(i,{document:e.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(t,i.path.popLast())}removeEntry(t){const e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)}getEntry(t,e){const i=this.docs.get(e);return K.resolve(i?i.document.mutableCopy():pi.newInvalidDocument(e))}getEntries(t,e){let i=Xo();return e.forEach(r=>{const o=this.docs.get(r);i=i.insert(r,o?o.document.mutableCopy():pi.newInvalidDocument(r))}),K.resolve(i)}getDocumentsMatchingQuery(t,e,i,r){let o=Xo();const s=e.path,a=new Ge(s.child("")),c=this.docs.getIteratorFrom(a);for(;c.hasNext();){const{key:l,value:{document:d}}=c.getNext();if(!s.isPrefixOf(l.path))break;l.path.length>s.length+1||m2(R9(d),i)<=0||(r.has(d.key)||C_(e,d))&&(o=o.insert(d.key,d.mutableCopy()))}return K.resolve(o)}getAllFromCollectionGroup(t,e,i,r){at()}Fr(t,e){return K.forEach(this.docs,i=>e(i))}newChangeBuffer(t){return new cCe(this)}getSize(t){return K.resolve(this.size)}}class cCe extends eCe{constructor(t){super(),this.ar=t}applyChanges(t){const e=[];return this.changes.forEach((i,r)=>{r.isValidDocument()?e.push(this.ar.addEntry(t,r)):this.ar.removeEntry(i)}),K.waitFor(e)}getFromCache(t,e){return this.ar.getEntry(t,e)}getAllFromCache(t,e){return this.ar.getEntries(t,e)}}class lCe{constructor(t){this.persistence=t,this.Mr=new Zc(e=>Iu(e),x_),this.lastRemoteSnapshotVersion=_t.min(),this.highestTargetId=0,this.Or=0,this.Nr=new G2,this.targetCount=0,this.Lr=Bu.Nn()}forEachTarget(t,e){return this.Mr.forEach((i,r)=>e(r)),K.resolve()}getLastRemoteSnapshotVersion(t){return K.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return K.resolve(this.Or)}allocateTargetId(t){return this.highestTargetId=this.Lr.next(),K.resolve(this.highestTargetId)}setTargetsMetadata(t,e,i){return i&&(this.lastRemoteSnapshotVersion=i),e>this.Or&&(this.Or=e),K.resolve()}qn(t){this.Mr.set(t.target,t);const e=t.targetId;e>this.highestTargetId&&(this.Lr=new Bu(e),this.highestTargetId=e),t.sequenceNumber>this.Or&&(this.Or=t.sequenceNumber)}addTargetData(t,e){return this.qn(e),this.targetCount+=1,K.resolve()}updateTargetData(t,e){return this.qn(e),K.resolve()}removeTargetData(t,e){return this.Mr.delete(e.target),this.Nr.Vr(e.targetId),this.targetCount-=1,K.resolve()}removeTargets(t,e,i){let r=0;const o=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=e&&null===i.get(a.targetId)&&(this.Mr.delete(s),o.push(this.removeMatchingKeysForTargetId(t,a.targetId)),r++)}),K.waitFor(o).next(()=>r)}getTargetCount(t){return K.resolve(this.targetCount)}getTargetData(t,e){const i=this.Mr.get(e)||null;return K.resolve(i)}addMatchingKeys(t,e,i){return this.Nr.dr(e,i),K.resolve()}removeMatchingKeys(t,e,i){this.Nr.Rr(e,i);const r=this.persistence.referenceDelegate,o=[];return r&&e.forEach(s=>{o.push(r.markPotentiallyOrphaned(t,s))}),K.waitFor(o)}removeMatchingKeysForTargetId(t,e){return this.Nr.Vr(e),K.resolve()}getMatchingKeysForTargetId(t,e){const i=this.Nr.gr(e);return K.resolve(i)}containsKey(t,e){return K.resolve(this.Nr.containsKey(e))}}class W2{constructor(t,e){this.Br={},this.overlays={},this.kr=new ys(0),this.qr=!1,this.qr=!0,this.referenceDelegate=t(this),this.Qr=new lCe(this),this.indexManager=new Qwe,this.remoteDocumentCache=new aCe(i=>this.referenceDelegate.Kr(i)),this.serializer=new eH(e),this.$r=new rCe(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let e=this.overlays[t.toKey()];return e||(e=new oCe,this.overlays[t.toKey()]=e),e}getMutationQueue(t,e){let i=this.Br[t.toKey()];return i||(i=new sCe(e,this.referenceDelegate),this.Br[t.toKey()]=i),i}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(t,e,i){Ee("MemoryPersistence","Starting transaction:",t);const r=new dCe(this.kr.next());return this.referenceDelegate.Ur(),i(r).next(o=>this.referenceDelegate.Wr(r).next(()=>o)).toPromise().then(o=>(r.raiseOnCommittedEvent(),o))}Gr(t,e){return K.or(Object.values(this.Br).map(i=>()=>i.containsKey(t,e)))}}class dCe extends R1e{constructor(t){super(),this.currentSequenceNumber=t}}class a1{constructor(t){this.persistence=t,this.zr=new G2,this.jr=null}static Hr(t){return new a1(t)}get Jr(){if(this.jr)return this.jr;throw at()}addReference(t,e,i){return this.zr.addReference(i,e),this.Jr.delete(i.toString()),K.resolve()}removeReference(t,e,i){return this.zr.removeReference(i,e),this.Jr.add(i.toString()),K.resolve()}markPotentiallyOrphaned(t,e){return this.Jr.add(e.toString()),K.resolve()}removeTarget(t,e){this.zr.Vr(e.targetId).forEach(r=>this.Jr.add(r.toString()));const i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(t,e.targetId).next(r=>{r.forEach(o=>this.Jr.add(o.toString()))}).next(()=>i.removeTargetData(t,e))}Ur(){this.jr=new Set}Wr(t){const e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return K.forEach(this.Jr,i=>{const r=Ge.fromPath(i);return this.Yr(t,r).next(o=>{o||e.removeEntry(r,_t.min())})}).next(()=>(this.jr=null,e.apply(t)))}updateLimboDocument(t,e){return this.Yr(t,e).next(i=>{i?this.Jr.delete(e.toString()):this.Jr.add(e.toString())})}Kr(t){return 0}Yr(t,e){return K.or([()=>K.resolve(this.zr.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(t,e),()=>this.persistence.Gr(t,e)])}}class X2{constructor(t,e,i,r){this.targetId=t,this.fromCache=e,this.qi=i,this.Qi=r}static Ki(t,e){let i=Kt(),r=Kt();for(const o of e.docChanges)switch(o.type){case 0:i=i.add(o.doc.key);break;case 1:r=r.add(o.doc.key)}return new X2(t,e.fromCache,i,r)}}class hCe{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(t){this._documentReadCount+=t}}class AH{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function Zve(){return!function Yve(){var n;const t=null===(n=sx())||void 0===n?void 0:n.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}()?8:zs.v(Yl())>0?6:4}initialize(t,e){this.zi=t,this.indexManager=e,this.$i=!0}getDocumentsMatchingQuery(t,e,i,r){const o={result:null};return this.ji(t,e).next(s=>{o.result=s}).next(()=>{if(!o.result)return this.Hi(t,e,r,i).next(s=>{o.result=s})}).next(()=>{if(o.result)return;const s=new hCe;return this.Ji(t,e,s).next(a=>{if(o.result=a,this.Ui)return this.Yi(t,e,s,a.size)})}).next(()=>o.result)}Yi(t,e,i,r){return i.documentReadCountthis.Gi*r?(Yf()<=En.DEBUG&&Ee("QueryEngine","The SDK decides to create cache indexes for query:",sm(e),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(t,No(e))):K.resolve())}ji(t,e){if(uU(e))return K.resolve(null);let i=No(e);return this.indexManager.getIndexType(t,i).next(r=>0===r?null:(null!==e.limit&&1===r&&(e=qx(e,null,"F"),i=No(e)),this.indexManager.getDocumentsMatchingTarget(t,i).next(o=>{const s=Kt(...o);return this.zi.getDocuments(t,s).next(a=>this.indexManager.getMinOffset(t,i).next(c=>{const l=this.Zi(e,a);return this.Xi(e,l,s,c.readTime)?this.ji(t,qx(e,null,"F")):this.es(t,l,e,c)}))})))}Hi(t,e,i,r){return uU(e)||r.isEqual(_t.min())?K.resolve(null):this.zi.getDocuments(t,i).next(o=>{const s=this.Zi(e,o);return this.Xi(e,s,i,r)?K.resolve(null):(Yf()<=En.DEBUG&&Ee("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),sm(e)),this.es(t,s,e,function M9(n,t){const e=n.toTimestamp().seconds,i=n.toTimestamp().nanoseconds+1,r=_t.fromTimestamp(1e9===i?new _i(e+1,0):new _i(e,i));return new vs(r,Ge.empty(),t)}(r,-1)).next(a=>a))})}Zi(t,e){let i=new ei(pU(t));return e.forEach((r,o)=>{C_(t,o)&&(i=i.add(o))}),i}Xi(t,e,i,r){if(null===t.limit)return!1;if(i.size!==e.size)return!0;const o="F"===t.limitType?e.last():e.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(r)>0)}Ji(t,e,i){return Yf()<=En.DEBUG&&Ee("QueryEngine","Using full collection scan to execute query:",sm(e)),this.zi.getDocumentsMatchingQuery(t,e,vs.min(),i)}es(t,e,i,r){return this.zi.getDocumentsMatchingQuery(t,i,r).next(o=>(e.forEach(s=>{o=o.insert(s.key,s)}),o))}}class fCe{constructor(t,e,i,r){this.persistence=t,this.ts=e,this.serializer=r,this.ns=new ci(Ot),this.rs=new Zc(o=>Iu(o),x_),this.ss=new Map,this.os=t.getRemoteDocumentCache(),this.Qr=t.getTargetCache(),this.$r=t.getBundleCache(),this._s(i)}_s(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new SH(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",e=>t.collect(e,this.ns))}}function MH(n,t){return Y2.apply(this,arguments)}function Y2(){return Y2=xe(function*(n,t){const e=je(n);return yield e.persistence.runTransaction("Handle user change","readonly",i=>{let r;return e.mutationQueue.getAllMutationBatches(i).next(o=>(r=o,e._s(t),e.mutationQueue.getAllMutationBatches(i))).next(o=>{const s=[],a=[];let c=Kt();for(const l of r){s.push(l.batchId);for(const d of l.mutations)c=c.add(d.key)}for(const l of o){a.push(l.batchId);for(const d of l.mutations)c=c.add(d.key)}return e.localDocuments.getDocuments(i,c).next(l=>({us:l,removedBatchIds:s,addedBatchIds:a}))})})}),Y2.apply(this,arguments)}function RH(n){const t=je(n);return t.persistence.runTransaction("Get last remote snapshot version","readonly",e=>t.Qr.getLastRemoteSnapshotVersion(e))}function gCe(n,t){const e=je(n);return e.persistence.runTransaction("Get next mutation batch","readonly",i=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(i,t)))}function bm(n,t,e){return Z2.apply(this,arguments)}function Z2(){return Z2=xe(function*(n,t,e){const i=je(n),r=i.ns.get(t),o=e?"readwrite":"readwrite-primary";try{e||(yield i.persistence.runTransaction("Release target",o,s=>i.persistence.referenceDelegate.removeTarget(s,r)))}catch(s){if(!id(s))throw s;Ee("LocalStore",`Failed to update sequence numbers for target ${t}: ${s}`)}i.ns=i.ns.remove(t),i.rs.delete(r.target)}),Z2.apply(this,arguments)}function d1(n,t,e){const i=je(n);let r=_t.min(),o=Kt();return i.persistence.runTransaction("Execute query","readwrite",s=>function(c,l,d){const u=je(c),h=u.rs.get(d);return void 0!==h?K.resolve(u.ns.get(h)):u.Qr.getTargetData(l,d)}(i,s,No(t)).next(a=>{if(a)return r=a.lastLimboFreeSnapshotVersion,i.Qr.getMatchingKeysForTargetId(s,a.targetId).next(c=>{o=c})}).next(()=>i.ts.getDocumentsMatchingQuery(s,t,e?r:_t.min(),e?o:Kt())).next(a=>(function NH(n,t,e){let i=n.ss.get(t)||_t.min();e.forEach((r,o)=>{o.readTime.compareTo(i)>0&&(i=o.readTime)}),n.ss.set(t,i)}(i,function mU(n){return n.collectionGroup||(n.path.length%2==1?n.path.lastSegment():n.path.get(n.path.length-2))}(t),a),{documents:a,hs:o})))}class iA{constructor(){this.activeTargetIds=function T2(){return _we}()}As(t){this.activeTargetIds=this.activeTargetIds.add(t)}Rs(t){this.activeTargetIds=this.activeTargetIds.delete(t)}ds(){const t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}}class VH{constructor(){this.no=new iA,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,e,i){}addLocalQueryTarget(t){return this.no.As(t),this.ro[t]||"not-current"}updateQueryState(t,e,i){this.ro[t]=e}removeLocalQueryTarget(t){this.no.Rs(t)}isLocalQueryTarget(t){return this.no.activeTargetIds.has(t)}clearQueryState(t){delete this.ro[t]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(t){return this.no.activeTargetIds.has(t)}start(){return this.no=new iA,Promise.resolve()}handleUserChange(t,e,i){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}}class vCe{io(t){}shutdown(){}}class UH{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(t){this.uo.push(t)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Ee("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const t of this.uo)t(0)}ao(){Ee("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const t of this.uo)t(1)}static D(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let f1=null;function oA(){return null===f1?f1=268435456+Math.round(2147483648*Math.random()):f1++,"0x"+f1.toString(16)}const yCe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class xCe{constructor(t){this.lo=t.lo,this.ho=t.ho}Po(t){this.Io=t}To(t){this.Eo=t}onMessage(t){this.Ao=t}close(){this.ho()}send(t){this.lo(t)}Ro(){this.Io()}Vo(t){this.Eo(t)}mo(t){this.Ao(t)}}const mo="WebChannelConnection";class wCe extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const i=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.fo=i+"://"+e.host,this.po=`projects/${r}/databases/${o}`,this.yo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${o}`}get wo(){return!1}So(e,i,r,o,s){const a=oA(),c=this.bo(e,i.toUriEncodedString());Ee("RestConnection",`Sending RPC '${e}' ${a}:`,c,r);const l={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(l,o,s),this.Co(e,c,l,r).then(d=>(Ee("RestConnection",`Received RPC '${e}' ${a}: `,d),d),d=>{throw bs("RestConnection",`RPC '${e}' ${a} failed with error: `,d,"url: ",c,"request:",r),d})}vo(e,i,r,o,s,a){return this.So(e,i,r,o,s)}Do(e,i,r){e["X-Goog-Api-Client"]="gl-js/ fire/"+Xf,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),i&&i.headers.forEach((o,s)=>e[s]=o),r&&r.headers.forEach((o,s)=>e[s]=o)}bo(e,i){return`${this.fo}/v1/${i}:${yCe[e]}`}terminate(){}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}Co(t,e,i,r){const o=oA();return new Promise((s,a)=>{const c=new y1e;c.setWithCredentials(!0),c.listenOnce(b1e.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case u2.NO_ERROR:const d=c.getResponseJson();Ee(mo,`XHR for RPC '${t}' ${o} received:`,JSON.stringify(d)),s(d);break;case u2.TIMEOUT:Ee(mo,`RPC '${t}' ${o} timed out`),a(new Te(oe.DEADLINE_EXCEEDED,"Request time out"));break;case u2.HTTP_ERROR:const u=c.getStatus();if(Ee(mo,`RPC '${t}' ${o} failed with status:`,u,"response text:",c.getResponseText()),u>0){let h=c.getResponseJson();Array.isArray(h)&&(h=h[0]);const f=h?.error;if(f&&f.status&&f.message){const m=function(p){const b=p.toLowerCase().replace(/_/g,"-");return Object.values(oe).indexOf(b)>=0?b:oe.UNKNOWN}(f.status);a(new Te(m,f.message))}else a(new Te(oe.UNKNOWN,"Server responded with status "+c.getStatus()))}else a(new Te(oe.UNAVAILABLE,"Connection failed."));break;default:at()}}finally{Ee(mo,`RPC '${t}' ${o} completed.`)}});const l=JSON.stringify(r);Ee(mo,`RPC '${t}' ${o} sending request:`,r),c.send(e,"POST",l,i,15)})}Fo(t,e,i){const r=oA(),o=[this.fo,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=g1e(),a=_1e(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(c.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(c.useFetchStreams=!0),this.Do(c.initMessageHeaders,e,i),c.encodeInitMessageHeaders=!0;const d=o.join("");Ee(mo,`Creating RPC '${t}' stream ${r}: ${d}`,c);const u=s.createWebChannel(d,c);let h=!1,f=!1;const m=new xCe({lo:p=>{f?Ee(mo,`Not sending because RPC '${t}' stream ${r} is closed:`,p):(h||(Ee(mo,`Opening RPC '${t}' stream ${r} transport.`),u.open(),h=!0),Ee(mo,`RPC '${t}' stream ${r} sending:`,p),u.send(p))},ho:()=>u.close()}),g=(p,b,C)=>{p.listen(b,x=>{try{C(x)}catch(D){setTimeout(()=>{throw D},0)}})};return g(u,Nx.EventType.OPEN,()=>{f||Ee(mo,`RPC '${t}' stream ${r} transport opened.`)}),g(u,Nx.EventType.CLOSE,()=>{f||(f=!0,Ee(mo,`RPC '${t}' stream ${r} transport closed`),m.Vo())}),g(u,Nx.EventType.ERROR,p=>{f||(f=!0,bs(mo,`RPC '${t}' stream ${r} transport errored:`,p),m.Vo(new Te(oe.UNAVAILABLE,"The operation could not be completed")))}),g(u,Nx.EventType.MESSAGE,p=>{var b;if(!f){const C=p.data[0];ft(!!C);const D=C.error||(null===(b=C[0])||void 0===b?void 0:b.error);if(D){Ee(mo,`RPC '${t}' stream ${r} received error:`,D);const j=D.status;let P=function(V){const q=ir[V];if(void 0!==q)return FU(q)}(j),S=D.message;void 0===P&&(P=oe.INTERNAL,S="Unknown error status: "+j+" with message "+D.message),f=!0,m.Vo(new Te(P,S)),u.close()}else Ee(mo,`RPC '${t}' stream ${r} received:`,C),m.mo(C)}}),g(a,v1e.STAT_EVENT,p=>{p.stat===E9.PROXY?Ee(mo,`RPC '${t}' stream ${r} detected buffering proxy`):p.stat===E9.NOPROXY&&Ee(mo,`RPC '${t}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{m.Ro()},0),m}}function m1(){return typeof document<"u"?document:null}function U_(n){return new Mwe(n,!0)}class sA{constructor(t,e,i=1e3,r=1.5,o=6e4){this.oi=t,this.timerId=e,this.Mo=i,this.xo=r,this.Oo=o,this.No=0,this.Lo=null,this.Bo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(t){this.cancel();const e=Math.floor(this.No+this.Qo()),i=Math.max(0,Date.now()-this.Bo),r=Math.max(0,e-i);r>0&&Ee("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.No} ms, delay with jitter: ${e} ms, last attempt: ${i} ms ago)`),this.Lo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Bo=Date.now(),t())),this.No*=this.xo,this.Nothis.Oo&&(this.No=this.Oo)}Ko(){null!==this.Lo&&(this.Lo.skipDelay(),this.Lo=null)}cancel(){null!==this.Lo&&(this.Lo.cancel(),this.Lo=null)}Qo(){return(Math.random()-.5)*this.No}}class zH{constructor(t,e,i,r,o,s,a,c){this.oi=t,this.$o=i,this.Uo=r,this.connection=o,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=c,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new sA(t,e)}Ho(){return 1===this.state||5===this.state||this.Jo()}Jo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Yo()}stop(){var t=this;return xe(function*(){t.Ho()&&(yield t.close(0))})()}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&null===this.Go&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(t){this.n_(),this.stream.send(t)}e_(){var t=this;return xe(function*(){if(t.Jo())return t.close(0)})()}n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}close(t,e){var i=this;return xe(function*(){i.n_(),i.r_(),i.jo.cancel(),i.Wo++,4!==t?i.jo.reset():e&&e.code===oe.RESOURCE_EXHAUSTED?(zi(e.toString()),zi("Using maximum backoff delay to prevent overloading the backend."),i.jo.ko()):e&&e.code===oe.UNAUTHENTICATED&&3!==i.state&&(i.authCredentialsProvider.invalidateToken(),i.appCheckCredentialsProvider.invalidateToken()),null!==i.stream&&(i.i_(),i.stream.close(),i.stream=null),i.state=t,yield i.listener.To(e)})()}i_(){}auth(){this.state=1;const t=this.s_(this.Wo),e=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([i,r])=>{this.Wo===e&&this.o_(i,r)},i=>{t(()=>{const r=new Te(oe.UNKNOWN,"Fetching auth token failed: "+i.message);return this.__(r)})})}o_(t,e){const i=this.s_(this.Wo);this.stream=this.a_(t,e),this.stream.Po(()=>{i(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(r=>{i(()=>this.__(r))}),this.stream.onMessage(r=>{i(()=>this.onMessage(r))})}Yo(){var t=this;this.state=5,this.jo.qo(xe(function*(){t.state=0,t.start()}))}__(t){return Ee("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}s_(t){return e=>{this.oi.enqueueAndForget(()=>this.Wo===t?e():(Ee("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class CCe extends zH{constructor(t,e,i,r,o,s){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,i,r,s),this.serializer=o}a_(t,e){return this.connection.Fo("Listen",t,e)}onMessage(t){this.jo.reset();const e=function Pwe(n,t){let e;if("targetChange"in t){const i="NO_CHANGE"===(l=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===l?1:"REMOVE"===l?2:"CURRENT"===l?3:"RESET"===l?4:at(),r=t.targetChange.targetIds||[],o=function(l,d){return l.useProto3Json?(ft(void 0===d||"string"==typeof d),br.fromBase64String(d||"")):(ft(void 0===d||d instanceof Uint8Array),br.fromUint8Array(d||new Uint8Array))}(n,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(l){const d=void 0===l.code?oe.UNKNOWN:FU(l.code);return new Te(d,l.message||"")}(s);e=new BU(i,r,o,a||null)}else if("documentChange"in t){const i=t.documentChange,r=Ja(n,i.document.name),o=ji(i.document.updateTime),s=i.document.createTime?ji(i.document.createTime):_t.min(),a=new Gr({mapValue:{fields:i.document.fields}}),c=pi.newFoundDocument(r,o,s,a);e=new Zx(i.targetIds||[],i.removedTargetIds||[],c.key,c)}else if("documentDelete"in t){const i=t.documentDelete,r=Ja(n,i.document),o=i.readTime?ji(i.readTime):_t.min(),s=pi.newNoDocument(r,o);e=new Zx([],i.removedTargetIds||[],s.key,s)}else if("documentRemove"in t){const i=t.documentRemove,r=Ja(n,i.document);e=new Zx([],i.removedTargetIds||[],r,null)}else{if(!("filter"in t))return at();{const i=t.filter,{count:r=0,unchangedNames:o}=i,s=new Ewe(r,o);e=new LU(i.targetId,s)}}var l;return e}(this.serializer,t),i=function(o){if(!("targetChange"in o))return _t.min();const s=o.targetChange;return s.targetIds&&s.targetIds.length?_t.min():s.readTime?ji(s.readTime):_t.min()}(t);return this.listener.u_(e,i)}c_(t){const e={};e.database=O2(this.serializer),e.addTarget=function(o,s){let a;const c=s.target;if(a=Gx(c)?{documents:KU(o,c)}:{query:L2(o,c).ut},a.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){a.resumeToken=zU(o,s.resumeToken);const l=R2(o,s.expectedCount);null!==l&&(a.expectedCount=l)}else if(s.snapshotVersion.compareTo(_t.min())>0){a.readTime=um(o,s.snapshotVersion.toTimestamp());const l=R2(o,s.expectedCount);null!==l&&(a.expectedCount=l)}return a}(this.serializer,t);const i=function Nwe(n,t){const e=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return at()}}(t.purpose);return null==e?null:{"goog-listen-tags":e}}(0,t);i&&(e.labels=i),this.t_(e)}l_(t){const e={};e.database=O2(this.serializer),e.removeTarget=t,this.t_(e)}}class kCe extends zH{constructor(t,e,i,r,o,s){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,i,r,s),this.serializer=o,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(t,e){return this.connection.Fo("Write",t,e)}onMessage(t){if(ft(!!t.streamToken),this.lastStreamToken=t.streamToken,this.h_){this.jo.reset();const e=function Owe(n,t){return n&&n.length>0?(ft(void 0!==t),n.map(e=>function(r,o){let s=ji(r.updateTime?r.updateTime:o);return s.isEqual(_t.min())&&(s=ji(o)),new xwe(s,r.transformResults||[])}(e,t))):[]}(t.writeResults,t.commitTime),i=ji(t.commitTime);return this.listener.T_(i,e)}return ft(!t.writeResults||0===t.writeResults.length),this.h_=!0,this.listener.E_()}d_(){const t={};t.database=O2(this.serializer),this.t_(t)}I_(t){const e={streamToken:this.lastStreamToken,writes:t.map(i=>function R_(n,t){let e;if(t instanceof lm)e={update:qU(n,t.key,t.value)};else if(t instanceof dm)e={delete:M_(n,t.key)};else if(t instanceof Jc)e={update:qU(n,t.key,t.data),updateMask:Uwe(t.fieldMask)};else{if(!(t instanceof S2))return at();e={verify:M_(n,t.key)}}return t.fieldTransforms.length>0&&(e.updateTransforms=t.fieldTransforms.map(i=>function(o,s){const a=s.transform;if(a instanceof am)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Mu)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof Ru)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof cm)return{fieldPath:s.field.canonicalString(),increment:a.Ie};throw at()}(0,i))),t.precondition.isNone||(e.currentDocument=void 0!==(o=t.precondition).updateTime?{updateTime:Rwe(n,o.updateTime)}:void 0!==o.exists?{exists:o.exists}:at()),e;var o}(this.serializer,i))};this.t_(e)}}class ECe extends class{}{constructor(t,e,i,r){super(),this.authCredentials=t,this.appCheckCredentials=e,this.connection=i,this.serializer=r,this.A_=!1}R_(){if(this.A_)throw new Te(oe.FAILED_PRECONDITION,"The client has already been terminated.")}So(t,e,i,r){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.So(t,P2(e,i),r,o,s)).catch(o=>{throw"FirebaseError"===o.name?(o.code===oe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Te(oe.UNKNOWN,o.toString())})}vo(t,e,i,r,o){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(t,P2(e,i),r,s,a,o)).catch(s=>{throw"FirebaseError"===s.name?(s.code===oe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Te(oe.UNKNOWN,s.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class SCe{constructor(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){0===this.m_&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(t){"Online"===this.state?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.y_("Offline")))}set(t){this.b_(),this.m_=0,"Online"===t&&(this.g_=!1),this.y_(t)}y_(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}w_(t){const e=`Could not reach Cloud Firestore backend. ${t}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.g_?(zi(e),this.g_=!1):Ee("OnlineStateTracker",e)}b_(){null!==this.f_&&(this.f_.cancel(),this.f_=null)}}class DCe{constructor(t,e,i,r,o){var s=this;this.localStore=t,this.datastore=e,this.asyncQueue=i,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=o,this.M_.io(a=>{i.enqueueAndForget(xe(function*(){var c;md(s)&&(Ee("RemoteStore","Restarting streams for network reachability change."),yield(c=xe(function*(d){const u=je(d);u.v_.add(4),yield vm(u),u.x_.set("Unknown"),u.v_.delete(4),yield H_(u)}),function l(d){return c.apply(this,arguments)})(s))}))}),this.x_=new SCe(i,r)}}function H_(n){return cA.apply(this,arguments)}function cA(){return cA=xe(function*(n){if(md(n))for(const t of n.F_)yield t(!0)}),cA.apply(this,arguments)}function vm(n){return lA.apply(this,arguments)}function lA(){return lA=xe(function*(n){for(const t of n.F_)yield t(!1)}),lA.apply(this,arguments)}function p1(n,t){const e=je(n);e.C_.has(t.targetId)||(e.C_.set(t.targetId,t),hA(e)?uA(e):wm(e).Jo()&&dA(e,t))}function ym(n,t){const e=je(n),i=wm(e);e.C_.delete(t),i.Jo()&&jH(e,t),0===e.C_.size&&(i.Jo()?i.Xo():md(e)&&e.x_.set("Unknown"))}function dA(n,t){if(n.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(_t.min())>0){const e=n.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(e)}wm(n).c_(t)}function jH(n,t){n.O_.Oe(t),wm(n).l_(t)}function uA(n){n.O_=new Swe({getRemoteKeysForTarget:t=>n.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>n.C_.get(t)||null,nt:()=>n.datastore.serializer.databaseId}),wm(n).start(),n.x_.p_()}function hA(n){return md(n)&&!wm(n).Ho()&&n.C_.size>0}function md(n){return 0===je(n).v_.size}function $H(n){n.O_=void 0}function ACe(n){return fA.apply(this,arguments)}function fA(){return fA=xe(function*(n){n.C_.forEach((t,e)=>{dA(n,t)})}),fA.apply(this,arguments)}function ICe(n,t){return mA.apply(this,arguments)}function mA(){return mA=xe(function*(n,t){$H(n),hA(n)?(n.x_.S_(t),uA(n)):n.x_.set("Unknown")}),mA.apply(this,arguments)}function MCe(n,t,e){return pA.apply(this,arguments)}function pA(){return pA=xe(function*(n,t,e){if(n.x_.set("Online"),t instanceof BU&&2===t.state&&t.cause)try{yield(i=xe(function*(o,s){const a=s.cause;for(const c of s.targetIds)o.C_.has(c)&&(yield o.remoteSyncer.rejectListen(c,a),o.C_.delete(c),o.O_.removeTarget(c))}),function r(o,s){return i.apply(this,arguments)})(n,t)}catch(i){Ee("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),i),yield g1(n,i)}else if(t instanceof Zx?n.O_.$e(t):t instanceof LU?n.O_.Je(t):n.O_.Ge(t),!e.isEqual(_t.min()))try{const i=yield RH(n.localStore);e.compareTo(i)>=0&&(yield function(o,s){const a=o.O_.it(s);return a.targetChanges.forEach((c,l)=>{if(c.resumeToken.approximateByteSize()>0){const d=o.C_.get(l);d&&o.C_.set(l,d.withResumeToken(c.resumeToken,s))}}),a.targetMismatches.forEach((c,l)=>{const d=o.C_.get(c);if(!d)return;o.C_.set(c,d.withResumeToken(br.EMPTY_BYTE_STRING,d.snapshotVersion)),jH(o,c);const u=new el(d.target,c,l,d.sequenceNumber);dA(o,u)}),o.remoteSyncer.applyRemoteEvent(a)}(n,e))}catch(i){Ee("RemoteStore","Failed to raise snapshot:",i),yield g1(n,i)}var i}),pA.apply(this,arguments)}function g1(n,t,e){return gA.apply(this,arguments)}function gA(){return gA=xe(function*(n,t,e){if(!id(t))throw t;n.v_.add(1),yield vm(n),n.x_.set("Offline"),e||(e=()=>RH(n.localStore)),n.asyncQueue.enqueueRetryable(xe(function*(){Ee("RemoteStore","Retrying IndexedDB access"),yield e(),n.v_.delete(1),yield H_(n)}))}),gA.apply(this,arguments)}function GH(n,t){return t().catch(e=>g1(n,e,t))}function xm(n){return _A.apply(this,arguments)}function _A(){return _A=xe(function*(n){const t=je(n),e=pd(t);let i=t.D_.length>0?t.D_[t.D_.length-1].batchId:-1;for(;RCe(t);)try{const r=yield gCe(t.localStore,i);if(null===r){0===t.D_.length&&e.Xo();break}i=r.batchId,FCe(t,r)}catch(r){yield g1(t,r)}WH(t)&&qH(t)}),_A.apply(this,arguments)}function RCe(n){return md(n)&&n.D_.length<10}function FCe(n,t){n.D_.push(t);const e=pd(n);e.Jo()&&e.P_&&e.I_(t.mutations)}function WH(n){return md(n)&&!pd(n).Ho()&&n.D_.length>0}function qH(n){pd(n).start()}function PCe(n){return bA.apply(this,arguments)}function bA(){return bA=xe(function*(n){pd(n).d_()}),bA.apply(this,arguments)}function OCe(n){return vA.apply(this,arguments)}function vA(){return vA=xe(function*(n){const t=pd(n);for(const e of n.D_)t.I_(e.mutations)}),vA.apply(this,arguments)}function NCe(n,t,e){return yA.apply(this,arguments)}function yA(){return yA=xe(function*(n,t,e){const i=n.D_.shift(),r=A2.from(i,t,e);yield GH(n,()=>n.remoteSyncer.applySuccessfulWrite(r)),yield xm(n)}),yA.apply(this,arguments)}function LCe(n,t){return xA.apply(this,arguments)}function xA(){return xA=xe(function*(n,t){var e;t&&pd(n).P_&&(yield(e=xe(function*(r,o){if(function RU(n){switch(n){default:return at();case oe.CANCELLED:case oe.UNKNOWN:case oe.DEADLINE_EXCEEDED:case oe.RESOURCE_EXHAUSTED:case oe.INTERNAL:case oe.UNAVAILABLE:case oe.UNAUTHENTICATED:return!1;case oe.INVALID_ARGUMENT:case oe.NOT_FOUND:case oe.ALREADY_EXISTS:case oe.PERMISSION_DENIED:case oe.FAILED_PRECONDITION:case oe.ABORTED:case oe.OUT_OF_RANGE:case oe.UNIMPLEMENTED:case oe.DATA_LOSS:return!0}}(a=o.code)&&a!==oe.ABORTED){const s=r.D_.shift();pd(r).Zo(),yield GH(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,o)),yield xm(r)}var a}),function i(r,o){return e.apply(this,arguments)})(n,t)),WH(n)&&qH(n)}),xA.apply(this,arguments)}function QH(n,t){return wA.apply(this,arguments)}function wA(){return wA=xe(function*(n,t){const e=je(n);e.asyncQueue.verifyOperationInProgress(),Ee("RemoteStore","RemoteStore received new credentials");const i=md(e);e.v_.add(3),yield vm(e),i&&e.x_.set("Unknown"),yield e.remoteSyncer.handleCredentialChange(t),e.v_.delete(3),yield H_(e)}),wA.apply(this,arguments)}function kA(){return kA=xe(function*(n,t){const e=je(n);t?(e.v_.delete(2),yield H_(e)):t||(e.v_.add(2),yield vm(e),e.x_.set("Unknown"))}),kA.apply(this,arguments)}function wm(n){return n.N_||(n.N_=function(e,i,r){const o=je(e);return o.R_(),new CCe(i,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(n.datastore,n.asyncQueue,{Po:ACe.bind(null,n),To:ICe.bind(null,n),u_:MCe.bind(null,n)}),n.F_.push(function(){var t=xe(function*(e){e?(n.N_.Zo(),hA(n)?uA(n):n.x_.set("Unknown")):(yield n.N_.stop(),$H(n))});return function(e){return t.apply(this,arguments)}}())),n.N_}function pd(n){return n.L_||(n.L_=function(e,i,r){const o=je(e);return o.R_(),new kCe(i,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(n.datastore,n.asyncQueue,{Po:PCe.bind(null,n),To:LCe.bind(null,n),E_:OCe.bind(null,n),T_:NCe.bind(null,n)}),n.F_.push(function(){var t=xe(function*(e){e?(n.L_.Zo(),yield xm(n)):(yield n.L_.stop(),n.D_.length>0&&(Ee("RemoteStore",`Stopping write stream with ${n.D_.length} pending writes`),n.D_=[]))});return function(e){return t.apply(this,arguments)}}())),n.L_}class EA{constructor(t,e,i,r,o){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=i,this.op=r,this.removalCallback=o,this.deferred=new _r,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(t,e,i,r,o){const s=Date.now()+i,a=new EA(t,e,s,r,o);return a.start(i),a}start(t){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Te(oe.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(t=>this.deferred.resolve(t))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Cm(n,t){if(zi("AsyncQueue",`${t}: ${n}`),id(n))return new Te(oe.UNAVAILABLE,`${t}: ${n}`);throw n}class km{constructor(t){this.comparator=t?(e,i)=>t(e,i)||Ge.comparator(e.key,i.key):(e,i)=>Ge.comparator(e.key,i.key),this.keyedMap=k_(),this.sortedSet=new ci(this.comparator)}static emptySet(t){return new km(t.comparator)}has(t){return null!=this.keyedMap.get(t)}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal((e,i)=>(t(e),!1))}add(t){const e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))}delete(t){const e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this}isEqual(t){if(!(t instanceof km)||this.size!==t.size)return!1;const e=this.sortedSet.getIterator(),i=t.sortedSet.getIterator();for(;e.hasNext();){const r=e.getNext().key,o=i.getNext().key;if(!r.isEqual(o))return!1}return!0}toString(){const t=[];return this.forEach(e=>{t.push(e.toString())}),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"}copy(t,e){const i=new km;return i.comparator=this.comparator,i.keyedMap=t,i.sortedSet=e,i}}class KH{constructor(){this.B_=new ci(Ge.comparator)}track(t){const e=t.doc.key,i=this.B_.get(e);i?0!==t.type&&3===i.type?this.B_=this.B_.insert(e,t):3===t.type&&1!==i.type?this.B_=this.B_.insert(e,{type:i.type,doc:t.doc}):2===t.type&&2===i.type?this.B_=this.B_.insert(e,{type:2,doc:t.doc}):2===t.type&&0===i.type?this.B_=this.B_.insert(e,{type:0,doc:t.doc}):1===t.type&&0===i.type?this.B_=this.B_.remove(e):1===t.type&&2===i.type?this.B_=this.B_.insert(e,{type:1,doc:i.doc}):0===t.type&&1===i.type?this.B_=this.B_.insert(e,{type:2,doc:t.doc}):at():this.B_=this.B_.insert(e,t)}k_(){const t=[];return this.B_.inorderTraversal((e,i)=>{t.push(i)}),t}}class Em{constructor(t,e,i,r,o,s,a,c,l){this.query=t,this.docs=e,this.oldDocs=i,this.docChanges=r,this.mutatedKeys=o,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=c,this.hasCachedResults=l}static fromInitialDocuments(t,e,i,r,o){const s=[];return e.forEach(a=>{s.push({type:0,doc:a})}),new Em(t,e,km.emptySet(e),s,i,r,!0,!1,o)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&w_(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const e=this.docChanges,i=t.docChanges;if(e.length!==i.length)return!1;for(let r=0;rt.U_())}}class VCe{constructor(){this.queries=new Zc(t=>fU(t),w_),this.onlineState="Unknown",this.W_=new Set}}function SA(){return SA=xe(function*(n,t){const e=je(n);let i=3;const r=t.query;let o=e.queries.get(r);o?!o.K_()&&t.U_()&&(i=2):(o=new BCe,i=t.U_()?0:1);try{switch(i){case 0:o.q_=yield e.onListen(r,!0);break;case 1:o.q_=yield e.onListen(r,!1);break;case 2:yield e.onFirstRemoteStoreListen(r)}}catch(s){const a=Cm(s,`Initialization of query '${sm(t.query)}' failed`);return void t.onError(a)}e.queries.set(r,o),o.Q_.push(t),t.G_(e.onlineState),o.q_&&t.z_(o.q_)&&IA(e)}),SA.apply(this,arguments)}function AA(){return AA=xe(function*(n,t){const e=je(n),i=t.query;let r=3;const o=e.queries.get(i);if(o){const s=o.Q_.indexOf(t);s>=0&&(o.Q_.splice(s,1),0===o.Q_.length?r=t.U_()?0:1:!o.K_()&&t.U_()&&(r=2))}switch(r){case 0:return e.queries.delete(i),e.onUnlisten(i,!0);case 1:return e.queries.delete(i),e.onUnlisten(i,!1);case 2:return e.onLastRemoteStoreUnlisten(i);default:return}}),AA.apply(this,arguments)}function UCe(n,t){const e=je(n);let i=!1;for(const r of t){const s=e.queries.get(r.query);if(s){for(const a of s.Q_)a.z_(r)&&(i=!0);s.q_=r}}i&&IA(e)}function HCe(n,t,e){const i=je(n),r=i.queries.get(t);if(r)for(const o of r.Q_)o.onError(e);i.queries.delete(t)}function IA(n){n.W_.forEach(t=>{t.next()})}var MA,XH;(XH=MA||(MA={})).j_="default",XH.Cache="cache";class RA{constructor(t,e,i){this.query=t,this.H_=e,this.J_=!1,this.Y_=null,this.onlineState="Unknown",this.options=i||{}}z_(t){if(!this.options.includeMetadataChanges){const i=[];for(const r of t.docChanges)3!==r.type&&i.push(r);t=new Em(t.query,t.docs,t.oldDocs,i,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let e=!1;return this.J_?this.Z_(t)&&(this.H_.next(t),e=!0):this.X_(t,this.onlineState)&&(this.ea(t),e=!0),this.Y_=t,e}onError(t){this.H_.error(t)}G_(t){this.onlineState=t;let e=!1;return this.Y_&&!this.J_&&this.X_(this.Y_,t)&&(this.ea(this.Y_),e=!0),e}X_(t,e){return!t.fromCache||!this.U_()||(!this.options.ta||!("Offline"!==e))&&(!t.docs.isEmpty()||t.hasCachedResults||"Offline"===e)}Z_(t){return t.docChanges.length>0||!!(t.syncStateChanged||this.Y_&&this.Y_.hasPendingWrites!==t.hasPendingWrites)&&!0===this.options.includeMetadataChanges}ea(t){t=Em.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.J_=!0,this.H_.next(t)}U_(){return this.options.source!==MA.Cache}}class JH{constructor(t){this.key=t}}class ez{constructor(t){this.key=t}}class tz{constructor(t,e){this.query=t,this.ua=e,this.ca=null,this.hasCachedResults=!1,this.current=!1,this.la=Kt(),this.mutatedKeys=Kt(),this.ha=pU(t),this.Pa=new km(this.ha)}get Ia(){return this.ua}Ta(t,e){const i=e?e.Ea:new KH,r=e?e.Pa:this.Pa;let o=e?e.mutatedKeys:this.mutatedKeys,s=r,a=!1;const c="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(t.inorderTraversal((d,u)=>{const h=r.get(d),f=C_(this.query,u)?u:null,m=!!h&&this.mutatedKeys.has(h.key),g=!!f&&(f.hasLocalMutations||this.mutatedKeys.has(f.key)&&f.hasCommittedMutations);let p=!1;h&&f?h.data.isEqual(f.data)?m!==g&&(i.track({type:3,doc:f}),p=!0):this.da(h,f)||(i.track({type:2,doc:f}),p=!0,(c&&this.ha(f,c)>0||l&&this.ha(f,l)<0)&&(a=!0)):!h&&f?(i.track({type:0,doc:f}),p=!0):h&&!f&&(i.track({type:1,doc:h}),p=!0,(c||l)&&(a=!0)),p&&(f?(s=s.add(f),o=g?o.add(d):o.delete(d)):(s=s.delete(d),o=o.delete(d)))}),null!==this.query.limit)for(;s.size>this.query.limit;){const d="F"===this.query.limitType?s.last():s.first();s=s.delete(d.key),o=o.delete(d.key),i.track({type:1,doc:d})}return{Pa:s,Ea:i,Xi:a,mutatedKeys:o}}da(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(t,e,i,r){const o=this.Pa;this.Pa=t.Pa,this.mutatedKeys=t.mutatedKeys;const s=t.Ea.k_();s.sort((d,u)=>function(f,m){const g=p=>{switch(p){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return at()}};return g(f)-g(m)}(d.type,u.type)||this.ha(d.doc,u.doc)),this.Aa(i),r=null!=r&&r;const a=e&&!r?this.Ra():[],c=0===this.la.size&&this.current&&!r?1:0,l=c!==this.ca;return this.ca=c,0!==s.length||l?{snapshot:new Em(this.query,t.Pa,o,s,t.mutatedKeys,0===c,l,!1,!!i&&i.resumeToken.approximateByteSize()>0),Va:a}:{Va:a}}G_(t){return this.current&&"Offline"===t?(this.current=!1,this.applyChanges({Pa:this.Pa,Ea:new KH,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{Va:[]}}ma(t){return!this.ua.has(t)&&!!this.Pa.has(t)&&!this.Pa.get(t).hasLocalMutations}Aa(t){t&&(t.addedDocuments.forEach(e=>this.ua=this.ua.add(e)),t.modifiedDocuments.forEach(e=>{}),t.removedDocuments.forEach(e=>this.ua=this.ua.delete(e)),this.current=t.current)}Ra(){if(!this.current)return[];const t=this.la;this.la=Kt(),this.Pa.forEach(i=>{this.ma(i.key)&&(this.la=this.la.add(i.key))});const e=[];return t.forEach(i=>{this.la.has(i)||e.push(new ez(i))}),this.la.forEach(i=>{t.has(i)||e.push(new JH(i))}),e}fa(t){this.ua=t.hs,this.la=Kt();const e=this.Ta(t.documents);return this.applyChanges(e,!0)}ga(){return Em.fromInitialDocuments(this.query,this.Pa,this.mutatedKeys,0===this.ca,this.hasCachedResults)}}class $Ce{constructor(t,e,i){this.query=t,this.targetId=e,this.view=i}}class GCe{constructor(t){this.key=t,this.pa=!1}}class WCe{constructor(t,e,i,r,o,s){this.localStore=t,this.remoteStore=e,this.eventManager=i,this.sharedClientState=r,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.ya={},this.wa=new Zc(a=>fU(a),w_),this.Sa=new Map,this.ba=new Set,this.Da=new ci(Ge.comparator),this.Ca=new Map,this.va=new G2,this.Fa={},this.Ma=new Map,this.xa=Bu.Ln(),this.onlineState="Unknown",this.Oa=void 0}get isPrimaryClient(){return!0===this.Oa}}function qCe(n,t){return FA.apply(this,arguments)}function FA(){return FA=xe(function*(n,t,e=!0){const i=_1(n);let r;const o=i.wa.get(t);return o?(i.sharedClientState.addLocalQueryTarget(o.targetId),r=o.view.ga()):r=yield nz(i,t,e,!0),r}),FA.apply(this,arguments)}function QCe(n,t){return PA.apply(this,arguments)}function PA(){return PA=xe(function*(n,t){const e=_1(n);yield nz(e,t,!0,!1)}),PA.apply(this,arguments)}function nz(n,t,e,i){return OA.apply(this,arguments)}function OA(){return OA=xe(function*(n,t,e,i){const r=yield function _m(n,t){const e=je(n);return e.persistence.runTransaction("Allocate target","readwrite",i=>{let r;return e.Qr.getTargetData(i,t).next(o=>o?(r=o,K.resolve(r)):e.Qr.allocateTargetId(i).next(s=>(r=new el(t,s,"TargetPurposeListen",i.currentSequenceNumber),e.Qr.addTargetData(i,r).next(()=>r))))}).then(i=>{const r=e.ns.get(i.targetId);return(null===r||i.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(e.ns=e.ns.insert(i.targetId,i),e.rs.set(t,i.targetId)),i})}(n.localStore,No(t)),o=r.targetId,s=e?n.sharedClientState.addLocalQueryTarget(o):"not-current";let a;return i&&(a=yield function NA(n,t,e,i,r){return LA.apply(this,arguments)}(n,t,o,"current"===s,r.resumeToken)),n.isPrimaryClient&&e&&p1(n.remoteStore,r),a}),OA.apply(this,arguments)}function LA(){return LA=xe(function*(n,t,e,i,r){n.Na=(u,h,f)=>{return(m=xe(function*(p,b,C,x){let D=b.view.Ta(C);D.Xi&&(D=yield d1(p.localStore,b.query,!1).then(({documents:U})=>b.view.Ta(U,D)));const j=x&&x.targetChanges.get(b.targetId),P=x&&null!=x.targetMismatches.get(b.targetId),S=b.view.applyChanges(D,p.isPrimaryClient,j,P);return QA(p,b.targetId,S.Va),S.snapshot}),function g(p,b,C,x){return m.apply(this,arguments)})(n,u,h,f);var m};const o=yield d1(n.localStore,t,!0),s=new tz(t,o.hs),a=s.Ta(o.documents),c=I_.createSynthesizedTargetChangeForCurrentChange(e,i&&"Offline"!==n.onlineState,r),l=s.applyChanges(a,n.isPrimaryClient,c);QA(n,e,l.Va);const d=new $Ce(t,e,s);return n.wa.set(t,d),n.Sa.has(e)?n.Sa.get(e).push(t):n.Sa.set(e,[t]),l.snapshot}),LA.apply(this,arguments)}function KCe(n,t,e){return BA.apply(this,arguments)}function BA(){return BA=xe(function*(n,t,e){const i=je(n),r=i.wa.get(t),o=i.Sa.get(r.targetId);if(o.length>1)return i.Sa.set(r.targetId,o.filter(s=>!w_(s,t))),void i.wa.delete(t);i.isPrimaryClient?(i.sharedClientState.removeLocalQueryTarget(r.targetId),i.sharedClientState.isActiveQueryTarget(r.targetId)||(yield bm(i.localStore,r.targetId,!1).then(()=>{i.sharedClientState.clearQueryState(r.targetId),e&&ym(i.remoteStore,r.targetId),Tm(i,r.targetId)}).catch(nd))):(Tm(i,r.targetId),yield bm(i.localStore,r.targetId,!0))}),BA.apply(this,arguments)}function XCe(n,t){return VA.apply(this,arguments)}function VA(){return VA=xe(function*(n,t){const e=je(n),i=e.wa.get(t),r=e.Sa.get(i.targetId);e.isPrimaryClient&&1===r.length&&(e.sharedClientState.removeLocalQueryTarget(i.targetId),ym(e.remoteStore,i.targetId))}),VA.apply(this,arguments)}function UA(){return UA=xe(function*(n,t,e){const i=function oI(n){const t=je(n);return t.remoteStore.remoteSyncer.applySuccessfulWrite=JCe.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=eke.bind(null,t),t}(n);try{const r=yield function(s,a){const c=je(s),l=_i.now(),d=a.reduce((f,m)=>f.add(m.key),Kt());let u,h;return c.persistence.runTransaction("Locally write mutations","readwrite",f=>{let m=Xo(),g=Kt();return c.os.getEntries(f,d).next(p=>{m=p,m.forEach((b,C)=>{C.isValidDocument()||(g=g.add(b))})}).next(()=>c.localDocuments.getOverlayedDocuments(f,m)).next(p=>{u=p;const b=[];for(const C of a){const x=Cwe(C,u.get(C.key).overlayedDocument);null!=x&&b.push(new Jc(C.key,x,Z9(x.value.mapValue),vi.exists(!0)))}return c.mutationQueue.addMutationBatch(f,l,b,a)}).next(p=>{h=p;const b=p.applyToLocalDocumentSet(u,g);return c.documentOverlayCache.saveOverlays(f,p.batchId,b)})}).then(()=>({batchId:h.batchId,changes:_U(u)}))}(i.localStore,t);i.sharedClientState.addPendingMutation(r.batchId),function(s,a,c){let l=s.Fa[s.currentUser.toKey()];l||(l=new ci(Ot)),l=l.insert(a,c),s.Fa[s.currentUser.toKey()]=l}(i,r.batchId,e),yield tl(i,r.changes),yield xm(i.remoteStore)}catch(r){const o=Cm(r,"Failed to persist write");e.reject(o)}}),UA.apply(this,arguments)}function iz(n,t){return HA.apply(this,arguments)}function HA(){return HA=xe(function*(n,t){const e=je(n);try{const i=yield function pCe(n,t){const e=je(n),i=t.snapshotVersion;let r=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const s=e.os.newChangeBuffer({trackRemovals:!0});r=e.ns;const a=[];t.targetChanges.forEach((d,u)=>{const h=r.get(u);if(!h)return;a.push(e.Qr.removeMatchingKeys(o,d.removedDocuments,u).next(()=>e.Qr.addMatchingKeys(o,d.addedDocuments,u)));let f=h.withSequenceNumber(o.currentSequenceNumber);var g,p,b;null!==t.targetMismatches.get(u)?f=f.withResumeToken(br.EMPTY_BYTE_STRING,_t.min()).withLastLimboFreeSnapshotVersion(_t.min()):d.resumeToken.approximateByteSize()>0&&(f=f.withResumeToken(d.resumeToken,i)),r=r.insert(u,f),p=f,b=d,(0===(g=h).resumeToken.approximateByteSize()||p.snapshotVersion.toMicroseconds()-g.snapshotVersion.toMicroseconds()>=3e8||b.addedDocuments.size+b.modifiedDocuments.size+b.removedDocuments.size>0)&&a.push(e.Qr.updateTargetData(o,f))});let c=Xo(),l=Kt();if(t.documentUpdates.forEach(d=>{t.resolvedLimboDocuments.has(d)&&a.push(e.persistence.referenceDelegate.updateLimboDocument(o,d))}),a.push(function FH(n,t,e){let i=Kt(),r=Kt();return e.forEach(o=>i=i.add(o)),t.getEntries(n,i).next(o=>{let s=Xo();return e.forEach((a,c)=>{const l=o.get(a);c.isFoundDocument()!==l.isFoundDocument()&&(r=r.add(a)),c.isNoDocument()&&c.version.isEqual(_t.min())?(t.removeEntry(a,c.readTime),s=s.insert(a,c)):!l.isValidDocument()||c.version.compareTo(l.version)>0||0===c.version.compareTo(l.version)&&l.hasPendingWrites?(t.addEntry(c),s=s.insert(a,c)):Ee("LocalStore","Ignoring outdated watch update for ",a,". Current version:",l.version," Watch version:",c.version)}),{cs:s,ls:r}})}(o,s,t.documentUpdates).next(d=>{c=d.cs,l=d.ls})),!i.isEqual(_t.min())){const d=e.Qr.getLastRemoteSnapshotVersion(o).next(u=>e.Qr.setTargetsMetadata(o,o.currentSequenceNumber,i));a.push(d)}return K.waitFor(a).next(()=>s.apply(o)).next(()=>e.localDocuments.getLocalViewOfDocuments(o,c,l)).next(()=>c)}).then(o=>(e.ns=r,o))}(e.localStore,t);t.targetChanges.forEach((r,o)=>{const s=e.Ca.get(o);s&&(ft(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?s.pa=!0:r.modifiedDocuments.size>0?ft(s.pa):r.removedDocuments.size>0&&(ft(s.pa),s.pa=!1))}),yield tl(e,i,t)}catch(i){yield nd(i)}}),HA.apply(this,arguments)}function rz(n,t,e){const i=je(n);if(i.isPrimaryClient&&0===e||!i.isPrimaryClient&&1===e){const r=[];i.wa.forEach((o,s)=>{const a=s.view.G_(t);a.snapshot&&r.push(a.snapshot)}),function(s,a){const c=je(s);c.onlineState=a;let l=!1;c.queries.forEach((d,u)=>{for(const h of u.Q_)h.G_(a)&&(l=!0)}),l&&IA(c)}(i.eventManager,t),r.length&&i.ya.u_(r),i.onlineState=t,i.isPrimaryClient&&i.sharedClientState.setOnlineState(t)}}function ZCe(n,t,e){return zA.apply(this,arguments)}function zA(){return zA=xe(function*(n,t,e){const i=je(n);i.sharedClientState.updateQueryState(t,"rejected",e);const r=i.Ca.get(t),o=r&&r.key;if(o){let s=new ci(Ge.comparator);s=s.insert(o,pi.newNoDocument(o,_t.min()));const a=Kt().add(o),c=new A_(_t.min(),new Map,new ci(Ot),s,a);yield iz(i,c),i.Da=i.Da.remove(o),i.Ca.delete(t),KA(i)}else yield bm(i.localStore,t,!1).then(()=>Tm(i,t,e)).catch(nd)}),zA.apply(this,arguments)}function JCe(n,t){return jA.apply(this,arguments)}function jA(){return jA=xe(function*(n,t){const e=je(n),i=t.batch.batchId;try{const r=yield function mCe(n,t){const e=je(n);return e.persistence.runTransaction("Acknowledge batch","readwrite-primary",i=>{const r=t.batch.keys(),o=e.os.newChangeBuffer({trackRemovals:!0});return function(a,c,l,d){const u=l.batch,h=u.keys();let f=K.resolve();return h.forEach(m=>{f=f.next(()=>d.getEntry(c,m)).next(g=>{const p=l.docVersions.get(m);ft(null!==p),g.version.compareTo(p)<0&&(u.applyToRemoteDocument(g,l),g.isValidDocument()&&(g.setReadTime(l.commitVersion),d.addEntry(g)))})}),f.next(()=>a.mutationQueue.removeMutationBatch(c,u))}(e,i,t,o).next(()=>o.apply(i)).next(()=>e.mutationQueue.performConsistencyCheck(i)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(i,r,t.batch.batchId)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(i,function(a){let c=Kt();for(let l=0;l0&&(c=c.add(a.batch.mutations[l].key));return c}(t))).next(()=>e.localDocuments.getDocuments(i,r))})}(e.localStore,t);qA(e,i,null),WA(e,i),e.sharedClientState.updateMutationState(i,"acknowledged"),yield tl(e,r)}catch(r){yield nd(r)}}),jA.apply(this,arguments)}function eke(n,t,e){return $A.apply(this,arguments)}function $A(){return $A=xe(function*(n,t,e){const i=je(n);try{const r=yield function(s,a){const c=je(s);return c.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let d;return c.mutationQueue.lookupMutationBatch(l,a).next(u=>(ft(null!==u),d=u.keys(),c.mutationQueue.removeMutationBatch(l,u))).next(()=>c.mutationQueue.performConsistencyCheck(l)).next(()=>c.documentOverlayCache.removeOverlaysForBatchId(l,d,a)).next(()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,d)).next(()=>c.localDocuments.getDocuments(l,d))})}(i.localStore,t);qA(i,t,e),WA(i,t),i.sharedClientState.updateMutationState(t,"rejected",e),yield tl(i,r)}catch(r){yield nd(r)}}),$A.apply(this,arguments)}function WA(n,t){(n.Ma.get(t)||[]).forEach(e=>{e.resolve()}),n.Ma.delete(t)}function qA(n,t,e){const i=je(n);let r=i.Fa[i.currentUser.toKey()];if(r){const o=r.get(t);o&&(e?o.reject(e):o.resolve(),r=r.remove(t)),i.Fa[i.currentUser.toKey()]=r}}function Tm(n,t,e=null){n.sharedClientState.removeLocalQueryTarget(t);for(const i of n.Sa.get(t))n.wa.delete(i),e&&n.ya.La(i,e);n.Sa.delete(t),n.isPrimaryClient&&n.va.Vr(t).forEach(i=>{n.va.containsKey(i)||oz(n,i)})}function oz(n,t){n.ba.delete(t.path.canonicalString());const e=n.Da.get(t);null!==e&&(ym(n.remoteStore,e),n.Da=n.Da.remove(t),n.Ca.delete(e),KA(n))}function QA(n,t,e){for(const i of e)i instanceof JH?(n.va.addReference(i.key,t),nke(n,i)):i instanceof ez?(Ee("SyncEngine","Document no longer in limbo: "+i.key),n.va.removeReference(i.key,t),n.va.containsKey(i.key)||oz(n,i.key)):at()}function nke(n,t){const e=t.key,i=e.path.canonicalString();n.Da.get(e)||n.ba.has(i)||(Ee("SyncEngine","New document in limbo: "+e),n.ba.add(i),KA(n))}function KA(n){for(;n.ba.size>0&&n.Da.size{s.push(i.Na(c,t,e).then(l=>{if((l||e)&&i.isPrimaryClient&&i.sharedClientState.updateQueryState(c.targetId,l?.fromCache?"not-current":"current"),l){r.push(l);const d=X2.Ki(c.targetId,l);o.push(d)}}))}),yield Promise.all(s),i.ya.u_(r),yield(a=xe(function*(l,d){const u=je(l);try{yield u.persistence.runTransaction("notifyLocalViewChanges","readwrite",h=>K.forEach(d,f=>K.forEach(f.qi,m=>u.persistence.referenceDelegate.addReference(h,f.targetId,m)).next(()=>K.forEach(f.Qi,m=>u.persistence.referenceDelegate.removeReference(h,f.targetId,m)))))}catch(h){if(!id(h))throw h;Ee("LocalStore","Failed to update sequence numbers: "+h)}for(const h of d){const f=h.targetId;if(!h.fromCache){const m=u.ns.get(f),p=m.withLastLimboFreeSnapshotVersion(m.snapshotVersion);u.ns=u.ns.insert(f,p)}}}),function c(l,d){return a.apply(this,arguments)})(i.localStore,o))}),XA.apply(this,arguments)}function ike(n,t){return YA.apply(this,arguments)}function YA(){return YA=xe(function*(n,t){const e=je(n);if(!e.currentUser.isEqual(t)){Ee("SyncEngine","User change. New user:",t.toKey());const i=yield MH(e.localStore,t);e.currentUser=t,(o=e).Ma.forEach(a=>{a.forEach(c=>{c.reject(new Te(oe.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),o.Ma.clear(),e.sharedClientState.handleUserChange(t,i.removedBatchIds,i.addedBatchIds),yield tl(e,i.us)}var o}),YA.apply(this,arguments)}function rke(n,t){const e=je(n),i=e.Ca.get(t);if(i&&i.pa)return Kt().add(i.key);{let r=Kt();const o=e.Sa.get(t);if(!o)return r;for(const s of o){const a=e.wa.get(s);r=r.unionWith(a.view.Ia)}return r}}function _1(n){const t=je(n);return t.remoteStore.remoteSyncer.applyRemoteEvent=iz.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=rke.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=ZCe.bind(null,t),t.ya.u_=UCe.bind(null,t.eventManager),t.ya.La=HCe.bind(null,t.eventManager),t}class b1{constructor(){this.synchronizeTabs=!1}initialize(t){var e=this;return xe(function*(){e.serializer=U_(t.databaseInfo.databaseId),e.sharedClientState=e.createSharedClientState(t),e.persistence=e.createPersistence(t),yield e.persistence.start(),e.localStore=e.createLocalStore(t),e.gcScheduler=e.createGarbageCollectionScheduler(t,e.localStore),e.indexBackfillerScheduler=e.createIndexBackfillerScheduler(t,e.localStore)})()}createGarbageCollectionScheduler(t,e){return null}createIndexBackfillerScheduler(t,e){return null}createLocalStore(t){return function IH(n,t,e,i){return new fCe(n,t,e,i)}(this.persistence,new AH,t.initialUser,this.serializer)}createPersistence(t){return new W2(a1.Hr,this.serializer)}createSharedClientState(t){return new VH}terminate(){var t=this;return xe(function*(){var e,i;null===(e=t.gcScheduler)||void 0===e||e.stop(),null===(i=t.indexBackfillerScheduler)||void 0===i||i.stop(),t.sharedClientState.shutdown(),yield t.persistence.shutdown()})()}}class Sm{initialize(t,e){var i=this;return xe(function*(){i.localStore||(i.localStore=t.localStore,i.sharedClientState=t.sharedClientState,i.datastore=i.createDatastore(e),i.remoteStore=i.createRemoteStore(e),i.eventManager=i.createEventManager(e),i.syncEngine=i.createSyncEngine(e,!t.synchronizeTabs),i.sharedClientState.onlineStateHandler=r=>rz(i.syncEngine,r,1),i.remoteStore.remoteSyncer.handleCredentialChange=ike.bind(null,i.syncEngine),yield function CA(n,t){return kA.apply(this,arguments)}(i.remoteStore,i.syncEngine.isPrimaryClient))})()}createEventManager(t){return new VCe}createDatastore(t){const e=U_(t.databaseInfo.databaseId),i=new wCe(t.databaseInfo);return new ECe(t.authCredentials,t.appCheckCredentials,i,e)}createRemoteStore(t){return i=this.localStore,r=this.datastore,o=t.asyncQueue,s=e=>rz(this.syncEngine,e,0),a=UH.D()?new UH:new vCe,new DCe(i,r,o,s,a);var i,r,o,s,a}createSyncEngine(t,e){return function(r,o,s,a,c,l,d){const u=new WCe(r,o,s,a,c,l);return d&&(u.Oa=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,e)}terminate(){var t=this;return xe(function*(){var e,i;yield(i=xe(function*(o){const s=je(o);Ee("RemoteStore","RemoteStore shutting down."),s.v_.add(5),yield vm(s),s.M_.shutdown(),s.x_.set("Unknown")}),function r(o){return i.apply(this,arguments)})(t.remoteStore),null===(e=t.datastore)||void 0===e||e.terminate()})()}}class v1{constructor(t){this.observer=t,this.muted=!1}next(t){this.observer.next&&this.qa(this.observer.next,t)}error(t){this.observer.error?this.qa(this.observer.error,t):zi("Uncaught Error in snapshot listener:",t.toString())}Qa(){this.muted=!0}qa(t,e){this.muted||setTimeout(()=>{this.muted||t(e)},0)}}class _ke{constructor(t,e,i,r){var o=this;this.authCredentials=t,this.appCheckCredentials=e,this.asyncQueue=i,this.databaseInfo=r,this.user=Ir.UNAUTHENTICATED,this.clientId=A9.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(i,function(){var s=xe(function*(a){Ee("FirestoreClient","Received user=",a.uid),yield o.authCredentialListener(a),o.user=a});return function(a){return s.apply(this,arguments)}}()),this.appCheckCredentials.start(i,s=>(Ee("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Te(oe.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var t=this;this.asyncQueue.enterRestrictedMode();const e=new _r;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(xe(function*(){try{t._onlineComponents&&(yield t._onlineComponents.terminate()),t._offlineComponents&&(yield t._offlineComponents.terminate()),t.authCredentials.shutdown(),t.appCheckCredentials.shutdown(),e.resolve()}catch(i){const r=Cm(i,"Failed to shutdown persistence");e.reject(r)}})),e.promise}}function y1(n,t){return sI.apply(this,arguments)}function sI(){return sI=xe(function*(n,t){n.asyncQueue.verifyOperationInProgress(),Ee("FirestoreClient","Initializing OfflineComponentProvider");const e=n.configuration;yield t.initialize(e);let i=e.initialUser;n.setCredentialChangeListener(function(){var r=xe(function*(o){i.isEqual(o)||(yield MH(t.localStore,o),i=o)});return function(o){return r.apply(this,arguments)}}()),t.persistence.setDatabaseDeletedListener(()=>n.terminate()),n._offlineComponents=t}),sI.apply(this,arguments)}function aI(n,t){return cI.apply(this,arguments)}function cI(){return cI=xe(function*(n,t){n.asyncQueue.verifyOperationInProgress();const e=yield function lI(n){return dI.apply(this,arguments)}(n);Ee("FirestoreClient","Initializing OnlineComponentProvider"),yield t.initialize(e,n.configuration),n.setCredentialChangeListener(i=>QH(t.remoteStore,i)),n.setAppCheckTokenChangeListener((i,r)=>QH(t.remoteStore,r)),n._onlineComponents=t}),cI.apply(this,arguments)}function dI(){return dI=xe(function*(n){if(!n._offlineComponents)if(n._uninitializedComponentsProvider){Ee("FirestoreClient","Using user provided OfflineComponentProvider");try{yield y1(n,n._uninitializedComponentsProvider._offline)}catch(t){const e=t;if(!function uz(n){return"FirebaseError"===n.name?n.code===oe.FAILED_PRECONDITION||n.code===oe.UNIMPLEMENTED:!(typeof DOMException<"u"&&n instanceof DOMException)||22===n.code||20===n.code||11===n.code}(e))throw e;bs("Error using user provided cache. Falling back to memory cache: "+e),yield y1(n,new b1)}}else Ee("FirestoreClient","Using default OfflineComponentProvider"),yield y1(n,new b1);return n._offlineComponents}),dI.apply(this,arguments)}function x1(n){return uI.apply(this,arguments)}function uI(){return uI=xe(function*(n){return n._onlineComponents||(n._uninitializedComponentsProvider?(Ee("FirestoreClient","Using user provided OnlineComponentProvider"),yield aI(n,n._uninitializedComponentsProvider._online)):(Ee("FirestoreClient","Using default OnlineComponentProvider"),yield aI(n,new Sm))),n._onlineComponents}),uI.apply(this,arguments)}function fI(){return fI=xe(function*(n){const t=yield x1(n),e=t.eventManager;return e.onListen=qCe.bind(null,t.syncEngine),e.onUnlisten=KCe.bind(null,t.syncEngine),e.onFirstRemoteStoreListen=QCe.bind(null,t.syncEngine),e.onLastRemoteStoreUnlisten=XCe.bind(null,t.syncEngine),e}),fI.apply(this,arguments)}function gz(n,t,e={}){const i=new _r;return n.asyncQueue.enqueueAndForget(xe(function*(){return function(o,s,a,c,l){const d=new v1({next:h=>{s.enqueueAndForget(()=>function DA(n,t){return AA.apply(this,arguments)}(o,u)),h.fromCache&&"server"===c.source?l.reject(new Te(oe.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(h)},error:h=>l.reject(h)}),u=new RA(a,d,{includeMetadataChanges:!0,ta:!0});return function TA(n,t){return SA.apply(this,arguments)}(o,u)}(yield function Am(n){return fI.apply(this,arguments)}(n),n.asyncQueue,t,e,i)})),i.promise}function _z(n){const t={};return void 0!==n.timeoutSeconds&&(t.timeoutSeconds=n.timeoutSeconds),t}const bz=new Map;function mI(n,t,e){if(!e)throw new Te(oe.INVALID_ARGUMENT,`Function ${n}() cannot be called with an empty ${t}.`)}function vz(n){if(!Ge.isDocumentKey(n))throw new Te(oe.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${n} has ${n.length}.`)}function yz(n){if(Ge.isDocumentKey(n))throw new Te(oe.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${n} has ${n.length}.`)}function w1(n){if(void 0===n)return"undefined";if(null===n)return"null";if("string"==typeof n)return n.length>20&&(n=`${n.substring(0,20)}...`),JSON.stringify(n);if("number"==typeof n||"boolean"==typeof n)return""+n;if("object"==typeof n){if(n instanceof Array)return"an array";{const t=(i=n).constructor?i.constructor.name:null;return t?`a custom ${t} object`:"an object"}}var i;return"function"==typeof n?"a function":at()}function bn(n,t){if("_delegate"in n&&(n=n._delegate),!(n instanceof t)){if(t.name===n.constructor.name)throw new Te(oe.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const e=w1(n);throw new Te(oe.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${e}`)}}return n}class wz{constructor(t){var e,i;if(void 0===t.host){if(void 0!==t.ssl)throw new Te(oe.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Te(oe.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}(function Dke(n,t,e,i){if(!0===t&&!0===i)throw new Te(oe.INVALID_ARGUMENT,`${n} and ${e} cannot be used together.`)})("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==t.experimentalAutoDetectLongPolling&&!t.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=_z(null!==(i=t.experimentalLongPollingOptions)&&void 0!==i?i:{}),function(o){if(void 0!==o.timeoutSeconds){if(isNaN(o.timeoutSeconds))throw new Te(oe.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (must not be NaN)`);if(o.timeoutSeconds<5)throw new Te(oe.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (minimum allowed value is 5)`);if(o.timeoutSeconds>30)throw new Te(oe.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===t.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}}class z_{constructor(t,e,i,r){this._authCredentials=t,this._appCheckCredentials=e,this._databaseId=i,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new wz({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Te(oe.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(t){if(this._settingsFrozen)throw new Te(oe.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new wz(t),void 0!==t.credentials&&(this._authCredentials=function(i){if(!i)return new w1e;switch(i.type){case"firstParty":return new T1e(i.sessionIndex||"0",i.iamToken||null,i.authTokenFactory||null);case"provider":return i.client;default:throw new Te(oe.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const i=bz.get(e);i&&(Ee("ComponentProvider","Removing Datastore"),bz.delete(e),i.terminate())}(this),Promise.resolve()}}class Wr{constructor(t,e,i){this.converter=e,this._query=i,this.type="query",this.firestore=t}withConverter(t){return new Wr(this.firestore,t,this._query)}}class $i{constructor(t,e,i){this.converter=e,this._key=i,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ec(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new $i(this.firestore,t,this._key)}}class ec extends Wr{constructor(t,e,i){super(t,e,rm(i)),this._path=i,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new $i(this.firestore,null,new Ge(t))}withConverter(t){return new ec(this.firestore,t,this._path)}}function Cz(n,t,...e){if(n=Hf(n),mI("collection","path",t),n instanceof z_){const i=gn.fromString(t,...e);return yz(i),new ec(n,null,i)}{if(!(n instanceof $i||n instanceof ec))throw new Te(oe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=n._path.child(gn.fromString(t,...e));return yz(i),new ec(n.firestore,null,i)}}class Mke{constructor(){this.nu=Promise.resolve(),this.ru=[],this.iu=!1,this.su=[],this.ou=null,this._u=!1,this.au=!1,this.uu=[],this.jo=new sA(this,"async_queue_retry"),this.cu=()=>{const e=m1();e&&Ee("AsyncQueue","Visibility state changed to "+e.visibilityState),this.jo.Ko()};const t=m1();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.cu)}get isShuttingDown(){return this.iu}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.lu(),this.hu(t)}enterRestrictedMode(t){if(!this.iu){this.iu=!0,this.au=t||!1;const e=m1();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.cu)}}enqueue(t){if(this.lu(),this.iu)return new Promise(()=>{});const e=new _r;return this.hu(()=>this.iu&&this.au?Promise.resolve():(t().then(e.resolve,e.reject),e.promise)).then(()=>e.promise)}enqueueRetryable(t){this.enqueueAndForget(()=>(this.ru.push(t),this.Pu()))}Pu(){var t=this;return xe(function*(){if(0!==t.ru.length){try{yield t.ru[0](),t.ru.shift(),t.jo.reset()}catch(e){if(!id(e))throw e;Ee("AsyncQueue","Operation failed with retryable error: "+e)}t.ru.length>0&&t.jo.qo(()=>t.Pu())}})()}hu(t){const e=this.nu.then(()=>(this._u=!0,t().catch(i=>{throw this.ou=i,this._u=!1,zi("INTERNAL UNHANDLED ERROR: ",function(s){let a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+"\n"+s.stack),a}(i)),i}).then(i=>(this._u=!1,i))));return this.nu=e,e}enqueueAfterDelay(t,e,i){this.lu(),this.uu.indexOf(t)>-1&&(e=0);const r=EA.createAndSchedule(this,t,e,i,o=>this.Iu(o));return this.su.push(r),r}lu(){this.ou&&at()}verifyOperationInProgress(){}Tu(){var t=this;return xe(function*(){let e;do{e=t.nu,yield e}while(e!==t.nu)})()}Eu(t){for(const e of this.su)if(e.timerId===t)return!0;return!1}du(t){return this.Tu().then(()=>{this.su.sort((e,i)=>e.targetTimeMs-i.targetTimeMs);for(const e of this.su)if(e.skipDelay(),"all"!==t&&e.timerId===t)break;return this.Tu()})}Au(t){this.uu.push(t)}Iu(t){const e=this.su.indexOf(t);this.su.splice(e,1)}}class li extends z_{constructor(t,e,i,r){super(t,e,i,r),this.type="firestore",this._queue=new Mke,this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||Ez(this),this._firestoreClient.terminate()}}function Fke(n,t){const e="object"==typeof n?n:function sxe(n=cx){const t=yu.get(n);if(!t&&n===cx&&z6())return i7();if(!t)throw qc.create("no-app",{appName:n});return t}(),i="string"==typeof n?n:t||"(default)",r=function n7(n,t){const e=n.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),n.container.getProvider(t)}(e,"firestore").getImmediate({identifier:i});if(!r._initialized){const o=Kve("firestore");o&&function Ake(n,t,e,i={}){var r;const o=(n=bn(n,z_))._getSettings(),s=`${t}:${e}`;if("firestore.googleapis.com"!==o.host&&o.host!==s&&bs("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),n._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),i.mockUserToken){let a,c;if("string"==typeof i.mockUserToken)a=i.mockUserToken,c=Ir.MOCK_USER;else{a=function Xve(n,t){if(n.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const i=t||"demo-project",r=n.iat||0,o=n.sub||n.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const s=Object.assign({iss:`https://securetoken.google.com/${i}`,aud:i,iat:r,exp:r+3600,auth_time:r,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},n);return[ox(JSON.stringify({alg:"none",type:"JWT"})),ox(JSON.stringify(s)),""].join(".")}(i.mockUserToken,null===(r=n._app)||void 0===r?void 0:r.options.projectId);const l=i.mockUserToken.sub||i.mockUserToken.user_id;if(!l)throw new Te(oe.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Ir(l)}n._authCredentials=new C1e(new S9(a,c))}}(r,...o)}return r}function Gi(n){return n._firestoreClient||Ez(n),n._firestoreClient.verifyNotTerminated(),n._firestoreClient}function Ez(n){var t,e,i;const r=n._freezeSettings(),o=(c=(null===(t=n._app)||void 0===t?void 0:t.options.appId)||"",new nwe(n._databaseId,c,n._persistenceKey,(d=r).host,d.ssl,d.experimentalForceLongPolling,d.experimentalAutoDetectLongPolling,_z(d.experimentalLongPollingOptions),d.useFetchStreams));var c,d;n._firestoreClient=new _ke(n._authCredentials,n._appCheckCredentials,n._queue,o),null!==(e=r.localCache)&&void 0!==e&&e._offlineComponentProvider&&null!==(i=r.localCache)&&void 0!==i&&i._onlineComponentProvider&&(n._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}class Uu{constructor(t){this._byteString=t}static fromBase64String(t){try{return new Uu(br.fromBase64String(t))}catch(e){throw new Te(oe.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(t){return new Uu(br.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}}class Im{constructor(...t){for(let e=0;e90)throw new Te(oe.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new Te(oe.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return Ot(this._lat,t._lat)||Ot(this._long,t._long)}}const Oke=/^__.*__$/;class Nke{constructor(t,e,i){this.data=t,this.fieldMask=e,this.fieldTransforms=i}toMutation(t,e){return null!==this.fieldMask?new Jc(t,this.data,this.fieldMask,e,this.fieldTransforms):new lm(t,this.data,e,this.fieldTransforms)}}function Iz(n){switch(n){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw at()}}class C1{constructor(t,e,i,r,o,s){this.settings=t,this.databaseId=e,this.serializer=i,this.ignoreUndefinedProperties=r,void 0===o&&this.Ru(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get Vu(){return this.settings.Vu}mu(t){return new C1(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}fu(t){var e;const i=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.mu({path:i,gu:!1});return r.pu(t),r}yu(t){var e;const i=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.mu({path:i,gu:!1});return r.Ru(),r}wu(t){return this.mu({path:void 0,gu:!0})}Su(t){return E1(t,this.settings.methodName,this.settings.bu||!1,this.path,this.settings.Du)}contains(t){return void 0!==this.fieldMask.find(e=>t.isPrefixOf(e))||void 0!==this.fieldTransforms.find(e=>t.isPrefixOf(e.field))}Ru(){if(this.path)for(let t=0;tc.covers(u.field))}else c=null,l=s.fieldTransforms;return new Nke(new Gr(a),c,l)}function Hu(n,t){if(Nz(n=Hf(n)))return wI("Unsupported field value:",t,n),Oz(n,t);if(n instanceof Dz)return function(i,r){if(!Iz(r.Vu))throw r.Su(`${i._methodName}() can only be used with update() and set()`);if(!r.path)throw r.Su(`${i._methodName}() is not currently supported inside arrays`);const o=i._toFieldTransform(r);o&&r.fieldTransforms.push(o)}(n,t),null;if(void 0===n&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),n instanceof Array){if(t.settings.gu&&4!==t.Vu)throw t.Su("Nested arrays are not supported");return function(i,r){const o=[];let s=0;for(const a of i){let c=Hu(a,r.wu(s));null==c&&(c={nullValue:"NULL_VALUE"}),o.push(c),s++}return{arrayValue:{values:o}}}(n,t)}return function(i,r){if(null===(i=Hf(i)))return{nullValue:"NULL_VALUE"};if("number"==typeof i)return xU(r.serializer,i);if("boolean"==typeof i)return{booleanValue:i};if("string"==typeof i)return{stringValue:i};if(i instanceof Date){const o=_i.fromDate(i);return{timestampValue:um(r.serializer,o)}}if(i instanceof _i){const o=new _i(i.seconds,1e3*Math.floor(i.nanoseconds/1e3));return{timestampValue:um(r.serializer,o)}}if(i instanceof gI)return{geoPointValue:{latitude:i.latitude,longitude:i.longitude}};if(i instanceof Uu)return{bytesValue:zU(r.serializer,i._byteString)};if(i instanceof $i){const o=r.databaseId,s=i.firestore._databaseId;if(!s.isEqual(o))throw r.Su(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${o.projectId}/${o.database}`);return{referenceValue:F2(i.firestore._databaseId||r.databaseId,i._key.path)}}throw r.Su(`Unsupported field value: ${w1(i)}`)}(n,t)}function Oz(n,t){const e={};return j9(n)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):rd(n,(i,r)=>{const o=Hu(r,t.fu(i));null!=o&&(e[i]=o)}),{mapValue:{fields:e}}}function Nz(n){return!("object"!=typeof n||null===n||n instanceof Array||n instanceof Date||n instanceof _i||n instanceof gI||n instanceof Uu||n instanceof $i||n instanceof Dz)}function wI(n,t,e){if(!Nz(e)||"object"!=typeof(r=e)||null===r||Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r)){const i=w1(e);throw t.Su("an object"===i?n+" a custom object":n+" "+i)}var r}function G_(n,t,e){if((t=Hf(t))instanceof Im)return t._internalPath;if("string"==typeof t)return k1(n,t);throw E1("Field path arguments must be of type string or ",n,!1,void 0,e)}const Bke=new RegExp("[~\\*/\\[\\]]");function k1(n,t,e){if(t.search(Bke)>=0)throw E1(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,n,!1,void 0,e);try{return new Im(...t.split("."))._internalPath}catch{throw E1(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,n,!1,void 0,e)}}function E1(n,t,e,i,r){const o=i&&!i.isEmpty(),s=void 0!==r;let a=`Function ${t}() called with invalid data`;e&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(o||s)&&(c+=" (found",o&&(c+=` in field ${i}`),s&&(c+=` in document ${r}`),c+=")"),new Te(oe.INVALID_ARGUMENT,a+n+c)}function Lz(n,t){return n.some(e=>e.isEqual(t))}class CI{constructor(t,e,i,r,o){this._firestore=t,this._userDataWriter=e,this._key=i,this._document=r,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new $i(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const t=new Vke(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const e=this._document.data.field(T1("DocumentSnapshot.get",t));if(null!==e)return this._userDataWriter.convertValue(e)}}}class Vke extends CI{data(){return super.data()}}function T1(n,t){return"string"==typeof t?k1(n,t):t instanceof Im?t._internalPath:t._delegate._internalPath}class kI{}class EI extends kI{}class W_ extends EI{constructor(t,e,i){super(),this._field=t,this._op=e,this._value=i,this.type="where"}static _create(t,e,i){return new W_(t,e,i)}_apply(t){const e=this._parse(t);return zz(t._query,e),new Wr(t.firestore,t.converter,E2(t._query,e))}_parse(t){const e=Mm(t.firestore);return function(o,s,a,c,l,d,u){let h;if(l.isKeyField()){if("array-contains"===d||"array-contains-any"===d)throw new Te(oe.INVALID_ARGUMENT,`Invalid Query. You can't perform '${d}' queries on documentId().`);if("in"===d||"not-in"===d){Hz(u,d);const f=[];for(const m of u)f.push(Uz(c,o,m));h={arrayValue:{values:f}}}else h=Uz(c,o,u)}else"in"!==d&&"not-in"!==d&&"array-contains-any"!==d||Hz(u,d),h=function Pz(n,t,e,i=!1){return Hu(e,n.Cu(i?4:3,t))}(a,"where",u,"in"===d||"not-in"===d);return _n.create(l,d,h)}(t._query,0,e,t.firestore._databaseId,this._field,this._op,this._value)}}class Rm extends kI{constructor(t,e){super(),this.type=t,this._queryConstraints=e}static _create(t,e){return new Rm(t,e)}_parse(t){const e=this._queryConstraints.map(i=>i._parse(t)).filter(i=>i.getFilters().length>0);return 1===e.length?e[0]:Wn.create(e,this._getOperator())}_apply(t){const e=this._parse(t);return 0===e.getFilters().length?t:(function(r,o){let s=r;const a=o.getFlattenedFilters();for(const c of a)zz(s,c),s=E2(s,c)}(t._query,e),new Wr(t.firestore,t.converter,E2(t._query,e)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class TI extends EI{constructor(t,e){super(),this._field=t,this._direction=e,this.type="orderBy"}static _create(t,e){return new TI(t,e)}_apply(t){const e=function(r,o,s){if(null!==r.startAt)throw new Te(oe.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==r.endAt)throw new Te(oe.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new y_(o,s)}(t._query,this._field,this._direction);return new Wr(t.firestore,t.converter,function(r,o){const s=r.explicitOrderBy.concat([o]);return new Yc(r.path,r.collectionGroup,s,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(t._query,e))}}class S1 extends EI{constructor(t,e,i){super(),this.type=t,this._limit=e,this._limitType=i}static _create(t,e,i){return new S1(t,e,i)}_apply(t){return new Wr(t.firestore,t.converter,qx(t._query,this._limit,this._limitType))}}function Uz(n,t,e){if("string"==typeof(e=Hf(e))){if(""===e)throw new Te(oe.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!k2(t)&&-1!==e.indexOf("/"))throw new Te(oe.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${e}' contains a '/' character.`);const i=t.path.child(gn.fromString(e));if(!Ge.isDocumentKey(i))throw new Te(oe.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${i}' is not because it has an odd number of segments (${i.length}).`);return Au(n,new Ge(i))}if(e instanceof $i)return Au(n,e._key);throw new Te(oe.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${w1(e)}.`)}function Hz(n,t){if(!Array.isArray(n)||0===n.length)throw new Te(oe.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function zz(n,t){const e=function(r,o){for(const s of r)for(const a of s.getFlattenedFilters())if(o.indexOf(a.op)>=0)return a.op;return null}(n.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==e)throw new Te(oe.INVALID_ARGUMENT,e===t.op?`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`:`Invalid query. You cannot use '${t.op.toString()}' filters with '${e.toString()}' filters.`)}class jke{convertValue(t,e="none"){switch(ad(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Fi(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(Xc(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw at()}}convertObject(t,e){return this.convertObjectMap(t.fields,e)}convertObjectMap(t,e="none"){const i={};return rd(t,(r,o)=>{i[r]=this.convertValue(o,e)}),i}convertGeoPoint(t){return new gI(Fi(t.latitude),Fi(t.longitude))}convertArray(t,e){return(t.values||[]).map(i=>this.convertValue(i,e))}convertServerTimestamp(t,e){switch(e){case"previous":const i=Hx(t);return null==i?null:this.convertValue(i,e);case"estimate":return this.convertTimestamp(g_(t));default:return null}}convertTimestamp(t){const e=od(t);return new _i(e.seconds,e.nanos)}convertDocumentKey(t,e){const i=gn.fromString(t);ft(JU(i));const r=new Du(i.get(1),i.get(3)),o=new Ge(i.popFirst(5));return r.isEqual(e)||zi(`Document ${o} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),o}}class zu{constructor(t,e){this.hasPendingWrites=t,this.fromCache=e}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class Fm extends CI{constructor(t,e,i,r,o,s){super(t,e,i,r,s),this._firestore=t,this._firestoreImpl=t,this.metadata=o}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const e=new I1(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,e={}){if(this._document){const i=this._document.data.field(T1("DocumentSnapshot.get",t));if(null!==i)return this._userDataWriter.convertValue(i,e.serverTimestamps)}}}class I1 extends Fm{data(t={}){return super.data(t)}}class Pm{constructor(t,e,i,r){this._firestore=t,this._userDataWriter=e,this._snapshot=r,this.metadata=new zu(r.hasPendingWrites,r.fromCache),this.query=i}get docs(){const t=[];return this.forEach(e=>t.push(e)),t}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(t,e){this._snapshot.docs.forEach(i=>{t.call(e,new I1(this._firestore,this._userDataWriter,i.key,i,new zu(this._snapshot.mutatedKeys.has(i.key),this._snapshot.fromCache),this.query.converter))})}docChanges(t={}){const e=!!t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new Te(oe.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(r,o){if(r._snapshot.oldDocs.isEmpty()){let s=0;return r._snapshot.docChanges.map(a=>({type:"added",doc:new I1(r._firestore,r._userDataWriter,a.doc.key,a.doc,new zu(r._snapshot.mutatedKeys.has(a.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:s++}))}{let s=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(a=>o||3!==a.type).map(a=>{const c=new I1(r._firestore,r._userDataWriter,a.doc.key,a.doc,new zu(r._snapshot.mutatedKeys.has(a.doc.key),r._snapshot.fromCache),r.query.converter);let l=-1,d=-1;return 0!==a.type&&(l=s.indexOf(a.doc.key),s=s.delete(a.doc.key)),1!==a.type&&(s=s.add(a.doc),d=s.indexOf(a.doc.key)),{type:Gke(a.type),doc:c,oldIndex:l,newIndex:d}})}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}function Gke(n){switch(n){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return at()}}class gd extends jke{constructor(t){super(),this.firestore=t}convertBytes(t){return new Uu(t)}convertReference(t){const e=this.convertDocumentKey(t,this.firestore._databaseId);return new $i(this.firestore,null,e)}}function qke(n,t){const e=bn(n.firestore,li),i=function Ike(n,t,...e){if(n=Hf(n),1===arguments.length&&(t=A9.newId()),mI("doc","path",t),n instanceof z_){const i=gn.fromString(t,...e);return vz(i),new $i(n,null,new Ge(i))}{if(!(n instanceof $i||n instanceof ec))throw new Te(oe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=n._path.child(gn.fromString(t,...e));return vz(i),new $i(n.firestore,n instanceof ec?n.converter:null,new Ge(i))}}(n),r=function SI(n,t,e){let i;return i=n?e&&(e.merge||e.mergeFields)?n.toFirestore(t,e):n.toFirestore(t):t,i}(n.converter,t);return function q_(n,t){return function(i,r){const o=new _r;return i.asyncQueue.enqueueAndForget(xe(function*(){return function YCe(n,t,e){return UA.apply(this,arguments)}(yield function hI(n){return x1(n).then(t=>t.syncEngine)}(i),r,o)})),o.promise}(Gi(n),t)}(e,[_I(Mm(n.firestore),"addDoc",i._key,r,null!==n.converter,{}).toMutation(i._key,vi.exists(!1))]).then(()=>i)}!function(t,e=!0){Xf="10.9.0",dx(new zg("firestore",(i,{instanceIdentifier:r,options:o})=>{const s=i.getProvider("app").getImmediate(),a=new li(new k1e(i.getProvider("auth-internal")),new S1e(i.getProvider("app-check-internal")),function(l,d){if(!Object.prototype.hasOwnProperty.apply(l.options,["projectId"]))throw new Te(oe.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Du(l.options.projectId,d)}(s,r),s);return o=Object.assign({useFetchStreams:e},o),a._setSettings(o),a},"PUBLIC").setMultipleInstances(!0)),zf(T9,"4.5.0",t),zf(T9,"4.5.0","esm2017")}();let sEe=(()=>{class n{constructor(e){this.terminologyService=e,this.goals=[{name:"Bronze",score:100},{name:"Silver",score:200},{name:"Gold",score:300},{name:"Platinum",score:400},{name:"Diamond",score:500}],this.difficultyLevels=[{name:"Easy",rules:{maxHitPoints:5,hitpointsAwardedForGuessingfullTerm:1,freeHints:2,pointsPerGuessedLetter:1,goals:this.goals}},{name:"Medium",rules:{maxHitPoints:4,hitpointsAwardedForGuessingfullTerm:1,freeHints:1,pointsPerGuessedLetter:2,goals:this.goals}},{name:"Hard",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals}}],this.rules=this.difficultyLevels[0].rules,this.fsn="",this.scg="",this.focusConcepts=[],this.attributePairs=[],this.usedHints=new Set,this.randomLimit=4e3,this.guessResult=new De,this.termResult=new De,this.game=new Ti(this.initialize())}loadMenu(){this.game.next({...this.game.value,state:"menu"})}getDifficultyLevels(){return this.difficultyLevels}newRound(e){var i=this;return xe(function*(){i.game.next({...i.game.value,state:"choosingTerm",score:e?0:i.game.value.score,hitPoints:e?i.rules.maxHitPoints:i.game.value.hitPoints,round:e?1:i.game.value.round+1});const r=Math.floor(Math.random()*i.randomLimit)+1,o=yield oo(i.terminologyService.expandValueSet("^ 816080008 |International Patient Summary| {{ C definitionStatus = defined }}","",r,1));i.randomLimit=o.expansion.total-1;const s=yield oo(i.terminologyService.lookupConcept(o.expansion.contains[0].code));let a=i.extractFSN(s);i.fsn=a||"";let c=i.extractScg(s);i.scg=c||"";let l=i.extractFocusConcepts(c||"");i.focusConcepts=l||[];let d=i.extractAttributePairs(c||"");i.attributePairs=d||[],a?i.initializeRound(a,e):i.initializeRound("No term found"),i.game.next({...i.game.value,state:"playing"}),i.usedHints.clear()})()}extractFSN(e){let i=this.extractTerm(e,"900000000000003001",this.terminologyService.getLang());return i||(i=this.extractTerm(e,"900000000000013009",this.terminologyService.getLang())),i||(i=this.extractTerm(e,"900000000000003001","en")),i}extractTerm(e,i,r){let o="";return e.parameter.forEach(s=>{if("designation"===s.name){let a=s.part.some(l=>"use"===l.name&&l.valueCoding.code===i),c=s.part.some(l=>"language"===l.name&&l.valueCode===r);a&&c&&(o=s.part.find(l=>"value"===l.name)?.valueString)}}),o}extractScg(e){let i;return e.parameter.forEach(r=>{"property"===r.name&&r.part.some(o=>"code"===o.name&&"normalForm"===o.valueString)&&(i=r.part.find(o=>"valueString"===o.name)?.valueString)}),i}extractFocusConcepts(e){const[i]=e.split(":").map(a=>a.trim()),o=i.match(/\d+\|.*?\|/g);return o?o.map(a=>this.transformSnomedConcept(a.trim())||{code:"",display:""}).filter(a=>""!==a.code):[]}extractAttributePairs(e){const i=e.split(":").slice(1).join(":").trim(),r=/(\d+\|.*?\|)\s*=\s*(\d+\|.*?\|)/g;let o;const s=[];for(;null!==(o=r.exec(i));){const a=this.transformSnomedConcept(o[1].trim()),c=this.transformSnomedConcept(o[2].trim());a&&c&&s.push({type:a,target:c})}return s}transformSnomedConcept(e){const r=e.match(/^(\d+)\|(.+?)\|$/);return r?{code:r[1],display:r[2]}:null}initialize(){return{term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"menu",score:0,round:0,rules:this.rules,difficultyLevel:"",startTimestamp:0,endTimestamp:0}}startGame(e){this.rules=this.difficultyLevels.find(i=>i.name.toLowerCase()===e.toLocaleLowerCase())?.rules,this.game.next({term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"playing",score:0,round:0,rules:this.rules,difficultyLevel:e,startTimestamp:Date.now(),endTimestamp:0}),this.newRound(!0)}initializeRound(e,i){const r=e.match(/\(([^)]+)\)$/),o=r?r[0]:"",s=o?e.lastIndexOf(o):e.length,a=e.split("").map((c,l)=>l>=s?c:/[a-zA-Z0-9\xe1-\xfa\xf1]/.test(c)?"_":c);this.game.next({...this.game.value,term:e,displayTerm:a,hitPoints:i?this.rules.maxHitPoints:this.game.value.hitPoints,hints:[],state:"playing",score:i?0:this.game.value.score});for(let c=0;c{athis.goals[this.goals.length-1].score?(i.state="won",i.endTimestamp=Date.now()):(i.hitPoints=i.hitPoints+this.rules.hitpointsAwardedForGuessingfullTerm,i.hitPoints>this.rules.maxHitPoints&&(i.hitPoints=this.rules.maxHitPoints),setTimeout(()=>{this.newRound()},1500)))):(this.guessResult.emit({letter:e,result:!1}),i.hitPoints-=1,i.hitPoints<=0&&(i.hitPoints=0,i.state="gameOver",i.endTimestamp=Date.now())),this.game.next(i)}guessTerm(e){return e.toLowerCase()===this.game.value.term.toLowerCase()?(this.termResult.emit(e),this.game.next({...this.game.value,displayTerm:this.game.value.term.split("")}),!0):(this.game.next({...this.game.value,hitPoints:this.game.value.hitPoints-1}),this.game.value.hitPoints<=0&&this.game.next({...this.game.value,hitPoints:0,state:"gameOver"}),!1)}revealHint(e){let i={...this.game.value},r="";if(0===this.focusConcepts.length&&0===this.attributePairs.length)return i.hints.push("No more hints available."),void this.game.next(i);let o=this.focusConcepts.length>0,s=this.attributePairs.length>0;if(o&&s&&(o=Math.random()<.5),o){let a=Math.floor(Math.random()*this.focusConcepts.length);r=`One of the parents of this concept is: ${this.focusConcepts[a].display}`,this.focusConcepts.splice(a,1)}else if(s){let a=Math.floor(Math.random()*this.attributePairs.length),c=this.attributePairs[a];r=`This concept has a ${c.type.display} of ${c.target.display}`,this.attributePairs.splice(a,1)}this.usedHints.add(r),i.hints.push(r),e||(i.hitPoints-=1),i.hintsAvailable=this.focusConcepts.length>0||this.attributePairs.length>0,this.game.next(i),i.hitPoints<=0&&(i.hitPoints=0,i.state="gameOver",this.game.next(i))}getGameState(){return this.game.asObservable()}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ur))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),aEe=(()=>{class n{constructor(){this.loadingProgress=new Ti(0)}preloadImages(e){const i=e.map((r,o)=>this.preloadImage(r,e.length,o));return Promise.all(i).then(()=>{this.loadingProgress.next(100)})}preloadImage(e,i,r){return new Promise((o,s)=>{const a=new Image;a.src=e,a.onload=()=>{this.loadingProgress.next((r+1)/i*100),o()},a.onerror=s})}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),qz=(()=>{class n{constructor(){this.db=Fke(),this.scoreLimit=20}addScore(e){var i=this;return xe(function*(){try{yield qke(Cz(i.db,"scoreboard"),e)}catch(r){console.error("Error adding document: ",r)}})()}getScores(){var e=this;return xe(function*(){const r=function Uke(n,t,...e){let i=[];t instanceof kI&&i.push(t),i=i.concat(e),function(o){const s=o.filter(c=>c instanceof Rm).length,a=o.filter(c=>c instanceof W_).length;if(s>1||s>0&&a>0)throw new Te(oe.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(i);for(const r of i)n=r._apply(n);return n}(Cz(e.db,"scoreboard"),function Hke(n,t="asc"){const e=t,i=T1("orderBy",n);return TI._create(i,e)}("score","desc"),function zke(n){return function xz(n,t){if(t<=0)throw new Te(oe.INVALID_ARGUMENT,`Function ${n}() requires a positive number, but it was: ${t}.`)}("limit",n),S1._create("limit",n,"F")}(e.scoreLimit));return(yield function Wke(n){n=bn(n,Wr);const t=bn(n.firestore,li),e=Gi(t),i=new gd(t);return function Bz(n){if("L"===n.limitType&&0===n.explicitOrderBy.length)throw new Te(oe.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(n._query),gz(e,n._query).then(r=>new Pm(t,i,n,r))}(r)).docs.map(s=>({id:s.id,...s.data()}))})()}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function cEe(n,t){if(1&n){const e=Le();_(0,"button",4),z("click",function(){const o=he(e).$implicit;return fe(O(2).guessLetter(o))}),k(1),v()}if(2&n){const e=t.$implicit,i=O(2);ot("guessed-correct","correct"===i.guessedLetters[e])("guessed-wrong","wrong"===i.guessedLetters[e]),E("disabled",i.isLetterGuessed(e)),w(1),it(" ",e," ")}}function lEe(n,t){if(1&n&&(_(0,"div",2),A(1,cEe,2,6,"button",3),v()),2&n){const e=t.$implicit;w(1),E("ngForOf",e)}}let dEe=(()=>{class n{constructor(){this.keyboardLayout=[["1","2","3","4","5","6","7","8","9","0"],["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],this.guessedLetters={},this.letterGuessed=new De}addGuessedLetter(e,i){this.guessedLetters[e]=i?"correct":"wrong"}guessLetter(e){this.letterGuessed.emit(e)}isLetterGuessed(e){return e in this.guessedLetters}markLetterAsGuessed(e,i){this.guessedLetters[e]=i}reset(){this.guessedLetters={}}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-keyboard"]],outputs:{letterGuessed:"letterGuessed"},decls:2,vars:1,consts:[[1,"keyboard-container"],["class","keyboard-row",4,"ngFor","ngForOf"],[1,"keyboard-row"],["mat-button","",3,"guessed-correct","guessed-wrong","disabled","click",4,"ngFor","ngForOf"],["mat-button","",3,"disabled","click"]],template:function(i,r){1&i&&(_(0,"div",0),A(1,lEe,2,1,"div",1),v()),2&i&&(w(1),E("ngForOf",r.keyboardLayout))},dependencies:[io,Fo],styles:[".keyboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.keyboard-row[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:5px;flex-wrap:wrap}button[_ngcontent-%COMP%]{margin:2px;padding:8px 6px;border-radius:8px;border:1px solid #000;transition:background-color .3s ease;min-width:40px;flex:1}button.guessed-correct[_ngcontent-%COMP%]{background-color:green;color:#fff}button.guessed-wrong[_ngcontent-%COMP%]{background-color:red;color:#fff}@media (max-width: 768px){.keyboard-row[_ngcontent-%COMP%]{margin:1px 0}.keyboard-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:1px;padding:8px;min-width:0;width:9%;flex:1 1 auto;font-size:14px}}"]})}return n})(),uEe=(()=>{class n{constructor(){this.tooltipDismissedKey="iosSafariTooltipDismissed"}isIosSafari(){return/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/Safari/i.test(window.navigator.userAgent)&&!/CriOS/i.test(window.navigator.userAgent)&&!/FxiOS/i.test(window.navigator.userAgent)}tooltipDismissed(){return"true"===localStorage.getItem(this.tooltipDismissedKey)}dismissTooltip(){localStorage.setItem(this.tooltipDismissedKey,"true")}isRunningStandalone(){return"standalone"in window.navigator&&window.navigator.standalone}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function hEe(n,t){if(1&n){const e=Le();_(0,"div",1)(1,"div",2),k(2," Install this webapp on your iPhone: tap "),_(3,"mat-icon"),k(4,"ios_share"),v(),k(5," and then 'Add to Home Screen' "),v(),_(6,"button",3),z("click",function(){return he(e),fe(O().dismiss())}),_(7,"mat-icon"),k(8,"close"),v()()()}}let fEe=(()=>{class n{constructor(e){this.platformDetectionService=e,this.isIosSafari=!1,this.tooltipDismissed=!1}ngOnInit(){this.isIosSafari=this.platformDetectionService.isIosSafari(),this.tooltipDismissed=this.platformDetectionService.tooltipDismissed()||this.platformDetectionService.isRunningStandalone()}dismiss(){this.tooltipDismissed=!0,this.platformDetectionService.dismissTooltip()}static#e=this.\u0275fac=function(i){return new(i||n)(y(uEe))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-add-to-home"]],decls:1,vars:1,consts:[["class","custom-tooltip",4,"ngIf"],[1,"custom-tooltip"],[1,"tooltip-text"],[1,"tooltip-dismiss-button",3,"click"]],template:function(i,r){1&i&&A(0,hEe,9,0,"div",0),2&i&&E("ngIf",r.isIosSafari&&!r.tooltipDismissed)},dependencies:[ri,co],styles:['.custom-tooltip[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:white;border-radius:8px;padding:16px;box-shadow:0 4px 8px #0003;display:flex;flex-direction:row;align-items:center;max-width:320px;box-sizing:border-box;z-index:1000}.custom-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-20px;left:50%;transform:translate(-50%);width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid white}.tooltip-icon[_ngcontent-%COMP%]{background:#007BFF;color:#fff;border-radius:50%;padding:10px;margin-right:16px}.tooltip-text[_ngcontent-%COMP%]{color:#333;font-size:16px}.tooltip-dismiss-button[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer}.tooltip-dismiss-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666;vertical-align:bottom}']})}return n})(),Qz=(()=>{class n{transform(e,...i){if(!e)return e;const r=Math.floor(e/1e3%60),o=Math.floor(e/6e4%60),s=Math.floor(e/36e5%24),a=0===s&&o<10?o.toString():o<10?"0"+o:o;let d="";return s>0&&(d+=`${s<10?"0"+s:s}h `),(o>0||s>0)&&(d+=`${a}m `),d+=`${0===s&&0===o&&r<10?r.toString():r<10?"0"+r:r}s`,d}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275pipe=Xr({name:"elapsedTime",type:n,pure:!0})}return n})();const mEe=["keyboard"];function pEe(n,t){if(1&n&&(_(0,"div",7)(1,"div",8)(2,"div",9),k(3," Loading... "),v(),_e(4,"mat-progress-bar",10),v()()),2&n){const e=O(2);w(4),E("value",e.loadingAssetsProgress)}}function gEe(n,t){1&n&&(_(0,"span")(1,"mat-icon"),k(2,"favorite"),v()())}function _Ee(n,t){1&n&&(_(0,"span")(1,"mat-icon"),k(2,"favorite_border"),v()())}function bEe(n,t){if(1&n&&(_(0,"span"),k(1),v()),2&n){const e=t.$implicit;w(1),Ze(e)}}function vEe(n,t){if(1&n&&(_(0,"span",33),A(1,bEe,2,1,"span",17),v()),2&n){const e=t.$implicit;w(1),E("ngForOf",e.split(""))}}function yEe(n,t){if(1&n&&(_(0,"div",31),A(1,vEe,2,1,"span",32),v()),2&n){const e=O(2).ngIf;w(1),E("ngForOf",e.displayTerm.join("").split(" "))}}function xEe(n,t){1&n&&(_(0,"div",34)(1,"div",35),k(2," Choosing a random SNOMED CT concept using the FHIR API "),v(),_e(3,"mat-progress-bar",36),v())}function wEe(n,t){if(1&n){const e=Le();_(0,"div",37),z("click",function(){return he(e),fe(O(3).revealHint())}),k(1," Reveal Hint "),v()}}function CEe(n,t){if(1&n){const e=Le();_(0,"div",37),z("click",function(){return he(e),fe(O(3).loadMenu())}),k(1," Abandon game "),v()}}function kEe(n,t){1&n&&_e(0,"li",41),2&n&&E("innerHTML",t.$implicit,zd)}function EEe(n,t){if(1&n&&(_(0,"div",38)(1,"div",39)(2,"h2"),k(3,"Hints:"),v(),_(4,"ul"),A(5,kEe,1,1,"li",40),v()()()),2&n){const e=O(2).ngIf;w(5),E("ngForOf",e.hints)}}const II=function(n){return[n]};function TEe(n,t){if(1&n&&(_(0,"mat-icon",47),k(1,"grade"),v()),2&n){const e=O().$implicit;Ai("left",O(3).calculateGoalPosition(e.score-5),"%"),E("ngClass",la(3,II,e.name.toLowerCase()))}}function SEe(n,t){if(1&n&&(_(0,"mat-icon",48),k(1,"grade"),v()),2&n){const e=O().$implicit;Ai("left",O(3).calculateGoalPosition(e.score-1),"%"),E("ngClass",la(3,II,e.name.toLowerCase()))}}function DEe(n,t){if(1&n&&(_(0,"div",49),k(1),v()),2&n){const e=O().$implicit;Ai("left",O(3).calculateGoalPosition(e.score),"%"),E("ngClass",la(4,II,e.name.toLowerCase())),w(1),it("",e.name," trophy!")}}const AEe=function(n,t){return[n,t]};function IEe(n,t){if(1&n&&(zt(0),_e(1,"div",42),A(2,TEe,2,5,"mat-icon",43),_(3,"mat-icon",44),k(4,"emoji_events"),v(),A(5,SEe,2,5,"mat-icon",45),A(6,DEe,2,6,"div",46),jt()),2&n){const e=t.$implicit,i=O(2).ngIf,r=O();w(1),function n4(n){ca(JZ,La,n,!0)}(e.name.toLowerCase()),Ai("left",r.calculateGoalPosition(e.score),"%"),w(1),E("ngIf",i.score>=e.score),w(1),Ai("left",r.calculateGoalPosition(e.score-3),"%"),E("ngClass",Uk(10,AEe,e.name.toLowerCase(),i.score>=e.score?"trophy-large":"")),w(2),E("ngIf",i.score>=e.score),w(1),E("ngIf",i.score>=e.score)}}const Kz=function(){return[]};function MEe(n,t){if(1&n){const e=Le();_(0,"div")(1,"div",11)(2,"div",12),_e(3,"img",13),_(4,"div",14),k(5),v()()(),_(6,"div",15)(7,"span",16),k(8),v(),A(9,gEe,3,0,"span",17),A(10,_Ee,3,0,"span",17),_(11,"span",16),k(12),no(13,"elapsedTime"),v()(),A(14,yEe,2,1,"div",18),A(15,xEe,4,0,"div",19),_(16,"p",20),k(17,"Click the keys to guess the letters of the term!"),v(),_(18,"div")(19,"app-keyboard",21,22),z("letterGuessed",function(r){return he(e),fe(O(2).guessLetter(r))}),v()(),_(21,"div",23),A(22,wEe,2,0,"div",24),A(23,CEe,2,0,"div",25),v(),A(24,EEe,6,1,"div",26),_(25,"div",27),k(26," * Hints are generated from the definition of the SNOMED CT concept, retrieved from the FHIR API as an SCG grammar expression "),v(),_(27,"div",28)(28,"h3"),k(29,"Score Progression"),v(),_(30,"div",29),_e(31,"mat-progress-bar",30),A(32,IEe,7,13,"ng-container",17),v()()()}if(2&n){const e=O().ngIf,i=O();w(3),E("@popIn",void 0),w(2),it(" ",e.difficultyLevel," "),w(3),qd(" Round: ",e.round," \xa0\xa0\xa0\xa0 Score: ",e.score," \xa0\xa0\xa0\xa0 Life: "),w(1),E("ngForOf",us(17,Kz).constructor(e.hitPoints)),w(1),E("ngForOf",us(18,Kz).constructor(e.rules.maxHitPoints-e.hitPoints)),w(2),it(" \xa0\xa0\xa0\xa0 Time: ",Va(13,15,1e3*i.elapsedTime),""),w(2),E("ngIf","playing"==e.state),w(1),E("ngIf","choosingTerm"===e.state),w(3),E("@shake",i.shakeState),w(4),E("ngIf","playing"==e.state&&e.hintsAvailable&&e.hitPoints>1),w(1),E("ngIf","playing"==e.state),w(1),E("ngIf",e.hints.length>0&&"playing"==e.state),w(7),E("value",i.calculateProgress(e.score)),w(1),E("ngForOf",i.goals)}}function REe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",52),_(3,"p",53)(4,"b"),k(5,"Welcome to SnoGuess!"),v()(),_(6,"p",53),k(7," A fun way to learn about SNOMED CT concepts and their definitions. "),v(),_(8,"div",54),z("click",function(){return he(e),fe(O(2).chooseDifficultyLevel())}),k(9," New game "),v(),_(10,"div",54),z("click",function(){return he(e),fe(O(2).showInstructionsPanel())}),k(11," Instructions "),v(),_(12,"div",55),z("click",function(){return he(e),fe(O(2).openScoreboard())}),k(13," High Scores "),v(),_(14,"p",56),k(15),v()()}if(2&n){const e=O(2);w(2),E("@popIn",void 0),w(6),E("@scrollUp",void 0),w(2),E("@scrollUp",void 0),w(2),E("@scrollUp",void 0),w(3),qd(" Playing with: ",e.selectedEdition,", Language: ",e.selectedLanguage," ")}}function FEe(n,t){if(1&n){const e=Le();_(0,"div",60)(1,"div",61),z("click",function(){const o=he(e).$implicit;return fe(O(3).startGame(o.name))}),k(2),v(),_(3,"p",62),k(4),_(5,"mat-icon",63),k(6,"favorite"),v(),k(7),_(8,"mat-icon",64),k(9,"contact_support"),v(),k(10),v()()}if(2&n){const e=t.$implicit;w(1),E("@scrollUp",void 0),w(1),it(" ",e.name," "),w(1),E("@fadeInDelayed",void 0),w(1),it(" Life: ",e.rules.maxHitPoints," "),w(3),it(", Free hints: ",e.rules.freeHints," "),w(3),it(", Points per letter: ",e.rules.pointsPerGuessedLetter," ")}}function PEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",57),_(3,"p",53)(4,"b"),k(5,"Choose the game difficulty"),v()(),A(6,FEe,11,6,"div",58),_(7,"div",59),z("click",function(){return he(e),fe(O(2).backToMenu())}),k(8," Back "),v()()}if(2&n){const e=O(2);w(2),E("@popIn",void 0),w(4),E("ngForOf",e.difficultyLevels),w(1),E("@scrollUp",void 0)}}function OEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",65),_(3,"ul",66)(4,"li",67)(5,"mat-icon"),k(6,"check"),v(),k(7,"Click the keys on the screen to guess the letters of the term "),_(8,"mat-icon",68),k(9,"keyboard"),v()(),_(10,"li",67)(11,"mat-icon"),k(12,"check"),v(),k(13,"You have three to five lives, depending on your difficulty level "),_(14,"span",69)(15,"mat-icon"),k(16,"favorite"),v(),_(17,"mat-icon"),k(18,"favorite"),v(),_(19,"mat-icon"),k(20,"favorite"),v()()(),_(21,"li",67)(22,"mat-icon"),k(23,"check"),v(),k(24,"You will loose one life with each wrong guess "),_(25,"mat-icon",69),k(26,"favorite_border"),v()(),_(27,"li",67)(28,"mat-icon"),k(29,"check"),v(),k(30,"You earn points for each correct guess "),_(31,"mat-icon",68),k(32,"plus_one"),v()(),_(33,"li",67)(34,"mat-icon"),k(35,"check"),v(),k(36,"In Easy mode you get 2 hints for free, and in Medium mode you get one \u{1f4a1} "),v(),_(37,"li",67)(38,"mat-icon"),k(39,"check"),v(),k(40,"You can reveal more hints, but each hint it will cost one life "),_(41,"mat-icon",69),k(42,"favorite_border"),v()(),_(43,"li",67)(44,"mat-icon"),k(45,"check"),v(),k(46,"If you guess the whole term you can recover one life"),_(47,"mat-icon",69),k(48,"favorite"),v()(),_(49,"li",67)(50,"mat-icon"),k(51,"check"),v(),k(52,"Keep guessing terms to increase your score and earn trophies "),_(53,"mat-icon",70),k(54,"emoji_events"),v()()(),_(55,"div",71),z("click",function(){return he(e),fe(O(2).hideInstructionsPanel())}),k(56," Back "),v()()}2&n&&(w(2),E("@popIn",void 0),w(53),E("@scrollUp",void 0))}function NEe(n,t){1&n&&(_(0,"div",72),_e(1,"img",73),v()),2&n&&(w(1),E("@popIn",void 0))}function LEe(n,t){if(1&n&&(_(0,"div"),k(1),v()),2&n){const e=O(2).ngIf,i=O();w(1),it(" Trophy: ",i.getMaxTrophyObtained(e.score)," ")}}const Xz=function(n){return[n,"shadow-local"]},BEe=function(n){return[n,"trophy-large","shadow-local"]};function VEe(n,t){if(1&n&&(_(0,"div")(1,"mat-icon",81),k(2,"grade"),v(),k(3," \xa0\xa0 "),_(4,"mat-icon",81),k(5,"emoji_events"),v(),k(6," \xa0 "),_(7,"mat-icon",81),k(8,"grade"),v()()),2&n){const e=O(2).ngIf,i=O();w(1),E("ngClass",la(3,Xz,i.getMaxTrophyObtained(e.score).toLocaleLowerCase())),w(3),E("ngClass",la(5,BEe,i.getMaxTrophyObtained(e.score).toLocaleLowerCase())),w(3),E("ngClass",la(7,Xz,i.getMaxTrophyObtained(e.score).toLocaleLowerCase()))}}function UEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",74),_(3,"div",75)(4,"div"),k(5," The term was: "),v(),_(6,"div",76),k(7),v(),_(8,"div",77),k(9),v(),_(10,"div",78),k(11),no(12,"elapsedTime"),v(),A(13,LEe,2,1,"div",4),v(),A(14,VEe,9,9,"div",4),_(15,"div",79),z("click",function(){he(e);const r=O(2);return r.loadMenu(),fe(r.chooseDifficultyLevel())}),k(16," New game "),v(),_(17,"div",79),z("click",function(){return he(e),fe(O(2).openScoreboard())}),k(18," High Scores "),v(),_(19,"div",80),z("click",function(){return he(e),fe(O(2).loadMenu())}),k(20," Main menu "),v()()}if(2&n){const e=O().ngIf,i=O();w(2),E("@popIn",void 0),w(5),it(" ",e.term,""),w(2),qd("",e.round," ",1==e.round?"round":"rounds",""),w(2),Zh(" Final Score: ",e.score," points - Difficulty: ",e.difficultyLevel," - Time: ",Va(12,12,e.endTimestamp-e.startTimestamp)," "),w(2),E("ngIf",i.getMaxTrophyObtained(e.score)),w(1),E("ngIf",i.getMaxTrophyObtained(e.score)),w(1),E("@scrollUp",void 0),w(2),E("@scrollUp",void 0),w(2),E("@scrollUp",void 0)}}function HEe(n,t){if(1&n){const e=Le();_(0,"div",87)(1,"p",88),k(2,"This is a High Score! Save a message to the public leaderboard!"),v(),_(3,"div",89)(4,"input",90),z("ngModelChange",function(r){return he(e),fe(O(3).messageForLeaderboard=r)}),v(),_(5,"div",91),z("click",function(){he(e);const r=O(2).ngIf;return fe(O().saveScore(r))}),k(6," Save "),v()(),_(7,"p",92),k(8,"No personal information is recorded"),v()()}if(2&n){const e=O(3);w(4),E("ngModel",e.messageForLeaderboard)}}function zEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",82),_(3,"div",83)(4,"mat-icon",84),k(5,"grade"),v(),_(6,"mat-icon",84),k(7,"emoji_events"),v(),_(8,"mat-icon",84),k(9,"grade"),v()(),_(10,"div",85),k(11),no(12,"elapsedTime"),v(),A(13,HEe,9,1,"div",86),_(14,"div",79),z("click",function(){he(e);const r=O(2);return r.loadMenu(),fe(r.chooseDifficultyLevel())}),k(15," New game "),v(),_(16,"div",79),z("click",function(){return he(e),fe(O(2).openScoreboard())}),k(17," High Scores "),v(),_(18,"div",80),z("click",function(){return he(e),fe(O(2).loadMenu())}),k(19," Main menu "),v()()}if(2&n){const e=O().ngIf,i=O();w(2),E("@popIn",void 0),w(9),Zh("Final score: ",e.score," - Difficulty: ",e.difficultyLevel," - Time: ",Va(12,8,e.endTimestamp-e.startTimestamp),""),w(2),E("ngIf",i.highScore),w(1),E("@scrollUp",void 0),w(2),E("@scrollUp",void 0),w(2),E("@scrollUp",void 0)}}function jEe(n,t){if(1&n&&(_(0,"div",2),A(1,pEe,5,1,"div",3),A(2,MEe,33,19,"div",4),A(3,REe,16,6,"div",5),A(4,PEe,9,3,"div",5),A(5,OEe,57,2,"div",5),A(6,NEe,2,1,"div",6),A(7,UEe,21,14,"div",5),A(8,zEe,20,10,"div",5),v()),2&n){const e=t.ngIf,i=O();w(1),E("ngIf",i.loadingAssets),w(1),E("ngIf",("playing"==e.state||"choosingTerm"==e.state)&&!i.loadingAssets),w(1),E("ngIf","menu"===e.state&&!i.chooseDifficulty&&!i.showInstructions&&!i.loadingAssets),w(1),E("ngIf","menu"===e.state&&i.chooseDifficulty&&!i.showInstructions&&!i.loadingAssets),w(1),E("ngIf",i.showInstructions),w(1),E("ngIf",i.termGuessed),w(1),E("ngIf","gameOver"===e.state),w(1),E("ngIf","won"==e.state)}}let $Ee=(()=>{class n{constructor(e,i,r,o,s){this.snoguessMainService=e,this.preloadService=i,this.terminologyService=r,this.firebaseService=o,this.router=s,this.shakeState="normal",this.termGuessed="",this.goals=[],this.loadingAssetsProgress=0,this.loadingAssets=!0,this.showInstructions=!1,this.chooseDifficulty=!1,this.currentYear=new Date,this.difficultyLevels=[],this.elapsedTime=0,this.gameInProgress=!1,this.messageForLeaderboard="",this.highScore=!1}ngOnInit(){this.game=this.snoguessMainService.getGameState(),this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.game.subscribe(i=>{"playing"===i.state&&(this.goals=i.rules.goals),("gameOver"===i.state||"won"===i.state)&&(this.stopTimer(),"won"===i.state&&this.firebaseService.getScores().then(r=>{i.score>r[r.length-1].score&&(this.highScore=!0)}))}),this.snoguessMainService.guessResult.subscribe(i=>{!1===i.result?(this.keyboard?.addGuessedLetter(i.letter,!1),this.shakeState="shake",setTimeout(()=>this.shakeState="normal",200)):this.keyboard?.addGuessedLetter(i.letter,!0)}),this.snoguessMainService.termResult.subscribe(i=>{i&&(this.keyboard?.reset(),this.termGuessed=i,setTimeout(()=>{this.termGuessed=""},2e3))}),this.preloadService.preloadImages(["assets/img/SI_CT_w_tagline.png","assets/img/snoguess-logo.png","assets/img/congratulations.png","assets/img/correct.png","assets/img/game-over.png","assets/img/instructions.png","assets/img/difficulty.png","assets/img/scoreboard.png"]).then(()=>{setTimeout(()=>{this.loadingAssets=!1,this.loadMenu()},500)}),this.preloadService.loadingProgress.subscribe(i=>{this.loadingAssetsProgress=i}),this.terminologyService.fhirUrlParam$.subscribe(i=>{i&&this.terminologyService.getCodeSystem(i).subscribe(r=>{this.selectedEdition=r?.entry[0]?.resource?.title})}),this.terminologyService.lang$.subscribe(i=>{this.selectedLanguage=i})}loadMenu(){this.snoguessMainService.loadMenu()}backToMenu(){this.chooseDifficulty=!1}showInstructionsPanel(){this.showInstructions=!0}hideInstructionsPanel(){this.showInstructions=!1}chooseDifficultyLevel(){this.chooseDifficulty=!0}startGame(e){this.chooseDifficulty=!1,this.keyboard&&this.keyboard.reset(),this.stopTimer(),this.snoguessMainService.startGame(e),this.startTimer(),this.highScore=!1}guessLetter(e){var i=this;return xe(function*(){"playing"===(yield function Lve(n,t){const e="object"==typeof t;return new Promise((i,r)=>{const o=new ph({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new lf)}});n.subscribe(o)})}(i.game))?.state&&i.snoguessMainService.guessLetter(e)})()}revealHint(){this.snoguessMainService.revealHint()}calculateProgress(e){return Math.min(e/this.goals[this.goals.length-1].score*100,100)}calculateGoalPosition(e){return e/this.goals[this.goals.length-1].score*100}findCurrentGoal(e){if(!e||e{e>=r.score&&(i=r.name)}),i}startTimer(){this.elapsedTime=0,this.gameInProgress=!0;const e=yg(0,1e3).pipe(ct(i=>this.elapsedTime=i),GE(()=>this.gameInProgress));this.gameTimerSubscription=e.subscribe()}stopTimer(){this.gameInProgress=!1,this.gameTimerSubscription&&this.gameTimerSubscription.unsubscribe()}openScoreboard(){this.router.navigate(["/snoguess/scoreboard"])}saveScore(e){let i={score:e.score,numberOfRounds:e.round,difficulty:e.difficultyLevel,elapsed:e.endTimestamp-e.startTimestamp,date:_i.now(),message:this.messageForLeaderboard};this.firebaseService.addScore(i).then(()=>{this.messageForLeaderboard="",this.openScoreboard()}).catch(r=>{this.messageForLeaderboard="",console.error("Error saving score: ",r),this.loadMenu()})}static#e=this.\u0275fac=function(i){return new(i||n)(y(sEe),y(aEe),y(Ur),y(qz),y(ro))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-snoguess-main"]],viewQuery:function(i,r){if(1&i&&pt(mEe,5),2&i){let o;Ae(o=Ie())&&(r.keyboard=o.first)}},decls:6,vars:7,consts:[["class","snoguess-game",4,"ngIf"],[1,"text-center","mt-8","mb-4"],[1,"snoguess-game"],["class","assets-loading-container",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center gap-4",4,"ngIf"],["class","overlay overlay-transparent",4,"ngIf"],[1,"assets-loading-container"],[1,"mt-48","mb-48"],[1,"progress-bar-message","text-center"],["mode","determinate",1,"game-progress-bar",3,"value"],[1,"flex","justify-center","mt-8","mb-8"],[1,"relative","w-1/4"],["src","assets/img/snoguess-logo.png","alt","Game Logo"],[1,"diff-label","absolute","-bottom-3","right-5","italic","text-gray-500"],[1,"hit-points"],[1,"score"],[4,"ngFor","ngForOf"],["class","term-display flex flex-row flex-wrap justify-center gap-8",4,"ngIf"],["class","loading-container",4,"ngIf"],[1,"guess-message"],[3,"letterGuessed"],["keyboard",""],[1,"game-buttons","mt-4"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","hints-container",4,"ngIf"],[1,"note"],[1,"score-progression-panel"],[1,"progress-bar-container"],["mode","determinate",3,"value"],[1,"term-display","flex","flex-row","flex-wrap","justify-center","gap-8"],["class","whitespace-nowrap",4,"ngFor","ngForOf"],[1,"whitespace-nowrap"],[1,"loading-container"],[1,"progress-bar-message"],["mode","indeterminate"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pt-1","pb-1","pl-6","pr-6","w-fit","text-center","cursor-pointer","font-bold","text-white",3,"click"],[1,"hints-container"],[1,"hints-callout","text-center"],["class","hint-item",3,"innerHTML",4,"ngFor","ngForOf"],[1,"hint-item",3,"innerHTML"],[1,"goal-indicator"],["class","star-icon left-star",3,"ngClass","left",4,"ngIf"],[1,"trophy-icon",3,"ngClass"],["class","star-icon right-star",3,"ngClass","left",4,"ngIf"],["class","goal-name",3,"left","ngClass",4,"ngIf"],[1,"star-icon","left-star",3,"ngClass"],[1,"star-icon","right-star",3,"ngClass"],[1,"goal-name",3,"ngClass"],[1,"flex","flex-col","items-center","gap-4"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/snoguess-logo.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,"text-center","font-light","text-lg"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","text-3xl",3,"click"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"text-center","font-light","italic","text-lg"],["src","assets/img/difficulty.png","alt","Game Logo",1,"w-1/4","mt-8"],["class","level-container w-full flex flex-col justify-center items-center",4,"ngFor","ngForOf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","mb-8","text-3xl",3,"click"],[1,"level-container","w-full","flex","flex-col","justify-center","items-center"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","text-3xl",3,"click"],[1,"level-details","text-center","mt-3","flex","flex-row","align-middle"],[1,"text-red-500","text-sm"],[1,"text-yellow-500","text-sm"],["src","assets/img/instructions.png","alt","Game Logo",1,"w-1/4","mt-8","mb-12"],[1,"text-left","instructions-text"],[1,"flex","flex-row","align-middle","gap-2"],[1,"text-blue-900"],[1,"text-red-500"],[1,"text-yellow-500"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"overlay","overlay-transparent"],["src","assets/img/correct.png","alt","Correct",1,"w-1/5","mt-8"],["src","assets/img/game-over.png","alt","Game Logo",1,"w-1/4","mt-8"],[1,"text-xl","text-pretty","text-center"],[1,"font-bold"],[1,"mt-12"],[1,"mt-4"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","text-2xl",3,"click"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],[3,"ngClass"],["src","assets/img/congratulations.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,""],[1,"large-icon","diamond","shadow-local"],[1,"reveal","won"],["class","flex flex-col items-center gap-4 w-full",4,"ngIf"],[1,"flex","flex-col","items-center","gap-4","w-full"],[1,"font-bold","text-lg","text-blue-900"],[1,"flex","flex-row","align-middle","justify-center","w-full"],["type","text","placeholder","Your message here",1,"w-1/3",3,"ngModel","ngModelChange"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4",3,"click"],[1,"text-sm","text-gray-400"]],template:function(i,r){1&i&&(A(0,jEe,9,8,"div",0),no(1,"async"),_(2,"div",1),k(3),no(4,"date"),v(),_e(5,"app-add-to-home")),2&i&&(E("ngIf",Va(1,2,r.game)),w(3),it(" Copyright \xa9 ",Kd(4,4,r.currentYear,"yyyy")," SNOMED International\n"))},dependencies:[ha,io,ri,co,L6,Us,qo,ps,dEe,fEe,SE,Jd,Qz],styles:[".snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a;min-height:85vh!important}.term-display[_ngcontent-%COMP%]{font-size:24px;letter-spacing:4px;word-break:break-all;margin-bottom:20px;text-align:center;font-family:monospace}.term-display[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0}.hit-points[_ngcontent-%COMP%]{font-weight:700;color:#d9534f;text-align:center;margin-bottom:2rem}mat-form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}button[_ngcontent-%COMP%]{margin-right:8px}.guess-field[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000}.overlay-dark[_ngcontent-%COMP%]{background-color:#00000080}.overlay-transparent[_ngcontent-%COMP%]{background-color:#0000}.message[_ngcontent-%COMP%]{font-size:4rem;text-align:center;margin-bottom:20px;font-weight:bolder}.reveal[_ngcontent-%COMP%]{font-size:2rem;text-align:center;margin-bottom:20px;font-weight:bolder}.won[_ngcontent-%COMP%]{color:#4caf50;text-shadow:black 2px 2px 2px}.lost[_ngcontent-%COMP%]{color:#f44336;text-shadow:rgb(0,0,0) 2px 2px 2px}.overlay[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1.5rem;padding:10px 20px}.loading-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:1rem}.progress-bar-message[_ngcontent-%COMP%]{color:#000;font-size:larger;margin-bottom:10px;font-style:italic;font-weight:lighter}.score[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.score-progression-panel[_ngcontent-%COMP%]{margin-top:2rem}.progress-bar-container[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:5rem;position:relative;background-color:#e0e0e0;border-radius:5px}.goal-indicator[_ngcontent-%COMP%]{position:absolute;bottom:0;width:2px;height:10px;background-color:#000}.goal-indicator.bronze[_ngcontent-%COMP%]{background-color:#cd7f32}.goal-indicator.silver[_ngcontent-%COMP%]{background-color:silver}.goal-indicator.gold[_ngcontent-%COMP%]{background-color:gold}.goal-indicator.platinum[_ngcontent-%COMP%]{background-color:#e5e4e2}.goal-indicator.diamond[_ngcontent-%COMP%]{background-color:#3b49c4}.trophy-icon[_ngcontent-%COMP%]{position:absolute;bottom:-35px;font-size:24px;width:24px;transition:transform .3s ease}.trophy-large[_ngcontent-%COMP%]{transform:scale(2.5) translate(-2px,3px)}.bronze[_ngcontent-%COMP%]{color:#cd7f32}.silver[_ngcontent-%COMP%]{color:silver}.gold[_ngcontent-%COMP%]{color:gold}.platinum[_ngcontent-%COMP%]{color:#e5e4e2}.diamond[_ngcontent-%COMP%]{color:#3b49c4}.shadow-local[_ngcontent-%COMP%]{text-shadow:black 2px 2px 2px}.star-icon[_ngcontent-%COMP%]{position:absolute;bottom:-40px;font-size:30px;width:30px;transition:transform .3s ease}.left-star[_ngcontent-%COMP%]{transform:translate(-50px)}.right-star[_ngcontent-%COMP%]{transform:translate(30px)}.goal-name[_ngcontent-%COMP%]{position:absolute;bottom:-75px;width:100px;margin-left:-50px;text-align:center;font-size:12px;font-weight:700;color:#000}.large-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem}.note[_ngcontent-%COMP%]{font-size:.8rem;font-weight:lighter;margin-top:1rem;text-align:center}.hints-container[_ngcontent-%COMP%]{margin-top:1rem}.hints-callout[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:.5rem}.hint-item[_ngcontent-%COMP%]{color:#555;font-size:1em;list-style-type:none;position:relative;padding:5px 0 5px 30px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}li[_ngcontent-%COMP%]{margin-bottom:10px;color:#666;font-size:1.2rem}.guess-message[_ngcontent-%COMP%]{text-align:center;margin-top:1rem;font-size:1.2rem}.assests-loading-container[_ngcontent-%COMP%]{text-align:center;font-size:20px;color:#fff}.game-progress-bar[_ngcontent-%COMP%]{border-radius:22px;overflow:hidden;background-color:#e0e0e0;box-shadow:0 4px 8px #0003}.game-progress-bar[_ngcontent-%COMP%] .mat-progress-bar-fill[_ngcontent-%COMP%]:after{background-color:#4caf50;border-radius:22px}.game-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.level-details[_ngcontent-%COMP%]{visibility:hidden}.level-container[_ngcontent-%COMP%]:hover .level-details[_ngcontent-%COMP%]{visibility:visible}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[$n("shake",[Qt("normal => shake",Gt(200,Tf([ze({transform:"translateX(0)"}),ze({transform:"translateX(-10px)"}),ze({transform:"translateX(10px)"}),ze({transform:"translateX(0)"})])))]),$n("popIn",[Qt(":enter",[ze({transform:"scale(0.8)",opacity:0}),Gt("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1.3)",opacity:1})),Gt("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1)",opacity:1}))])]),$n("scrollUp",[Qt(":enter",[ze({transform:"translateY(100%)",opacity:0}),Gt("0.5s ease-out",ze({transform:"translateY(0)",opacity:1}))])]),$n("fadeInDelayed",[Qt(":enter",[ze({opacity:0}),Gt("1s 0.5s ease-out",ze({opacity:1}))])])]}})}return n})();function GEe(n,t){if(1&n){const e=Le();_(0,"li")(1,"a",11),z("click",function(){const o=he(e).$implicit;return fe(O().findingWithExplicitContextSelected(o))}),k(2),v()()}if(2&n){const e=t.$implicit;w(2),Ze(e.display)}}function WEe(n,t){1&n&&(_(0,"th",20),k(1," Type "),v())}function qEe(n,t){if(1&n&&(_(0,"td",21),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.type.display," ")}}function QEe(n,t){1&n&&(_(0,"th",20),k(1," Target "),v())}function KEe(n,t){if(1&n&&(_(0,"td",21),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.target.code," ")}}function XEe(n,t){1&n&&(_(0,"th",20),k(1," Target "),v())}function YEe(n,t){if(1&n&&(_(0,"td",21),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.target.display," ")}}function ZEe(n,t){1&n&&_e(0,"tr",22)}function JEe(n,t){1&n&&_e(0,"tr",23)}function eTe(n,t){if(1&n&&(_(0,"div",4)(1,"h3"),k(2),v(),_(3,"table",12),zt(4,13),A(5,WEe,2,0,"th",14),A(6,qEe,2,1,"td",15),jt(),zt(7,16),A(8,QEe,2,0,"th",14),A(9,KEe,2,1,"td",15),jt(),zt(10,17),A(11,XEe,2,0,"th",14),A(12,YEe,2,1,"td",15),jt(),A(13,ZEe,1,0,"tr",18),A(14,JEe,1,0,"tr",19),v()()),2&n){const e=O();w(2),it("Relevant attributes (",e.selectedSituation.display,")"),w(1),E("dataSource",e.dataSource),w(10),E("matHeaderRowDef",e.displayedColumns),w(1),E("matRowDefColumns",e.displayedColumns)}}function tTe(n,t){if(1&n&&(_(0,"div",4)(1,"h3"),k(2,"Resource Type"),v(),_(3,"a",24)(4,"span"),k(5),v(),_(6,"mat-icon"),k(7,"open_in_new"),v()()()),2&n){const e=O();w(3),E("href","https://hl7.org/fhir/R4/"+e.resourceType+".html",Tb),w(2),it("FHIR R4 ",e.resourceType,"")}}function nTe(n,t){if(1&n){const e=Le();_(0,"div",25)(1,"button",26),z("click",function(){he(e);const r=O();return fe(r.saveOutput(r.fhirRepresentationString))}),_e(2,"mat-icon",27),v(),_(3,"button",28),z("click",function(){he(e);const r=O();return fe(r.copyOutputToClipboard(r.fhirRepresentationString))}),_e(4,"mat-icon",29),v()()}}const iTe=function(){return{}};let rTe=(()=>{class n{constructor(e,i){this.terminologyService=e,this.clipboard=i,this.fhirRepresentationString="{}",this.situationsBinding={title:"Finding with explicit context",type:"Autocomplete",ecl:"<< 413350009 |Finding with explicit context (situation)|",value:"",note:"Select a finding with explicit context"},this.SituationConstants={KnownPresent:{code:"410515003",display:"Known present",selfAndDescendants:[]},KnownAbsent:{code:"410516002",display:"Known absent",selfAndDescendants:[]},SubjectOfRecord:{code:"410604004",display:"Subject of record",selfAndDescendants:[]},PersonInTheFamily:{code:"303071001",display:"Person in the family",selfAndDescendants:[]},InThePast:{code:"410513005",display:"In the past",selfAndDescendants:[]},CurrentOrSpecifiedTime:{code:"410512000",display:"Current or specified time",selfAndDescendants:[]},KnownPossible:{code:"410590009",display:"Known possible",selfAndDescendants:[]}},this.examples=[{code:"160377001",display:"Family history of asthma"},{code:"12147341000119108",display:"History of burn"},{code:"428942009",display:"History of fall"},{code:"300890009",display:"Swelling absent"},{code:"162057007",display:"Nausea present"},{code:"401204006",display:"Suspected autism"}],this.displayedColumns=["type","targetCode","targetDisplay"],this.dataSource=[]}ngOnInit(){this.loadOrUpdateConstants()}loadOrUpdateConstants(){var e=this;return xe(function*(){let i=localStorage.getItem("SituationConstants");i?(e.SituationConstants=JSON.parse(i),console.log("Loaded constants from cache.")):(yield e.updateConstantDescendants(),localStorage.setItem("SituationConstants",JSON.stringify(e.SituationConstants)),console.log("Updated constants and cached them."))})()}updateConstantDescendants(){var e=this;return xe(function*(){for(const i in e.SituationConstants)if(Object.prototype.hasOwnProperty.call(e.SituationConstants,i)){const r=e.SituationConstants[i];let o=yield oo(e.terminologyService.expandValueSet("<< "+r.code,"",0,1e3));r.selfAndDescendants=o.expansion.contains.map(s=>s.code)}})()}convertSituationToFhir(e){var i=this;return xe(function*(){i.selectedSituation=e,i.fhirRepresentation=null,i.fhirRepresentationString="Loading...",i.dataSource=[],i.resourceType=void 0;let a,c,l,d,r=yield oo(i.terminologyService.lookupConcept(e.code)),o=i.terminologyService.getNormalForm(r);if(i.terminologyService.parseNormmalForm(o).groups.forEach(u=>{const h=u.find(p=>"408732007"===p.type.code);h&&(i.dataSource=[...i.dataSource,h],c=h.target);const f=u.find(p=>"408729009"===p.type.code);f&&(i.dataSource=[...i.dataSource,f],a=f.target);const m=u.find(p=>"408731000"===p.type.code);m&&(i.dataSource=[...i.dataSource,m],l=m.target);const g=u.find(p=>"246090004"===p.type.code);g&&(i.dataSource=[...i.dataSource,g],d=g.target)}),d){const u=i.SituationConstants.KnownPresent.selfAndDescendants.includes(a?.code),h=i.SituationConstants.SubjectOfRecord.selfAndDescendants.includes(c?.code),f=i.SituationConstants.InThePast.selfAndDescendants.includes(l?.code),m=i.SituationConstants.KnownAbsent.selfAndDescendants.includes(a?.code),g=i.SituationConstants.KnownPossible.selfAndDescendants.includes(a?.code),p=i.SituationConstants.CurrentOrSpecifiedTime.selfAndDescendants.includes(l?.code),b=i.SituationConstants.PersonInTheFamily.selfAndDescendants.includes(c?.code);u&&h&&f?i.updateFhirRepresentation(i.createFhirCondition(d,"inactive")):u&&h&&p?i.updateFhirRepresentation(i.createFhirCondition(d,"active")):g&&h&&p?i.updateFhirRepresentation(i.createFhirCondition(d,"unconfirmed")):u&&b?i.updateFhirRepresentation(i.createFamilyMemberHistoryForFinding(d,c)):m&&h&&p?i.updateFhirRepresentation(i.createFhirObservationForAbsentFinding(d)):i.fhirRepresentationString="No FHIR representation for this situation"}else i.fhirRepresentationString="No FHIR representation for this situation"})()}updateFhirRepresentation(e){this.fhirRepresentation=e,this.fhirRepresentationString=JSON.stringify(e,null,2)}findingWithExplicitContextSelected(e){e&&e.code&&this.convertSituationToFhir(e)}createFhirCondition(e,i){return this.resourceType="Condition",{resourceType:"Condition",subject:{reference:"Patient/1234"},clinicalStatus:{coding:[{system:"http://terminology.hl7.org/CodeSystem/condition-clinical",code:i}]},code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]}}}createFhirObservationForAbsentFinding(e){return this.resourceType="Observation",{resourceType:"Observation",subject:{reference:"Patient/1234"},status:"registered",code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]},valueCodeableConcept:{coding:[{system:"http://snomed.info/sct",code:"410516002",display:"Known absent"}]}}}createFamilyMemberHistoryForFinding(e,i){return this.resourceType="FamilyMemberHistory",{resourceType:"FamilyMemberHistory",status:"completed",patient:{reference:"Patient/1234"},relationship:{coding:[{system:"http://snomed.info/sct",code:i.code,display:i.display}]},condition:[{code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]}}]}}saveOutput(e){var i=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(i,`${this.selectedSituation.display}-fhir.json`)}copyOutputToClipboard(e){this.clipboard.copy(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(VS))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-situation-map"]],decls:17,vars:9,consts:[[1,"p-8"],[1,"flex","flex-wrap","gap-4"],[1,"w-1/3"],[1,"w-auto",3,"binding","selectionChange"],[1,"mt-8"],[4,"ngFor","ngForOf"],["class","mt-8",4,"ngIf"],[1,"flex-grow"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["href","javascript:void(0);",3,"click"],["mat-table","",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","targetCode"],["matColumnDef","targetDisplay"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["target","_blank",1,"flex","flex-row","align-middle","gap-2",3,"href"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h2"),k(2,"Consistent Context Representation for Situations with Explicit Context"),v(),_(3,"div",1)(4,"div",2)(5,"app-autocomplete-binding",3),z("selectionChange",function(s){return r.findingWithExplicitContextSelected(s)}),v(),_(6,"h3",4),k(7,"Examples"),v(),_(8,"ul"),A(9,GEe,3,1,"li",5),v(),A(10,eTe,15,4,"div",6),A(11,tTe,8,2,"div",6),v(),_(12,"div",7)(13,"div",8),A(14,nTe,5,0,"div",9),_(15,"textarea",10),k(16," "),v()()()()()),2&i&&(w(5),E("binding",r.situationsBinding),w(4),E("ngForOf",r.examples),w(1),E("ngIf",null==r.selectedSituation?null:r.selectedSituation.display),w(1),E("ngIf",r.resourceType),w(3),E("ngIf",r.fhirRepresentationString.length>15),w(1),E("options",us(8,iTe))("lang","json")("innerHTML",r.fhirRepresentationString,zd))},dependencies:[io,ri,Qy,Vs,co,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Og],styles:[".output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem;min-height:45rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}"]})}return n})(),oTe=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-context-main"]],decls:1,vars:0,template:function(i,r){1&i&&_e(0,"app-situation-map")},dependencies:[rTe]})}return n})();var sTe=Qr(627),aTe=Qr.n(sTe);let cTe=(()=>{class n{constructor(){this.filter=new(aTe())}transform(e){return e&&this.filter.clean(e)}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275pipe=Xr({name:"safeText",type:n,pure:!0})}return n})();function lTe(n,t){1&n&&_e(0,"mat-spinner",8)}function dTe(n,t){1&n&&(_(0,"th",20),k(1," Message "),v())}function uTe(n,t){if(1&n&&(_(0,"td",21),k(1),no(2,"safeText"),v()),2&n){const e=t.$implicit;w(1),it(" ",Va(2,1,e.message)," ")}}function hTe(n,t){1&n&&(_(0,"th",20),k(1," Score "),v())}function fTe(n,t){if(1&n&&(_(0,"td",21),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.score," ")}}function mTe(n,t){1&n&&(_(0,"th",20),k(1," Rounds "),v())}function pTe(n,t){if(1&n&&(_(0,"td",21),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.numberOfRounds," ")}}function gTe(n,t){1&n&&(_(0,"th",20),k(1," Difficulty "),v())}function _Te(n,t){if(1&n&&(_(0,"td",21),k(1),v()),2&n){const e=t.$implicit;w(1),it(" ",e.difficulty," ")}}function bTe(n,t){1&n&&(_(0,"th",20),k(1," Time Played "),v())}function vTe(n,t){if(1&n&&(_(0,"td",21),k(1),no(2,"elapsedTime"),v()),2&n){const e=t.$implicit;w(1),it(" ",Va(2,1,e.elapsed)," ")}}function yTe(n,t){1&n&&(_(0,"th",20),k(1," Date "),v())}function xTe(n,t){if(1&n&&(_(0,"td",21),k(1),no(2,"date"),v()),2&n){const e=t.$implicit;w(1),it(" ",Kd(2,1,e.date,"short")," ")}}function wTe(n,t){1&n&&_e(0,"tr",22)}function CTe(n,t){1&n&&_e(0,"tr",23)}function kTe(n,t){if(1&n&&(_(0,"div")(1,"table",9),zt(2,10),A(3,dTe,2,0,"th",11),A(4,uTe,3,3,"td",12),jt(),zt(5,13),A(6,hTe,2,0,"th",11),A(7,fTe,2,1,"td",12),jt(),zt(8,14),A(9,mTe,2,0,"th",11),A(10,pTe,2,1,"td",12),jt(),zt(11,15),A(12,gTe,2,0,"th",11),A(13,_Te,2,1,"td",12),jt(),zt(14,16),A(15,bTe,2,0,"th",11),A(16,vTe,3,3,"td",12),jt(),zt(17,17),A(18,yTe,2,0,"th",11),A(19,xTe,3,4,"td",12),jt(),A(20,wTe,1,0,"tr",18),A(21,CTe,1,0,"tr",19),v()()),2&n){const e=O();w(1),E("dataSource",e.dataSource),w(19),E("matHeaderRowDef",e.displayedColumns),w(1),E("matRowDefColumns",e.displayedColumns)}}const ETe=[{path:"",component:B8},{path:"allergies",component:B8},{path:"sandbox",component:i0e},{path:"prescription",component:r0e},{path:"questionnaires",component:dve},{path:"implementation-course/subset-validator",component:Nve},{path:"snoguess",component:$Ee},{path:"snoguess/scoreboard",component:(()=>{class n{constructor(e,i){this.firebaseService=e,this.router=i,this.displayedColumns=["message","difficulty","score","numberOfRounds","secondsPlayed","date"],this.dataSource=[],this.loadingScores=!1}ngOnInit(){this.loadScores()}loadScores(){this.loadingScores=!0,this.firebaseService.getScores().then(e=>{this.dataSource=e.map(i=>({...i,date:i.date?i.date.toDate():new Date})),this.loadingScores=!1})}backToGame(){this.router.navigate(["/snoguess"])}static#e=this.\u0275fac=function(i){return new(i||n)(y(qz),y(ro))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-scoreboard"]],decls:12,vars:4,consts:[[1,"flex","flex-col","items-center","gap-4","pt-6","snoguess-game"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/scoreboard.png","alt","High Scores",1,"w-1/4","mt-8"],[1,"mb-8","flex","flex-row","align-middle","gap-1"],[1,"diamond"],["diameter","50",4,"ngIf"],[4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],["diameter","50"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","message"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","score"],["matColumnDef","numberOfRounds"],["matColumnDef","difficulty"],["matColumnDef","secondsPlayed"],["matColumnDef","date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,r){1&i&&(_(0,"div",0),_e(1,"img",1)(2,"img",2),_(3,"div",3)(4,"span"),k(5,"Messages posted by playes who reached the Diamond trophy"),v(),_(6,"mat-icon",4),k(7,"emoji_events"),v()(),A(8,lTe,1,0,"mat-spinner",5),A(9,kTe,22,3,"div",6),_(10,"div",7),z("click",function(){return r.backToGame()}),k(11," Back to game "),v()()),2&i&&(w(2),E("@popIn",void 0),w(6),E("ngIf",r.loadingScores),w(1),E("ngIf",!r.loadingScores),w(1),E("@scrollUp",void 0))},dependencies:[ri,co,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,Jd,Qz,cTe],styles:[".diamond[_ngcontent-%COMP%]{color:#3b49c4}.snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[$n("shake",[Qt("normal => shake",Gt(200,Tf([ze({transform:"translateX(0)"}),ze({transform:"translateX(-10px)"}),ze({transform:"translateX(10px)"}),ze({transform:"translateX(0)"})])))]),$n("popIn",[Qt(":enter",[ze({transform:"scale(0.8)",opacity:0}),Gt("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1.3)",opacity:1})),Gt("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1)",opacity:1}))])]),$n("scrollUp",[Qt(":enter",[ze({transform:"translateY(100%)",opacity:0}),Gt("0.5s ease-out",ze({transform:"translateY(0)",opacity:1}))])]),$n("fadeInDelayed",[Qt(":enter",[ze({opacity:0}),Gt("1s 0.5s ease-out",ze({opacity:1}))])])]}})}return n})()},{path:"context",component:oTe},{path:"**",redirectTo:""}];let TTe=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=xt({type:n});static#n=this.\u0275inj=yt({imports:[xB.forRoot(ETe,{useHash:!0}),xB]})}return n})();const STe=[{title:"GROUP 1",description:"The first group of bindings in the coding demonstration",bindings:[{title:"Medicinal product + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, contain at least provided ingredientes (open world assuption), no information on form."},{title:"Gender",type:"dropdown",ecl:"< 365873007 |Gender finding (finding)|",value:"",note:"Patient gender."},{title:"Medicinal product form + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details."}]},{title:"GROUP 2",description:"The second group of bindings in the coding demonstration",bindings:[{title:"Medicinal product only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, containing only the provided ingredientes (close world assuption), with no information on form."},{title:"Medicinal product form only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 732943007 |Has basis of strength substance (attribute)| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details, containing only the provided ingredientes (close world assuption)."}]}];let DTe=(()=>{class n{constructor(){}getCodingSpec(){return STe}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Xt,Q_={version:"0.19.3"},vr=1200,ju=1252,ATe=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],MI={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},F1=function(n){-1!=ATe.indexOf(n)&&(ju=MI[0]=n)},js=function(n){vr=n,F1(n)};var K_=function(t){return String.fromCharCode(t)},RI=function(t){return String.fromCharCode(t)},Wi=null,Jz=!0,$s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function N1(n){for(var t="",e=0,i=0,r=0,o=0,s=0,a=0,c=0,l=0;l>2,s=(3&e)<<4|(i=n.charCodeAt(l++))>>4,a=(15&i)<<2|(r=n.charCodeAt(l++))>>6,c=63&r,isNaN(i)?a=c=64:isNaN(r)&&(c=64),t+=$s.charAt(o)+$s.charAt(s)+$s.charAt(a)+$s.charAt(c);return t}function xs(n){var t="",o=0,s=0,a=0,c=0;n=n.replace(/^data:([^\/]+\/[^\/]+)?;base64\,/,"").replace(/[^\w\+\/\=]/g,"");for(var l=0;l>4),64!==(a=$s.indexOf(n.charAt(l++)))&&(t+=String.fromCharCode((15&s)<<4|a>>2)),64!==(c=$s.indexOf(n.charAt(l++)))&&(t+=String.fromCharCode((3&a)<<6|c));return t}var rn=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),tc=function(){if(typeof Buffer<"u"){var n=!Buffer.from;if(!n)try{Buffer.from("foo","utf8")}catch{n=!0}return n?function(t,e){return e?new Buffer(t,e):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}(),X_=function(){if(typeof Buffer>"u")return!1;var n=tc([65,0]);return!!n&&1==n.toString("utf16le").length}();function _d(n){return rn?Buffer.alloc?Buffer.alloc(n):new Buffer(n):typeof Uint8Array<"u"?new Uint8Array(n):new Array(n)}function ej(n){return rn?Buffer.allocUnsafe?Buffer.allocUnsafe(n):new Buffer(n):typeof Uint8Array<"u"?new Uint8Array(n):new Array(n)}var Lo=function(t){return rn?tc(t,"binary"):t.split("").map(function(e){return 255&e.charCodeAt(0)})};function Y_(n){if(typeof ArrayBuffer>"u")return Lo(n);for(var t=new ArrayBuffer(n.length),e=new Uint8Array(t),i=0;i!=n.length;++i)e[i]=255&n.charCodeAt(i);return t}function nc(n){if(Array.isArray(n))return n.map(function(i){return String.fromCharCode(i)}).join("");for(var t=[],e=0;e=0;)t+=n.charAt(e--);return t}function xa(n,t){var e=""+n;return e.length>=t?e:In("0",t-e.length)+e}function PI(n,t){var e=""+n;return e.length>=t?e:In(" ",t-e.length)+e}function L1(n,t){var e=""+n;return e.length>=t?e:e+In(" ",t-e.length)}var tj=Math.pow(2,32);function Lm(n,t){return n>tj||n<-tj?function NTe(n,t){var e=""+Math.round(n);return e.length>=t?e:In("0",t-e.length)+e}(n,t):function LTe(n,t){var e=""+n;return e.length>=t?e:In("0",t-e.length)+e}(Math.round(n),t)}function B1(n,t){return n.length>=7+(t=t||0)&&103==(32|n.charCodeAt(t))&&101==(32|n.charCodeAt(t+1))&&110==(32|n.charCodeAt(t+2))&&101==(32|n.charCodeAt(t+3))&&114==(32|n.charCodeAt(t+4))&&97==(32|n.charCodeAt(t+5))&&108==(32|n.charCodeAt(t+6))}var nj=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],OI=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],kt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},ij={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},VTe={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function V1(n,t,e){for(var i=n<0?-1:1,r=n*i,o=0,s=1,a=0,c=1,l=0,d=0,u=Math.floor(r);lt&&(l>t?(d=c,a=o):(d=l,a=s)),!e)return[0,i*a,d];var h=Math.floor(i*a/d);return[h,i*a-h*d,d]}function bd(n,t,e){if(n>2958465||n<0)return null;var i=0|n,r=Math.floor(86400*(n-i)),o=0,s=[],a={D:i,T:r,u:86400*(n-i)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(a.u)<1e-6&&(a.u=0),t&&t.date1904&&(i+=1462),a.u>.9999&&(a.u=0,86400==++r&&(a.T=r=0,++i,++a.D)),60===i)s=e?[1317,10,29]:[1900,2,29],o=3;else if(0===i)s=e?[1317,8,29]:[1900,1,0],o=6;else{i>60&&--i;var c=new Date(1900,0,1);c.setDate(c.getDate()+i-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],o=c.getDay(),i<60&&(o=(o+6)%7),e&&(o=function GTe(n,t){t[0]-=581;var e=n.getDay();return n<60&&(e=(e+6)%7),e}(c,s))}return a.y=s[0],a.m=s[1],a.d=s[2],a.S=r%60,r=Math.floor(r/60),a.M=r%60,r=Math.floor(r/60),a.H=r,a.q=o,a}var rj=new Date(1899,11,31,0,0,0),UTe=rj.getTime(),HTe=new Date(1900,2,1,0,0,0);function oj(n,t){var e=n.getTime();return t?e-=1262304e5:n>=HTe&&(e+=864e5),(e-(UTe+6e4*(n.getTimezoneOffset()-rj.getTimezoneOffset())))/864e5}function NI(n){return-1==n.indexOf(".")?n:n.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function $u(n,t){switch(typeof n){case"string":return n;case"boolean":return n?"TRUE":"FALSE";case"number":return(0|n)===n?n.toString(10):function J_(n){var e,t=Math.floor(Math.log(Math.abs(n))*Math.LOG10E);return e=t>=-4&&t<=-1?n.toPrecision(10+t):Math.abs(t)<=9?function jTe(n){var t=n<0?12:11,e=NI(n.toFixed(12));return e.length<=t||(e=n.toPrecision(10)).length<=t?e:n.toExponential(5)}(n):10===t?n.toFixed(10).substr(0,12):function $Te(n){var t=NI(n.toFixed(11));return t.length>(n<0?12:11)||"0"===t||"-0"===t?n.toPrecision(6):t}(n),NI(function zTe(n){return-1==n.indexOf("E")?n:n.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(e.toUpperCase()))}(n);case"undefined":return"";case"object":if(null==n)return"";if(n instanceof Date)return Yo(14,oj(n,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+n)}function WTe(n,t,e,i){var c,r="",o=0,s=0,a=e.y,l=0;switch(n){case 98:a=e.y+543;case 121:switch(t.length){case 1:case 2:c=a%100,l=2;break;default:c=a%1e4,l=4}break;case 109:switch(t.length){case 1:case 2:c=e.m,l=t.length;break;case 3:return OI[e.m-1][1];case 5:return OI[e.m-1][0];default:return OI[e.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=e.d,l=t.length;break;case 3:return nj[e.q][0];default:return nj[e.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(e.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=e.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=e.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if("s"!=t&&"ss"!=t&&".0"!=t&&".00"!=t&&".000"!=t)throw"bad second format: "+t;return 0!==e.u||"s"!=t&&"ss"!=t?(s=i>=2?3===i?1e3:100:1===i?10:1,(o=Math.round(s*(e.S+e.u)))>=60*s&&(o=0),"s"===t?0===o?"0":""+o/s:(r=xa(o,2+i),"ss"===t?r.substr(0,2):"."+r.substr(2,t.length-1))):xa(e.S,t.length);case 90:switch(t){case"[h]":case"[hh]":c=24*e.D+e.H;break;case"[m]":case"[mm]":c=60*(24*e.D+e.H)+e.M;break;case"[s]":case"[ss]":c=60*(60*(24*e.D+e.H)+e.M)+Math.round(e.S+e.u);break;default:throw"bad abstime format: "+t}l=3===t.length?1:2;break;case 101:c=a,l=1}return l>0?xa(c,l):""}function nl(n){if(n.length<=3)return n;for(var e=n.length%3,i=n.substr(0,e);e!=n.length;e+=3)i+=(i.length>0?",":"")+n.substr(e,3);return i}var sj=/%/g;function aj(n,t){var e,i=n.indexOf("E")-n.indexOf(".")-1;if(n.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+aj(n,-t);var r=n.indexOf(".");-1===r&&(r=n.indexOf("E"));var o=Math.floor(Math.log(t)*Math.LOG10E)%r;if(o<0&&(o+=r),-1===(e=(t/Math.pow(10,o)).toPrecision(i+1+(r+o)%r)).indexOf("e")){var s=Math.floor(Math.log(t)*Math.LOG10E);for(-1===e.indexOf(".")?e=e.charAt(0)+"."+e.substr(1)+"E+"+(s-e.length+o):e+="E+"+(s-o);"0."===e.substr(0,2);)e=(e=e.charAt(0)+e.substr(2,r)+"."+e.substr(2+r)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");e=e.replace(/\+-/,"-")}e=e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(a,c,l,d){return c+l+d.substr(0,(r+o)%r)+"."+d.substr(o)+"E"})}else e=t.toExponential(i);return n.match(/E\+00$/)&&e.match(/e[+-]\d$/)&&(e=e.substr(0,e.length-1)+"0"+e.charAt(e.length-1)),n.match(/E\-/)&&e.match(/e\+/)&&(e=e.replace(/e\+/,"e")),e.replace("e","E")}var cj=/# (\?+)( ?)\/( ?)(\d+)/,lj=/^#*0*\.([0#]+)/,dj=/\).*[0#]/,uj=/\(###\) ###\\?-####/;function Bo(n){for(var e,t="",i=0;i!=n.length;++i)switch(e=n.charCodeAt(i)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(e)}return t}function hj(n,t){var e=Math.pow(10,t);return""+Math.round(n*e)/e}function fj(n,t){var e=n-Math.floor(n),i=Math.pow(10,t);return t<(""+Math.round(e*i)).length?0:Math.round(e*i)}function Gs(n,t,e){if(40===n.charCodeAt(0)&&!t.match(dj)){var i=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return e>=0?Gs("n",i,e):"("+Gs("n",i,-e)+")"}if(44===t.charCodeAt(t.length-1))return function QTe(n,t,e){for(var i=t.length-1;44===t.charCodeAt(i-1);)--i;return il(n,t.substr(0,i),e/Math.pow(10,3*(t.length-i)))}(n,t,e);if(-1!==t.indexOf("%"))return function qTe(n,t,e){var i=t.replace(sj,""),r=t.length-i.length;return il(n,i,e*Math.pow(10,2*r))+In("%",r)}(n,t,e);if(-1!==t.indexOf("E"))return aj(t,e);if(36===t.charCodeAt(0))return"$"+Gs(n,t.substr(" "==t.charAt(1)?2:1),e);var r,o,s,a,c=Math.abs(e),l=e<0?"-":"";if(t.match(/^00+$/))return l+Lm(c,t.length);if(t.match(/^[#?]+$/))return"0"===(r=Lm(e,0))&&(r=""),r.length>t.length?r:Bo(t.substr(0,t.length-r.length))+r;if(o=t.match(cj))return function KTe(n,t,e){var i=parseInt(n[4],10),r=Math.round(t*i),o=Math.floor(r/i),s=r-o*i,a=i;return e+(0===o?"":""+o)+" "+(0===s?In(" ",n[1].length+1+n[4].length):PI(s,n[1].length)+n[2]+"/"+n[3]+xa(a,n[4].length))}(o,c,l);if(t.match(/^#+0+$/))return l+Lm(c,t.length-t.indexOf("0"));if(o=t.match(lj))return r=hj(e,o[1].length).replace(/^([^\.]+)$/,"$1."+Bo(o[1])).replace(/\.$/,"."+Bo(o[1])).replace(/\.(\d*)$/,function(m,g){return"."+g+In("0",Bo(o[1]).length-g.length)}),-1!==t.indexOf("0.")?r:r.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),o=t.match(/^(0*)\.(#*)$/))return l+hj(c,o[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,o[1].length?"0.":".");if(o=t.match(/^#{1,3},##0(\.?)$/))return l+nl(Lm(c,0));if(o=t.match(/^#,##0\.([#0]*0)$/))return e<0?"-"+Gs(n,t,-e):nl(""+(Math.floor(e)+function YTe(n,t){return t<(""+Math.round((n-Math.floor(n))*Math.pow(10,t))).length?1:0}(e,o[1].length)))+"."+xa(fj(e,o[1].length),o[1].length);if(o=t.match(/^#,#*,#0/))return Gs(n,t.replace(/^#,#*,/,""),e);if(o=t.match(/^([0#]+)(\\?-([0#]+))+$/))return r=Nm(Gs(n,t.replace(/[\\-]/g,""),e)),s=0,Nm(Nm(t.replace(/\\/g,"")).replace(/[0#]/g,function(m){return s-2147483648?""+(n>=0?0|n:n-1|0):""+Math.floor(n)}(e)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(m){return"00,"+(m.length<3?xa(0,3-m.length):"")+m})+"."+xa(s,o[1].length);switch(t){case"###,##0.00":return Gs(n,"#,##0.00",e);case"###,###":case"##,###":case"#,###":var f=nl(Lm(c,0));return"0"!==f?l+f:"";case"###,###.00":return Gs(n,"###,##0.00",e).replace(/^0\./,".");case"#,###.00":return Gs(n,"#,##0.00",e).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function mj(n,t){var e,i=n.indexOf("E")-n.indexOf(".")-1;if(n.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+mj(n,-t);var r=n.indexOf(".");-1===r&&(r=n.indexOf("E"));var o=Math.floor(Math.log(t)*Math.LOG10E)%r;if(o<0&&(o+=r),!(e=(t/Math.pow(10,o)).toPrecision(i+1+(r+o)%r)).match(/[Ee]/)){var s=Math.floor(Math.log(t)*Math.LOG10E);-1===e.indexOf(".")?e=e.charAt(0)+"."+e.substr(1)+"E+"+(s-e.length+o):e+="E+"+(s-o),e=e.replace(/\+-/,"-")}e=e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(a,c,l,d){return c+l+d.substr(0,(r+o)%r)+"."+d.substr(o)+"E"})}else e=t.toExponential(i);return n.match(/E\+00$/)&&e.match(/e[+-]\d$/)&&(e=e.substr(0,e.length-1)+"0"+e.charAt(e.length-1)),n.match(/E\-/)&&e.match(/e\+/)&&(e=e.replace(/e\+/,"e")),e.replace("e","E")}function ic(n,t,e){if(40===n.charCodeAt(0)&&!t.match(dj)){var i=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return e>=0?ic("n",i,e):"("+ic("n",i,-e)+")"}if(44===t.charCodeAt(t.length-1))return function JTe(n,t,e){for(var i=t.length-1;44===t.charCodeAt(i-1);)--i;return il(n,t.substr(0,i),e/Math.pow(10,3*(t.length-i)))}(n,t,e);if(-1!==t.indexOf("%"))return function eSe(n,t,e){var i=t.replace(sj,""),r=t.length-i.length;return il(n,i,e*Math.pow(10,2*r))+In("%",r)}(n,t,e);if(-1!==t.indexOf("E"))return mj(t,e);if(36===t.charCodeAt(0))return"$"+ic(n,t.substr(" "==t.charAt(1)?2:1),e);var r,o,s,a,c=Math.abs(e),l=e<0?"-":"";if(t.match(/^00+$/))return l+xa(c,t.length);if(t.match(/^[#?]+$/))return r=""+e,0===e&&(r=""),r.length>t.length?r:Bo(t.substr(0,t.length-r.length))+r;if(o=t.match(cj))return function XTe(n,t,e){return e+(0===t?"":""+t)+In(" ",n[1].length+2+n[4].length)}(o,c,l);if(t.match(/^#+0+$/))return l+xa(c,t.length-t.indexOf("0"));if(o=t.match(lj))return r=(r=(""+e).replace(/^([^\.]+)$/,"$1."+Bo(o[1])).replace(/\.$/,"."+Bo(o[1]))).replace(/\.(\d*)$/,function(m,g){return"."+g+In("0",Bo(o[1]).length-g.length)}),-1!==t.indexOf("0.")?r:r.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),o=t.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,o[1].length?"0.":".");if(o=t.match(/^#{1,3},##0(\.?)$/))return l+nl(""+c);if(o=t.match(/^#,##0\.([#0]*0)$/))return e<0?"-"+ic(n,t,-e):nl(""+e)+"."+In("0",o[1].length);if(o=t.match(/^#,#*,#0/))return ic(n,t.replace(/^#,#*,/,""),e);if(o=t.match(/^([0#]+)(\\?-([0#]+))+$/))return r=Nm(ic(n,t.replace(/[\\-]/g,""),e)),s=0,Nm(Nm(t.replace(/\\/g,"")).replace(/[0#]/g,function(m){return s-1||"\\"==e&&"-"==n.charAt(t+1)&&"0#".indexOf(n.charAt(t+2))>-1););break;case"?":for(;n.charAt(++t)===e;);break;case"*":++t,(" "==n.charAt(t)||"*"==n.charAt(t))&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t-1;);break;default:++t}return!1}var gj=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function _j(n,t){if(null==t)return!1;var e=parseFloat(t[2]);switch(t[1]){case"=":if(n==e)return!0;break;case">":if(n>e)return!0;break;case"<":if(n":if(n!=e)return!0;break;case">=":if(n>=e)return!0;break;case"<=":if(n<=e)return!0}return!1}function Yo(n,t,e){null==e&&(e={});var i="";switch(typeof n){case"string":i="m/d/yy"==n&&e.dateNF?e.dateNF:n;break;case"number":null==(i=14==n&&e.dateNF?e.dateNF:(null!=e.table?e.table:kt)[n])&&(i=e.table&&e.table[ij[n]]||kt[ij[n]]),null==i&&(i=VTe[n]||"General")}if(B1(i,0))return $u(t,e);t instanceof Date&&(t=oj(t,e.date1904));var r=function iSe(n,t){var e=function tSe(n){for(var t=[],e=!1,i=0,r=0;i-1&&--i,e.length>4)throw new Error("cannot find right format for |"+e.join("|")+"|");if("number"!=typeof t)return[4,4===e.length||r>-1?e[e.length-1]:"@"];switch(e.length){case 1:e=r>-1?["General","General","General",e[0]]:[e[0],e[0],e[0],"@"];break;case 2:e=r>-1?[e[0],e[0],e[0],e[1]]:[e[0],e[1],e[0],"@"];break;case 3:e=r>-1?[e[0],e[1],e[0],e[2]]:[e[0],e[1],e[2],"@"]}var o=t>0?e[0]:t<0?e[1]:e[2];if(-1===e[0].indexOf("[")&&-1===e[1].indexOf("["))return[i,o];if(null!=e[0].match(/\[[=<>]/)||null!=e[1].match(/\[[=<>]/)){var s=e[0].match(gj),a=e[1].match(gj);return _j(t,s)?[i,e[0]]:_j(t,a)?[i,e[1]]:[i,e[null!=s&&null!=a?2:1]]}return[i,o]}(i,t);if(B1(r[1]))return $u(t,e);if(!0===t)t="TRUE";else if(!1===t)t="FALSE";else if(""===t||null==t)return"";return function nSe(n,t,e,i){for(var l,d,u,r=[],o="",s=0,a="",c="t",h="H";s=12?n.charAt(s+2):a),g.t="T",h="h",s+=3):"AM/PM"===n.substr(s,5).toUpperCase()?(null!=l&&(g.v=l.H>=12?"PM":"AM"),g.t="T",s+=5,h="h"):"\u4e0a\u5348/\u4e0b\u5348"===n.substr(s,5).toUpperCase()?(null!=l&&(g.v=l.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),g.t="T",s+=5,h="h"):(g.t="t",++s),null==l&&"T"===g.t)return"";r[r.length]=g,c=a;break;case"[":for(o=a;"]"!==n.charAt(s++)&&s-1&&(o=(o.match(/\$([^-\[\]]*)/)||[])[1]||"$",vd(n)||(r[r.length]={t:"t",v:o}));break;case".":if(null!=l){for(o=a;++s-1;)o+=a;r[r.length]={t:"n",v:o};break;case"?":for(o=a;n.charAt(++s)===a;)o+=a;r[r.length]={t:a,v:o},c=a;break;case"*":++s,(" "==n.charAt(s)||"*"==n.charAt(s))&&++s;break;case"(":case")":r[r.length]={t:1===i?"t":a,v:a},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(o=a;s-1;)o+=n.charAt(s);r[r.length]={t:"D",v:o};break;case" ":r[r.length]={t:a,v:a},++s;break;case"$":r[r.length]={t:"t",v:"$"},++s;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(a))throw new Error("unrecognized character "+a+" in "+n);r[r.length]={t:"t",v:a},++s}var C,p=0,b=0;for(s=r.length-1,c="t";s>=0;--s)switch(r[s].t){case"h":case"H":r[s].t=h,c="h",p<1&&(p=1);break;case"s":(C=r[s].v.match(/\.0+$/))&&(b=Math.max(b,C[0].length-1)),p<3&&(p=3);case"d":case"y":case"M":case"e":c=r[s].t;break;case"m":"s"===c&&(r[s].t="M",p<2&&(p=2));break;case"X":break;case"Z":p<1&&r[s].v.match(/[Hh]/)&&(p=1),p<2&&r[s].v.match(/[Mm]/)&&(p=2),p<3&&r[s].v.match(/[Ss]/)&&(p=3)}switch(p){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M)}var D,x="";for(s=0;s0){40==x.charCodeAt(0)?(P=t<0&&45===x.charCodeAt(0)?-t:t,S=il("n",x,P)):(S=il("n",x,P=t<0&&i>1?-t:t),P<0&&r[0]&&"t"==r[0].t&&(S=S.substr(1),r[0].v="-"+r[0].v)),D=S.length-1;var U=r.length;for(s=0;s-1){U=s;break}var V=r.length;if(U===r.length&&-1===S.indexOf("E")){for(s=r.length-1;s>=0;--s)null==r[s]||-1==="n?".indexOf(r[s].t)||(D>=r[s].v.length-1?r[s].v=S.substr(1+(D-=r[s].v.length),r[s].v.length):D<0?r[s].v="":(r[s].v=S.substr(0,D+1),D=-1),r[s].t="t",V=s);D>=0&&V=0;--s)if(null!=r[s]&&-1!=="n?".indexOf(r[s].t)){for(d=r[s].v.indexOf(".")>-1&&s===U?r[s].v.indexOf(".")-1:r[s].v.length-1,j=r[s].v.substr(d+1);d>=0;--d)D>=0&&("0"===r[s].v.charAt(d)||"#"===r[s].v.charAt(d))&&(j=S.charAt(D--)+j);r[s].v=j,r[s].t="t",V=s}for(D>=0&&V-1&&s===U?r[s].v.indexOf(".")+1:0,j=r[s].v.substr(0,d);d-1&&(r[s].v=il(r[s].t,r[s].v,P=i>1&&t<0&&s>0&&"-"===r[s-1].v?-t:t),r[s].t="t");var q="";for(s=0;s!==r.length;++s)null!=r[s]&&(q+=r[s].v);return q}(r[1],t,e,r[0])}function LI(n,t){if("number"!=typeof t){t=+t||-1;for(var e=0;e<392;++e)if(null!=kt[e]){if(kt[e]==n){t=e;break}}else t<0&&(t=e);t<0&&(t=391)}return kt[t]=n,t}function e0(n){for(var t=0;392!=t;++t)void 0!==n[t]&&LI(n[t],t)}function Bm(){kt=function BTe(n){return n||(n={}),n[0]="General",n[1]="0",n[2]="0.00",n[3]="#,##0",n[4]="#,##0.00",n[9]="0%",n[10]="0.00%",n[11]="0.00E+00",n[12]="# ?/?",n[13]="# ??/??",n[14]="m/d/yy",n[15]="d-mmm-yy",n[16]="d-mmm",n[17]="mmm-yy",n[18]="h:mm AM/PM",n[19]="h:mm:ss AM/PM",n[20]="h:mm",n[21]="h:mm:ss",n[22]="m/d/yy h:mm",n[37]="#,##0 ;(#,##0)",n[38]="#,##0 ;[Red](#,##0)",n[39]="#,##0.00;(#,##0.00)",n[40]="#,##0.00;[Red](#,##0.00)",n[45]="mm:ss",n[46]="[h]:mm:ss",n[47]="mmss.0",n[48]="##0.0E+0",n[49]="@",n[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',n}()}var vj=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,aSe={"d.m":"d\\.m"};function yd(n,t){return LI(aSe[n]||n,t)}var rl,yj=function(){var n={version:"1.2.0"},e=function t(){for(var S=0,U=new Array(256),V=0;256!=V;++V)U[V]=S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=V)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1;return typeof Int32Array<"u"?new Int32Array(U):U}(),r=function i(S){var U=0,V=0,q=0,J=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(q=0;256!=q;++q)J[q]=S[q];for(q=0;256!=q;++q)for(V=S[q],U=256+q;U<4096;U+=256)V=J[U]=V>>>8^S[255&V];var G=[];for(q=1;16!=q;++q)G[q-1]=typeof Int32Array<"u"&&"function"==typeof J.subarray?J.subarray(256*q,256*q+256):J.slice(256*q,256*q+256);return G}(e),o=r[0],s=r[1],a=r[2],c=r[3],l=r[4],d=r[5],u=r[6],h=r[7],f=r[8],m=r[9],g=r[10],p=r[11],b=r[12],C=r[13],x=r[14];return n.table=e,n.bstr=function D(S,U){for(var V=-1^U,q=0,J=S.length;q>>8^e[255&(V^S.charCodeAt(q++))];return~V},n.buf=function j(S,U){for(var V=-1^U,q=S.length-15,J=0;J>8&255]^b[S[J++]^V>>16&255]^p[S[J++]^V>>>24]^g[S[J++]]^m[S[J++]]^f[S[J++]]^h[S[J++]]^u[S[J++]]^d[S[J++]]^l[S[J++]]^c[S[J++]]^a[S[J++]]^s[S[J++]]^o[S[J++]]^e[S[J++]];for(q+=15;J>>8^e[255&(V^S[J++])];return~V},n.str=function P(S,U){for(var V=-1^U,q=0,J=S.length,G=0,ve=0;q>>8^e[255&(V^G)]:G<2048?V=(V=V>>>8^e[255&(V^(192|G>>6&31))])>>>8^e[255&(V^(128|63&G))]:G>=55296&&G<57344?(G=64+(1023&G),ve=1023&S.charCodeAt(q++),V=(V=(V=(V=V>>>8^e[255&(V^(240|G>>8&7))])>>>8^e[255&(V^(128|G>>2&63))])>>>8^e[255&(V^(128|ve>>6&15|(3&G)<<4))])>>>8^e[255&(V^(128|63&ve))]):V=(V=(V=V>>>8^e[255&(V^(224|G>>12&15))])>>>8^e[255&(V^(128|G>>6&63))])>>>8^e[255&(V^(128|63&G))];return~V},n}(),wt=function(){var c,t={};function i(T){if("/"==T.charAt(T.length-1))return-1===T.slice(0,-1).indexOf("/")?T:i(T.slice(0,-1));var N=T.lastIndexOf("/");return-1===N?T:T.slice(0,N+1)}function r(T){if("/"==T.charAt(T.length-1))return r(T.slice(0,-1));var N=T.lastIndexOf("/");return-1===N?T:T.slice(N+1)}function o(T,N){"string"==typeof N&&(N=new Date(N));var I=N.getHours();I=(I=I<<6|N.getMinutes())<<5|N.getSeconds()>>>1,T.write_shift(2,I);var R=N.getFullYear()-1980;R=(R=R<<4|N.getMonth()+1)<<5|N.getDate(),T.write_shift(2,R)}function a(T){xr(T,0);for(var N={},I=0;T.l<=T.length-4;){var R=T.read_shift(2),L=T.read_shift(2),B=T.l+L,te={};switch(R){case 21589:1&(I=T.read_shift(1))&&(te.mtime=T.read_shift(4)),L>5&&(2&I&&(te.atime=T.read_shift(4)),4&I&&(te.ctime=T.read_shift(4))),te.mtime&&(te.mt=new Date(1e3*te.mtime));break;case 1:var ue=T.read_shift(4),ee=T.read_shift(4);te.usz=ee*Math.pow(2,32)+ue,ue=T.read_shift(4),ee=T.read_shift(4),te.csz=ee*Math.pow(2,32)+ue}T.l=B,N[R]=te}return N}function l(){return c||(c=rl)}function d(T,N){if(80==T[0]&&75==T[1])return gq(T,N);if(109==(32|T[0])&&105==(32|T[1]))return function f5e(T,N){if("mime-version:"!=le(T.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var I=N&&N.root||"",R=(rn&&Buffer.isBuffer(T)?T.toString("binary"):le(T)).split("\r\n"),L=0,B="";for(L=0;L0&&(I=(I=I.slice(0,I.length-1)).slice(0,I.lastIndexOf("/")+1),B.slice(0,I.length)!=I););var te=(R[1]||"").match(/boundary="(.*?)"/);if(!te)throw new Error("MAD cannot find boundary");var ue="--"+(te[1]||""),ie={FileIndex:[],FullPaths:[]};S(ie);var Fe,Oe=0;for(L=0;L=L&&(Oe-=L),!te[Oe]){ee=[];var He=[];for(Fe=Oe;Fe>=0;){He[Fe]=!0,te[Fe]=!0,ue[ue.length]=Fe,ee.push(T[Fe]);var Re=I[Math.floor(4*Fe/R)];if(R<4+(ut=4*Fe&ne))throw new Error("FAT boundary crossed: "+Fe+" 4 "+R);if(!T[Re]||He[Fe=qu(T[Re],ut)])break}B[Oe]={nodes:ue,data:zj([ee])}}return B}(Ht,te,ne,R);te0&&ue!==ve&&(di[ue].name="!MiniFAT"),di[ne[0]].name="!FAT",di.fat_addrs=ne,di.ssz=R;var dr=[],Ts=[],H0=[];(function x(T,N,I,R,L,B,te,ue){for(var ut,ee=0,ne=R.length?2:0,ie=N[T].data,Fe=0,Oe=0;Fe0&&ee!==ve&&(N[ee].name="!StreamData")):Re.size>=4096?(Re.storage="fat",void 0===N[Re.start]&&(N[Re.start]=b(I,Re.start,N.fat_addrs,N.ssz)),N[Re.start].name=Re.name,Re.content=N[Re.start].data.slice(0,Re.size)):(Re.storage="minifat",Re.size<0?Re.size=0:ee!==ve&&Re.start!==ve&&N[ee]&&(Re.content=g(Re,N[ee].data,(N[ue]||{}).data))),Re.content&&xr(Re.content,0),B[ut]=Re,te.push(Re)}})(te,di,Ht,dr,L,{},Ts,ue),function m(T,N,I){for(var R=0,L=0,B=0,te=0,ue=0,ee=I.length,ne=[],ie=[];R0&&te>=0;)B.push(N.slice(te*G,te*G+G)),L-=G,te=qu(I,4*te);return 0===B.length?se(0):rr(B).slice(0,T.size)}function p(T,N,I,R,L){var B=ve;if(T===ve){if(0!==N)throw new Error("DIFAT chain shorter than expected")}else if(-1!==T){var te=I[T],ue=(R>>>2)-1;if(!te)return;for(var ee=0;ee=1&&p(qu(te,R-4),N-1,I,R,L)}}function b(T,N,I,R,L){var B=[],te=[];L||(L=[]);var ue=R-1,ee=0,ne=0;for(ee=N;ee>=0;){L[ee]=!0,B[B.length]=ee,te.push(T[ee]);var ie=I[Math.floor(4*ee/R)];if(R<4+(ne=4*ee&ue))throw new Error("FAT boundary crossed: "+ee+" 4 "+R);if(!T[ie])break;ee=qu(T[ie],ne)}return{nodes:B,data:zj([te])}}function D(T,N){return new Date(1e3*(Fr(T,N+4)/1e7*Math.pow(2,32)+Fr(T,N)/1e7-11644473600))}function S(T,N){var I=N||{},R=I.root||"Root Entry";if(T.FullPaths||(T.FullPaths=[]),T.FileIndex||(T.FileIndex=[]),T.FullPaths.length!==T.FileIndex.length)throw new Error("inconsistent CFB structure");0===T.FullPaths.length&&(T.FullPaths[0]=R+"/",T.FileIndex[0]={name:R,type:5}),I.CLSID&&(T.FileIndex[0].clsid=I.CLSID),function U(T){var N="\x01Sh33tJ5";if(!wt.find(T,"/"+N)){var I=se(4);I[0]=55,I[1]=I[3]=50,I[2]=54,T.FileIndex.push({name:N,type:2,content:I,size:4,L:69,R:69,C:69}),T.FullPaths.push(T.FullPaths[0]+N),V(T)}}(T)}function V(T,N){S(T);for(var I=!1,R=!1,L=T.FullPaths.length-1;L>=0;--L){var B=T.FileIndex[L];switch(B.type){case 0:R?I=!0:(T.FileIndex.pop(),T.FullPaths.pop());break;case 1:case 2:case 5:R=!0,isNaN(B.R*B.L*B.C)&&(I=!0),B.R>-1&&B.L>-1&&B.R==B.L&&(I=!0);break;default:I=!0}}if(I||N){var te=new Date(1987,1,19),ue=0,ee=Object.create?Object.create(null):{},ne=[];for(L=0;L1?1:-1,Fe.size=0,Fe.type=5;else if("/"==Oe.slice(-1)){for(ue=L+1;ue=ne.length?-1:ue,ue=L+1;ue=ne.length?-1:ue,Fe.type=1}else i(T.FullPaths[L+1]||"")==i(Oe)&&(Fe.R=L+1),Fe.type=2}}}function q(T,N){var I=N||{};if("mad"==I.fileType)return function m5e(T,N){for(var I=N||{},R=I.boundary||"SheetJS",L=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(R="------="+R).slice(2)+'"',"","",""],B=T.FullPaths[0],te=B,ue=T.FileIndex[0],ee=1;ee=32&&ut<128&&++Fe;var Re=Fe>=4*Oe/5;L.push(R),L.push("Content-Location: "+(I.root||"file:///C:/SheetJS/")+te),L.push("Content-Transfer-Encoding: "+(Re?"quoted-printable":"base64")),L.push("Content-Type: "+c5e(ue,te)),L.push(""),L.push(Re?d5e(ie):l5e(ie))}return L.push(R+"--\r\n"),L.join("\r\n")}(T,I);if("zip"===(V(T),I.fileType))return function a5e(T,N){var I=N||{},R=[],L=[],B=se(1),te=I.compression?8:0,ue=0,ne=0,ie=0,Fe=0,Oe=0,ut=T.FullPaths[0],He=ut,Re=T.FileIndex[0],Ht=[],di=0;for(ne=1;ne0&&(ts<4096?He+=ts+63>>6:Re+=ts+511>>9)}}for(var dr=ut.FullPaths.length+3>>2,H0=He+127>>7,z0=(He+7>>3)+Re+dr+H0,hh=z0+127>>7,vR=hh<=109?0:Math.ceil((hh-109)/127);z0+hh+vR+127>>7>hh;)vR=++hh<=109?0:Math.ceil((hh-109)/127);var fl=[1,vR,hh,H0,dr,Re,He,0];return ut.FileIndex[0].size=He<<6,fl[7]=(ut.FileIndex[0].start=fl[0]+fl[1]+fl[2]+fl[3]+fl[4]+fl[5])+(fl[6]+7>>3),fl}(T),L=se(R[7]<<9),B=0,te=0;for(B=0;B<8;++B)L.write_shift(1,me[B]);for(B=0;B<8;++B)L.write_shift(2,0);for(L.write_shift(2,62),L.write_shift(2,3),L.write_shift(2,65534),L.write_shift(2,9),L.write_shift(2,6),B=0;B<3;++B)L.write_shift(2,0);for(L.write_shift(4,0),L.write_shift(4,R[2]),L.write_shift(4,R[0]+R[1]+R[2]+R[3]-1),L.write_shift(4,0),L.write_shift(4,4096),L.write_shift(4,R[3]?R[0]+R[1]+R[2]-1:ve),L.write_shift(4,R[3]),L.write_shift(-4,R[1]?R[0]-1:ve),L.write_shift(4,R[1]),B=0;B<109;++B)L.write_shift(-4,B>9));for(ue(R[6]+7>>3);511&L.l;)L.write_shift(-4,Y.ENDOFCHAIN);for(te=B=0,ee=0;ee=4096)&&(ie.start=te,ue(ne+63>>6));for(;511&L.l;)L.write_shift(-4,Y.ENDOFCHAIN);for(B=0;B32&&(console.error("Name "+Oe+" will be truncated to "+Oe.slice(0,32)),Oe=Oe.slice(0,32)),ne=2*(Oe.length+1),L.write_shift(64,Oe,"utf16le"),L.write_shift(2,ne),L.write_shift(1,ie.type),L.write_shift(1,ie.color),L.write_shift(-4,ie.L),L.write_shift(-4,ie.R),L.write_shift(-4,ie.C),ie.clsid)L.write_shift(16,ie.clsid,"hex");else for(ee=0;ee<4;++ee)L.write_shift(4,0);L.write_shift(4,ie.state||0),L.write_shift(4,0),L.write_shift(4,0),L.write_shift(4,0),L.write_shift(4,0),L.write_shift(4,ie.start),L.write_shift(4,ie.size),L.write_shift(4,0)}else{for(ee=0;ee<17;++ee)L.write_shift(4,0);for(ee=0;ee<3;++ee)L.write_shift(4,-1);for(ee=0;ee<12;++ee)L.write_shift(4,0)}}for(B=1;B=4096)if(L.l=ie.start+1<<9,rn&&Buffer.isBuffer(ie.content))ie.content.copy(L,L.l,0,ie.size),L.l+=ie.size+511&-512;else{for(ee=0;ee0&&ie.size<4096)if(rn&&Buffer.isBuffer(ie.content))ie.content.copy(L,L.l,0,ie.size),L.l+=ie.size+63&-64;else{for(ee=0;ee>16|N>>8|N));function M(T,N){var I=Ue[255&T];return N<=8?I>>>8-N:(I=I<<8|Ue[T>>8&255],N<=16?I>>>16-N:(I=I<<8|Ue[T>>16&255])>>>24-N)}function Rt(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=6?0:T[R+1]<<8))>>>I&3}function Cn(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=5?0:T[R+1]<<8))>>>I&7}function dn(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=3?0:T[R+1]<<8))>>>I&31}function wi(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=1?0:T[R+1]<<8))>>>I&127}function Fn(T,N,I){var R=7&N,L=N>>>3,te=T[L]>>>R;return I<8-R||(te|=T[L+1]<<8-R,I<16-R)||(te|=T[L+2]<<16-R,I<24-R)||(te|=T[L+3]<<24-R),te&(1<>>3;return R<=5?T[L]|=(7&I)<>8-R),N+3}function qe(T,N,I){return T[N>>>3]|=I=(1&I)<<(7&N),N+1}function Co(T,N,I){var L=N>>>3;return T[L]|=255&(I<<=7&N),T[L+1]=I>>>=8,N+8}function Mn(T,N,I){var L=N>>>3;return T[L]|=255&(I<<=7&N),T[L+1]=255&(I>>>=8),T[L+2]=I>>>8,N+16}function Zn(T,N){var I=T.length,R=2*I>N?2*I:N+5,L=0;if(I>=N)return T;if(rn){var B=ej(R);if(T.copy)T.copy(B);else for(;L>R-Fe,te=(1<=0;--te)N[ue|te<0;)ee[ee.l++]=ue[ne++]}return ee.l}(ee,ne):function te(ue,ee){for(var ne=0,ie=0,Fe=Ce?new Uint16Array(32768):[];ie0;)ee[ee.l++]=ue[ie++];ne=8*ee.l}else{ne=mt(ee,ne,+(ie+Oe==ue.length)+2);for(var ut=0;Oe-- >0;){var He=ue[ie],Re=-1,Ht=0;if((Re=Fe[ut=32767&(ut<<5^He)])&&((Re|=-32768&ie)>ie&&(Re-=32768),Re2){(He=L[Ht])<=22?ne=Co(ee,ne,Ue[He+1]>>1)-1:(Co(ee,ne,3),Co(ee,ne+=5,Ue[He-23]>>5),ne+=3);var di=He<8?0:He-4>>2;di>0&&(Mn(ee,ne,Ht-W[He]),ne+=di),ne=Co(ee,ne,Ue[He=N[ie-Re]]>>3),ne-=3;var ts=He<4?0:He-2>>1;ts>0&&(Mn(ee,ne,ie-Re-H[He]),ne+=ts);for(var dr=0;dr>>3;return(T[R]|(I<=4?0:T[R+1]<<8))>>>I&15}(T,N+=5)+4;N+=4;for(var B=0,te=Ce?new Uint8Array(19):Uo(19),ue=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ee=1,ne=Ce?new Uint8Array(8):Uo(8),ie=Ce?new Uint8Array(8):Uo(8),Fe=te.length,Oe=0;Oe>8-He;for(var Re=(1<<7-He)-1;Re>=0;--Re)Er[ut|Re<>>=3){case 16:for(B=3+Rt(T,N),N+=2,ut=Ht[Ht.length-1];B-- >0;)Ht.push(ut);break;case 17:for(B=3+Cn(T,N),N+=3;B-- >0;)Ht.push(0);break;case 18:for(B=11+wi(T,N),N+=7;B-- >0;)Ht.push(0);break;default:Ht.push(ut),ee>>0,ue=0,ee=0;!(1&R);)if(R=Cn(T,I),I+=3,R>>>1)for(R>>1==1?(ue=9,ee=5):(I=r5e(T,I),ue=uh,ee=fq);;){!N&&te>>1==1?Md[ie]:Xi[ie];if(I+=15&Fe,(Fe>>>=4)>>>8&255){if(256==Fe)break;var Oe=(Fe-=257)<8?0:Fe-4>>2;Oe>5&&(Oe=0);var ut=B+W[Fe];Oe>0&&(ut+=Fn(T,I,Oe),I+=Oe),ie=Fn(T,I,ee),I+=15&(Fe=R>>>1==1?U0[ie]:Js[ie]);var He=(Fe>>>=4)<4?0:Fe-2>>1,Re=H[Fe];for(He>0&&(Re+=Fn(T,I,He),I+=He),!N&&te>>3]|T[1+(I>>>3)]<<8;if(I+=32,ne>0)for(!N&&te0;)L[B++]=T[I>>>3],I+=8}return N?[L,I+7>>>3]:[L.slice(0,B),I+7>>>3]}(T.slice(T.l||0),N);return T.l+=R[1],R[0]}function pq(T,N){if(!T)throw new Error(N);typeof console<"u"&&console.error(N)}function gq(T,N){var I=T;xr(I,0);var B={FileIndex:[],FullPaths:[]};S(B,{root:N.root});for(var te=I.length-4;(80!=I[te]||75!=I[te+1]||5!=I[te+2]||6!=I[te+3])&&te>=0;)--te;I.l=te+4,I.l+=4;var ue=I.read_shift(2);I.l+=6;var ee=I.read_shift(4);for(I.l=ee,te=0;te>>=5);I>>>=4,R.setMilliseconds(0),R.setFullYear(I+1980),R.setMonth(B-1),R.setDate(L);var te=31&N,ue=63&(N>>>=5);return R.setHours(N>>>=6),R.setMinutes(ue),R.setSeconds(te<<1),R}(T);if(8257&B)throw new Error("Unsupported ZIP encryption");T.read_shift(4);for(var ne=T.read_shift(4),ie=T.read_shift(4),Fe=T.read_shift(2),Oe=T.read_shift(2),ut="",He=0;He"u")throw new Error("Unsupported");return new Uint8Array(n)}(n):n}function t0(n,t,e){if(typeof rl<"u"&&rl.writeFileSync)return e?rl.writeFileSync(n,t,e):rl.writeFileSync(n,t);if(typeof Deno<"u"){if(e&&"string"==typeof t)switch(e){case"utf8":t=new TextEncoder(e).encode(t);break;case"binary":t=Y_(t);break;default:throw new Error("Unsupported encoding "+e)}return Deno.writeFileSync(n,t)}var i="utf8"==e?rc(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(i,n);if(typeof Blob<"u"){var r=new Blob([lSe(i)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(r,n);if(typeof saveAs<"u")return saveAs(r,n);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var o=URL.createObjectURL(r);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(o)},6e4),chrome.downloads.download({url:o,filename:n,saveAs:!0});var s=document.createElement("a");if(null!=s.download)return s.download=n,s.href=o,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(o)},6e4),o}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var a=File(n);return a.open("w"),a.encoding="binary",Array.isArray(t)&&(t=nc(t)),a.write(t),a.close(),t}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+n)}function yi(n){for(var t=Object.keys(n),e=[],i=0;i0?e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3):t<0&&e.setTime(e.getTime()-60*e.getTimezoneOffset()*1e3),e;if(n instanceof Date)return n;if(1917==Ej.getFullYear()&&!isNaN(e.getFullYear())){var i=e.getFullYear();return n.indexOf(""+i)>-1||e.setFullYear(e.getFullYear()+100),e}var r=n.match(/\d+/g)||["2017","2","19","0","0","0"],o=new Date(+r[0],+r[1]-1,+r[2],+r[3]||0,+r[4]||0,+r[5]||0);return n.indexOf("Z")>-1&&(o=new Date(o.getTime()-60*o.getTimezoneOffset()*1e3)),o}function Gu(n,t){if(rn&&Buffer.isBuffer(n)){if(t&&X_){if(255==n[0]&&254==n[1])return rc(n.slice(2).toString("utf16le"));if(254==n[1]&&255==n[2])return rc(function Zz(n){for(var t=[],e=0;e>1;++e)t[e]=String.fromCharCode(n.charCodeAt(2*e+1)+(n.charCodeAt(2*e)<<8));return t.join("")}(n.slice(2).toString("binary")))}return n.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(255==n[0]&&254==n[1])return rc(new TextDecoder("utf-16le").decode(n.slice(2)));if(254==n[0]&&255==n[1])return rc(new TextDecoder("utf-16be").decode(n.slice(2)))}var e={"\u20ac":"\x80","\u201a":"\x82",\u0192:"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87",\u02c6:"\x88","\u2030":"\x89",\u0160:"\x8a","\u2039":"\x8b",\u0152:"\x8c",\u017d:"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99",\u0161:"\x9a","\u203a":"\x9b",\u0153:"\x9c",\u017e:"\x9e",\u0178:"\x9f"};return Array.isArray(n)&&(n=new Uint8Array(n)),new TextDecoder("latin1").decode(n).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,function(o){return e[o]||o})}catch{}for(var i=[],r=0;r!=n.length;++r)i.push(String.fromCharCode(n[r]));return i.join("")}function qn(n){if(typeof JSON<"u"&&!Array.isArray(n))return JSON.parse(JSON.stringify(n));if("object"!=typeof n||null==n)return n;if(n instanceof Date)return new Date(n.getTime());var t={};for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=qn(n[e]));return t}function In(n,t){for(var e="";e.length3&&-1==_Se.indexOf(t))return o}else if(t.replace(/[ap]m?/,"").match(/[a-z]/))return o;return s<0||s>8099||n.match(/[^-0-9:,\/\\]/)?o:r}function Jt(n,t,e){if(n.FullPaths){var i;if("string"==typeof e)return i=rn?tc(e):function OTe(n){for(var t=[],e=0,i=n.length+250,r=_d(n.length+255),o=0;o>6&31,r[e++]=128|63&s;else if(s>=55296&&s<57344){s=64+(1023&s);var a=1023&n.charCodeAt(++o);r[e++]=240|s>>8&7,r[e++]=128|s>>2&63,r[e++]=128|a>>6&15|(3&s)<<4,r[e++]=128|63&a}else r[e++]=224|s>>12&15,r[e++]=128|s>>6&63,r[e++]=128|63&s;e>i&&(t.push(r.slice(0,e)),e=0,r=_d(65535),i=65530)}return t.push(r.slice(0,e)),rr(t)}(e),wt.utils.cfb_add(n,t,i);wt.utils.cfb_add(n,t,e)}else n.file(t,e)}function VI(){return wt.utils.cfb_new()}var qi='\r\n',UI=U1({""":'"',"'":"'",">":">","<":"<","&":"&"}),HI=/[&<>'"]/g,kSe=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function en(n){return(n+"").replace(HI,function(e){return UI[e]}).replace(kSe,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}function Fj(n){return en(n).replace(/ /g,"_x0020_")}var Pj=/[\u0000-\u001f]/g;function $1(n){return(n+"").replace(HI,function(e){return UI[e]}).replace(/\n/g,"
").replace(Pj,function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"})}function zI(n){for(var t="",e=0,i=0,r=0,o=0,s=0,a=0;e191&&i<224?(s=(31&i)<<6,s|=63&r,t+=String.fromCharCode(s)):(o=n.charCodeAt(e++),i<240?t+=String.fromCharCode((15&i)<<12|(63&r)<<6|63&o):(a=((7&i)<<18|(63&r)<<12|(63&o)<<6|63&(s=n.charCodeAt(e++)))-65536,t+=String.fromCharCode(55296+(a>>>10&1023)),t+=String.fromCharCode(56320+(1023&a)))));return t}function Nj(n){var e,i,a,t=_d(2*n.length),r=1,o=0,s=0;for(i=0;i>>10&1023),e=56320+(1023&e)),0!==s&&(t[o++]=255&s,t[o++]=s>>>8,s=0),t[o++]=e%256,t[o++]=e>>>8;return t.slice(0,o).toString("ucs2")}function Lj(n){return tc(n,"binary").toString("utf8")}var G1="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",Kn=rn&&(Lj(G1)==zI(G1)&&Lj||Nj(G1)==zI(G1)&&Nj)||zI,rc=rn?function(n){return tc(n,"utf8").toString("binary")}:function(n){for(var t=[],e=0,i=0,r=0;e>6))),t.push(String.fromCharCode(128+(63&i)));break;case i>=55296&&i<57344:i-=55296,r=n.charCodeAt(e++)-56320+(i<<10),t.push(String.fromCharCode(240+(r>>18&7))),t.push(String.fromCharCode(144+(r>>12&63))),t.push(String.fromCharCode(128+(r>>6&63))),t.push(String.fromCharCode(128+(63&r)));break;default:t.push(String.fromCharCode(224+(i>>12))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(63&i)))}return t.join("")},Uj=/(^\s|\s$|\n)/;function qr(n,t){return"<"+n+(t.match(Uj)?' xml:space="preserve"':"")+">"+t+""}function o0(n){return yi(n).map(function(t){return" "+t+'="'+n[t]+'"'}).join("")}function Pe(n,t,e){return"<"+n+(null!=e?o0(e):"")+(null!=t?(t.match(Uj)?' xml:space="preserve"':"")+">"+t+""}function jI(n,t){try{return n.toISOString().replace(/\.\d*/,"")}catch(e){if(t)throw e}return""}var yr={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Wu=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],Cs={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"},Hj=function(n){for(var t=[],i=0;i0&&Buffer.isBuffer(n[0][0])?Buffer.concat(n[0].map(function(t){return Buffer.isBuffer(t)?t:tc(t)})):Hj(n)}:Hj,jj=function(n,t,e){for(var i=[],r=t;r0?Um(n,t+4,t+4+e-1):""},$I=qj,Qj=function(n,t){var e=Fr(n,t);return e>0?Um(n,t+4,t+4+e-1):""},GI=Qj,Kj=function(n,t){var e=2*Fr(n,t);return e>0?Um(n,t+4,t+4+e-1):""},WI=Kj,Xj=function(t,e){var i=Fr(t,e);return i>0?q1(t,e+4,e+4+i):""},qI=Xj,Yj=function(n,t){var e=Fr(n,t);return e>0?Um(n,t+4,t+4+e):""},QI=Yj,Zj=function(n,t){return function MSe(n,t){for(var e=1-2*(n[t+7]>>>7),i=((127&n[t+7])<<4)+(n[t+6]>>>4&15),r=15&n[t+6],o=5;o>=0;--o)r=256*r+n[t+o];return 2047==i?0==r?e*(1/0):NaN:(0==i?i=-1022:(i-=1023,r+=Math.pow(2,52)),e*Math.pow(2,i-52)*r)}(n,t)},Q1=Zj,KI=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};rn&&($I=function(t,e){if(!Buffer.isBuffer(t))return qj(t,e);var i=t.readUInt32LE(e);return i>0?t.toString("utf8",e+4,e+4+i-1):""},GI=function(t,e){if(!Buffer.isBuffer(t))return Qj(t,e);var i=t.readUInt32LE(e);return i>0?t.toString("utf8",e+4,e+4+i-1):""},WI=function(t,e){if(!Buffer.isBuffer(t)||!X_)return Kj(t,e);var i=2*t.readUInt32LE(e);return t.toString("utf16le",e+4,e+4+i-1)},qI=function(t,e){if(!Buffer.isBuffer(t)||!X_)return Xj(t,e);var i=t.readUInt32LE(e);return t.toString("utf16le",e+4,e+4+i)},QI=function(t,e){if(!Buffer.isBuffer(t))return Yj(t,e);var i=t.readUInt32LE(e);return t.toString("utf8",e+4,e+4+i)},Q1=function(t,e){return Buffer.isBuffer(t)?t.readDoubleLE(e):Zj(t,e)},KI=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array}),typeof Xt<"u"&&function Jj(){q1=function(n,t,e){return Xt.utils.decode(1200,n.slice(t,e)).replace(po,"")},Um=function(n,t,e){return Xt.utils.decode(65001,n.slice(t,e))},$I=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(ju,n.slice(t+4,t+4+e-1)):""},GI=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(vr,n.slice(t+4,t+4+e-1)):""},WI=function(n,t){var e=2*Fr(n,t);return e>0?Xt.utils.decode(1200,n.slice(t+4,t+4+e-1)):""},qI=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(1200,n.slice(t+4,t+4+e)):""},QI=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(65001,n.slice(t+4,t+4+e)):""}}();var Hm=function(n,t){return n[t]},ol=function(n,t){return 256*n[t+1]+n[t]},FSe=function(n,t){var e=256*n[t+1]+n[t];return e<32768?e:-1*(65535-e+1)},Fr=function(n,t){return n[t+3]*(1<<24)+(n[t+2]<<16)+(n[t+1]<<8)+n[t]},qu=function(n,t){return n[t+3]<<24|n[t+2]<<16|n[t+1]<<8|n[t]},PSe=function(n,t){return n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3]};function s0(n,t){var i,r,s,a,c,l,e="",o=[];switch(t){case"dbcs":if(l=this.l,rn&&Buffer.isBuffer(this)&&X_)e=this.slice(this.l,this.l+2*n).toString("utf16le");else for(c=0;c0?qu:PSe)(this,this.l),this.l+=4,i);case 8:case-8:if("f"===t)return r=8==n?Q1(this,this.l):Q1([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,r;n=8;case 16:e=Gj(this,this.l,n)}}return this.l+=n,e}var OSe=function(n,t,e){n[e]=255&t,n[e+1]=t>>>8&255,n[e+2]=t>>>16&255,n[e+3]=t>>>24&255},NSe=function(n,t,e){n[e]=255&t,n[e+1]=t>>8&255,n[e+2]=t>>16&255,n[e+3]=t>>24&255},LSe=function(n,t,e){n[e]=255&t,n[e+1]=t>>>8&255};function BSe(n,t,e){var i=0,r=0;if("dbcs"===e){for(r=0;r!=t.length;++r)LSe(this,t.charCodeAt(r),this.l+2*r);i=2*t.length}else if("sbcs"===e||"cpstr"==e)if(typeof Xt<"u"&&874==ju){for(r=0;r!=t.length;++r){var o=Xt.utils.encode(ju,t.charAt(r));this[this.l+r]=o[0]}i=t.length}else if(typeof Xt<"u"&&"cpstr"==e){if((o=Xt.utils.encode(vr,t)).length==t.length)for(r=0;r>8}for(;this.l>>=8);break;case 3:i=3,this[this.l]=255&t,this[this.l+1]=255&(t>>>=8),this[this.l+2]=255&(t>>>=8);break;case 4:i=4,OSe(this,t,this.l);break;case 8:if(i=8,"f"===e){!function RSe(n,t,e){var i=(t<0||1/t==-1/0?1:0)<<7,r=0,o=0,s=i?-t:t;isFinite(s)?0==s?r=o=0:(r=Math.floor(Math.log(s)/Math.LN2),o=s*Math.pow(2,52-r),r<=-1023&&(!isFinite(o)||o>4|i}(this,t,this.l);break}case 16:break;case-4:i=4,NSe(this,t,this.l)}}return this.l+=i,this}function e$(n,t){var e=Gj(this,this.l,n.length>>1);if(e!==n)throw new Error(t+"Expected "+n+" saw "+e);this.l+=n.length>>1}function xr(n,t){n.l=t,n.read_shift=s0,n.chk=e$,n.write_shift=BSe}function _o(n,t){n.l+=t}function se(n){var t=_d(n);return xr(t,0),t}function Jo(){var n=[],t=rn?256:2048,e=function(l){var d=se(l);return xr(d,0),d},i=e(t),r=function(){i&&(i.l&&(i.length>i.l&&((i=i.slice(0,i.l)).l=i.length),i.length>0&&n.push(i)),i=null)},o=function(l){return i&&l=128?1:0)+1,i>=128&&++o,i>=16384&&++o,i>=2097152&&++o;var s=n.next(o);r<=127?s.write_shift(1,r):(s.write_shift(1,128+(127&r)),s.write_shift(1,r>>7));for(var a=0;4!=a;++a){if(!(i>=128)){s.write_shift(1,i);break}s.write_shift(1,128+(127&i)),i>>=7}i>0&&KI(e)&&n.push(e)}}function a0(n,t,e){var i=qn(n);if(t.s?(i.cRel&&(i.c+=t.s.c),i.rRel&&(i.r+=t.s.r)):(i.cRel&&(i.c+=t.c),i.rRel&&(i.r+=t.r)),!e||e.biff<12){for(;i.c>=256;)i.c-=256;for(;i.r>=65536;)i.r-=65536}return i}function t$(n,t,e){var i=qn(n);return i.s=a0(i.s,t.s,e),i.e=a0(i.e,t.s,e),i}function c0(n,t){if(n.cRel&&n.c<0)for(n=qn(n);n.c<0;)n.c+=t>8?16384:256;if(n.rRel&&n.r<0)for(n=qn(n);n.r<0;)n.r+=t>8?1048576:t>5?65536:16384;var e=ln(n);return!n.cRel&&null!=n.cRel&&(e=function HSe(n){return n.replace(/^([A-Z])/,"$$$1")}(e)),!n.rRel&&null!=n.rRel&&(e=function VSe(n){return n.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(e)),e}function XI(n,t){return 0!=n.s.r||n.s.rRel||n.e.r!=(t.biff>=12?1048575:t.biff>=8?65536:16384)||n.e.rRel?0!=n.s.c||n.s.cRel||n.e.c!=(t.biff>=12?16383:255)||n.e.cRel?c0(n.s,t.biff)+":"+c0(n.e,t.biff):(n.s.rRel?"":"$")+yn(n.s.r)+":"+(n.e.rRel?"":"$")+yn(n.e.r):(n.s.cRel?"":"$")+on(n.s.c)+":"+(n.e.cRel?"":"$")+on(n.e.c)}function YI(n){return parseInt(function USe(n){return n.replace(/\$(\d+)$/,"$1")}(n),10)-1}function yn(n){return""+(n+1)}function ZI(n){for(var t=function zSe(n){return n.replace(/^\$([A-Z])/,"$1")}(n),e=0,i=0;i!==t.length;++i)e=26*e+t.charCodeAt(i)-64;return e-1}function on(n){if(n<0)throw new Error("invalid column "+n);var t="";for(++n;n;n=Math.floor((n-1)/26))t=String.fromCharCode((n-1)%26+65)+t;return t}function zn(n){for(var t=0,e=0,i=0;i=48&&r<=57?t=10*t+(r-48):r>=65&&r<=90&&(e=26*e+(r-64))}return{c:e-1,r:t-1}}function ln(n){for(var t=n.c+1,e="";t;t=(t-1)/26|0)e=String.fromCharCode((t-1)%26+65)+e;return e+(n.r+1)}function wr(n){var t=n.indexOf(":");return-1==t?{s:zn(n),e:zn(n)}:{s:zn(n.slice(0,t)),e:zn(n.slice(t+1))}}function Wt(n,t){return typeof t>"u"||"number"==typeof t?Wt(n.s,n.e):("string"!=typeof n&&(n=ln(n)),"string"!=typeof t&&(t=ln(t)),n==t?n:n+":"+t)}function l0(n){var t=wr(n);return"$"+on(t.s.c)+"$"+yn(t.s.r)+":$"+on(t.e.c)+"$"+yn(t.e.r)}function d0(n,t){if(!(n||t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(n)?"'"+n.replace(/'/g,"''")+"'":n}function xn(n){var t={s:{c:0,r:0},e:{c:0,r:0}},e=0,i=0,r=0,o=n.length;for(e=0;i26);++i)e=26*e+r;for(t.s.c=--e,e=0;i9);++i)e=10*e+r;if(t.s.r=--e,i===o||10!=r)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++i,e=0;i!=o&&!((r=n.charCodeAt(i)-64)<1||r>26);++i)e=26*e+r;for(t.e.c=--e,e=0;i!=o&&!((r=n.charCodeAt(i)-48)<0||r>9);++i)e=10*e+r;return t.e.r=--e,t}function oc(n,t,e){return null==n||null==n.t||"z"==n.t?"":void 0!==n.w?n.w:("d"==n.t&&!n.z&&e&&e.dateNF&&(n.z=e.dateNF),"e"==n.t?al[n.v]||n.v:function n$(n,t){var e="d"==n.t&&t instanceof Date;if(null!=n.z)try{return n.w=Yo(n.z,e?or(t):t)}catch{}try{return n.w=Yo((n.XF||{}).numFmtId||(e?14:0),e?or(t):t)}catch{return""+t}}(n,null==t?n.v:t))}function xd(n,t){var e=t&&t.sheet?t.sheet:"Sheet1",i={};return i[e]=n,{SheetNames:[e],Sheets:i}}function i$(n,t,e){var i=e||{},r=n?null!=n["!data"]:i.dense;null!=Wi&&null==r&&(r=Wi);var o=n||{};r&&!o["!data"]&&(o["!data"]=[]);var s=0,a=0;if(o&&null!=i.origin){if("number"==typeof i.origin)s=i.origin;else{var c="string"==typeof i.origin?zn(i.origin):i.origin;s=c.r,a=c.c}o["!ref"]||(o["!ref"]="A1:A1")}var l={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(o["!ref"]){var d=xn(o["!ref"]);l.s.c=d.s.c,l.s.r=d.s.r,l.e.c=Math.max(l.e.c,d.e.c),l.e.r=Math.max(l.e.r,d.e.r),-1==s&&(l.e.r=s=d.e.r+1)}for(var u=[],h=0;h!=t.length;++h)if(t[h]){if(!Array.isArray(t[h]))throw new Error("aoa_to_sheet expects an array of arrays");var f=s+h,m=""+(f+1);r&&(o["!data"][f]||(o["!data"][f]=[]),u=o["!data"][f]);for(var g=0;g!=t[h].length;++g)if(!(typeof t[h][g]>"u")){var p={v:t[h][g]},b=a+g;if(l.s.r>f&&(l.s.r=f),l.s.c>b&&(l.s.c=b),l.e.r0&&t.write_shift(0,n,"dbcs"),e?t.slice(0,t.l):t}function GSe(n){return{ich:n.read_shift(2),ifnt:n.read_shift(2)}}function JI(n,t){var e=n.l,i=n.read_shift(1),r=bo(n),o=[],s={t:r,h:r};if(1&i){for(var a=n.read_shift(4),c=0;c!=a;++c)o.push(GSe(n));s.r=o}else s.r=[{ich:0,ifnt:0}];return n.l=e+t,s}var QSe=JI;function qs(n){var t=n.read_shift(4),e=n.read_shift(2);return e+=n.read_shift(1)<<16,n.l++,{c:t,iStyleRef:e}}function Qu(n,t){return null==t&&(t=se(8)),t.write_shift(-4,n.c),t.write_shift(3,n.iStyleRef||n.s),t.write_shift(1,0),t}function Ku(n){var t=n.read_shift(2);return t+=n.read_shift(1)<<16,n.l++,{c:-1,iStyleRef:t}}function Xu(n,t){return null==t&&(t=se(4)),t.write_shift(3,n.iStyleRef||n.s),t.write_shift(1,0),t}var XSe=bo,r$=Cr;function eM(n){var t=n.read_shift(4);return 0===t||4294967295===t?"":n.read_shift(t,"dbcs")}function u0(n,t){var e=!1;return null==t&&(e=!0,t=se(127)),t.write_shift(4,n.length>0?n.length:4294967295),n.length>0&&t.write_shift(0,n,"dbcs"),e?t.slice(0,t.l):t}var YSe=bo,tM=eM,nM=u0;function iM(n){var t=n.slice(n.l,n.l+4),e=1&t[0],i=2&t[0];n.l+=4;var r=0===i?Q1([0,0,0,0,252&t[0],t[1],t[2],t[3]],0):qu(t,0)>>2;return e?r/100:r}function o$(n,t){null==t&&(t=se(4));var e=0,i=0,r=100*n;if(n==(0|n)&&n>=-(1<<29)&&n<1<<29?i=1:r==(0|r)&&r>=-(1<<29)&&r<1<<29&&(i=1,e=1),!i)throw new Error("unsupported RkNumber "+n);t.write_shift(-4,((e?r:n)<<2)+(e+2))}function s$(n){var t={s:{},e:{}};return t.s.r=n.read_shift(4),t.e.r=n.read_shift(4),t.s.c=n.read_shift(4),t.e.c=n.read_shift(4),t}var Yu=s$,jm=function ZSe(n,t){return t||(t=se(16)),t.write_shift(4,n.s.r),t.write_shift(4,n.e.r),t.write_shift(4,n.s.c),t.write_shift(4,n.e.c),t};function vo(n){if(n.length-n.l<8)throw"XLS Xnum Buffer underflow";return n.read_shift(8,"f")}function Zu(n,t){return(t||se(8)).write_shift(8,n,"f")}function K1(n,t){if(t||(t=se(8)),!n||n.auto)return t.write_shift(4,0),t.write_shift(4,0),t;null!=n.index?(t.write_shift(1,2),t.write_shift(1,n.index)):null!=n.theme?(t.write_shift(1,6),t.write_shift(1,n.theme)):(t.write_shift(1,5),t.write_shift(1,0));var e=n.tint||0;if(e>0?e*=32767:e<0&&(e*=32768),t.write_shift(2,e),n.rgb&&null==n.theme){var i=n.rgb||"FFFFFF";"number"==typeof i&&(i=("000000"+i.toString(16)).slice(-6)),t.write_shift(1,parseInt(i.slice(0,2),16)),t.write_shift(1,parseInt(i.slice(2,4),16)),t.write_shift(1,parseInt(i.slice(4,6),16)),t.write_shift(1,255)}else t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);return t}var oM={1:{n:"CodePage",t:2},2:{n:"Category",t:80},3:{n:"PresentationFormat",t:80},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:80},15:{n:"Company",t:80},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:80},27:{n:"ContentStatus",t:80},28:{n:"Language",t:80},29:{n:"Version",t:80},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},sM={1:{n:"CodePage",t:2},2:{n:"Title",t:80},3:{n:"Subject",t:80},4:{n:"Author",t:80},5:{n:"Keywords",t:80},6:{n:"Comments",t:80},7:{n:"Template",t:80},8:{n:"LastAuthor",t:80},9:{n:"RevNumber",t:80},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:80},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}};function dDe(n){return n.map(function(t){return[t>>16&255,t>>8&255,255&t]})}var Ju=qn(dDe([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),al={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},aM={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},cM=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],lM={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},J1={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function u$(n,t,e){var o,i=function uSe(n){for(var t=[],e=yi(n),i=0;i!==e.length;++i)null==t[n[e[i]]]&&(t[n[e[i]]]=[]),t[n[e[i]]].push(e[i]);return t}(lM),r=[];e||(r[r.length]=qi,r[r.length]=Pe("Types",null,{xmlns:yr.CT,"xmlns:xsd":yr.xsd,"xmlns:xsi":yr.xsi}),r=r.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(l){return Pe("Default",null,{Extension:l[0],ContentType:l[1]})})));var s=function(l){n[l]&&n[l].length>0&&(r[r.length]=Pe("Override",null,{PartName:("/"==(o=n[l][0])[0]?"":"/")+o,ContentType:J1[l][t.bookType]||J1[l].xlsx}))},a=function(l){(n[l]||[]).forEach(function(d){r[r.length]=Pe("Override",null,{PartName:("/"==d[0]?"":"/")+d,ContentType:J1[l][t.bookType]||J1[l].xlsx})})},c=function(l){(n[l]||[]).forEach(function(d){r[r.length]=Pe("Override",null,{PartName:("/"==d[0]?"":"/")+d,ContentType:i[l][0]})})};return s("workbooks"),a("sheets"),a("charts"),c("themes"),["strs","styles"].forEach(s),["coreprops","extprops","custprops"].forEach(c),c("vba"),c("comments"),c("threadedcomments"),c("drawings"),a("metadata"),c("people"),!e&&r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var tn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function h0(n){var t=n.lastIndexOf("/");return n.slice(0,t+1)+"_rels/"+n.slice(t+1)+".rels"}function $m(n){var t=[qi,Pe("Relationships",null,{xmlns:yr.RELS})];return yi(n["!id"]).forEach(function(e){t[t.length]=Pe("Relationship",null,n["!id"][e])}),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}function Xn(n,t,e,i,r,o){if(r||(r={}),n["!id"]||(n["!id"]={}),n["!idx"]||(n["!idx"]=1),t<0)for(t=n["!idx"];n["!id"]["rId"+t];++t);if(n["!idx"]=t+1,r.Id="rId"+t,r.Type=i,r.Target=e,o?r.TargetMode=o:[tn.HLINK,tn.XPATH,tn.XMISS].indexOf(r.Type)>-1&&(r.TargetMode="External"),n["!id"][r.Id])throw new Error("Cannot rewrite rId "+t);return n["!id"][r.Id]=r,n[("/"+r.Target).replace("//","/")]=r,t}function h$(n,t,e){return[' \n',' \n'," \n"].join("")}function gDe(n,t){return[' \n',' \n'," \n"].join("")}function f$(n,t){return'SheetJS '+Q_.version+""}var Qs=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function uM(n,t,e,i,r){null!=r[n]||null==t||""===t||(r[n]=t,t=en(t),i[i.length]=e?Pe(n,t,e):qr(n,t))}function p$(n,t){var e=t||{},i=[qi,Pe("cp:coreProperties",null,{"xmlns:cp":yr.CORE_PROPS,"xmlns:dc":yr.dc,"xmlns:dcterms":yr.dcterms,"xmlns:dcmitype":yr.dcmitype,"xmlns:xsi":yr.xsi})],r={};if(!n&&!e.Props)return i.join("");n&&(null!=n.CreatedDate&&uM("dcterms:created","string"==typeof n.CreatedDate?n.CreatedDate:jI(n.CreatedDate,e.WTF),{"xsi:type":"dcterms:W3CDTF"},i,r),null!=n.ModifiedDate&&uM("dcterms:modified","string"==typeof n.ModifiedDate?n.ModifiedDate:jI(n.ModifiedDate,e.WTF),{"xsi:type":"dcterms:W3CDTF"},i,r));for(var o=0;o!=Qs.length;++o){var s=Qs[o],a=e.Props&&null!=e.Props[s[1]]?e.Props[s[1]]:n?n[s[1]]:null;!0===a?a="1":!1===a?a="0":"number"==typeof a&&(a=String(a)),null!=a&&uM(s[0],a,null,i,r)}return i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}var eh=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],g$=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function b$(n){var t=[],e=Pe;return n||(n={}),n.Application="SheetJS",t[t.length]=qi,t[t.length]=Pe("Properties",null,{xmlns:yr.EXT_PROPS,"xmlns:vt":yr.vt}),eh.forEach(function(i){if(void 0!==n[i[1]]){var r;switch(i[2]){case"string":r=en(String(n[i[1]]));break;case"bool":r=n[i[1]]?"true":"false"}void 0!==r&&(t[t.length]=e(i[0],r))}}),t[t.length]=e("HeadingPairs",e("vt:vector",e("vt:variant","Worksheets")+e("vt:variant",e("vt:i4",String(n.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=e("TitlesOfParts",e("vt:vector",n.SheetNames.map(function(i){return""+en(i)+""}).join(""),{size:n.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}function v$(n){var t=[qi,Pe("Properties",null,{xmlns:yr.CUST_PROPS,"xmlns:vt":yr.vt})];if(!n)return t.join("");var e=1;return yi(n).forEach(function(r){++e,t[t.length]=Pe("property",function ISe(n,t){switch(typeof n){case"string":var e=Pe("vt:lpwstr",en(n));return t&&(e=e.replace(/"/g,"_x0022_")),e;case"number":return Pe((0|n)==n?"vt:i4":"vt:r8",en(String(n)));case"boolean":return Pe("vt:bool",n?"true":"false")}if(n instanceof Date)return Pe("vt:filetime",jI(n));throw new Error("Unable to serialize "+n)}(n[r],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e,name:en(r)})}),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}var hM={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function E$(n,t){var e=se(4),i=se(4);switch(e.write_shift(4,80==n?31:n),n){case 3:i.write_shift(-4,t);break;case 5:(i=se(8)).write_shift(8,t,"f");break;case 11:i.write_shift(4,t?1:0);break;case 64:i=function EDe(n){var e=("string"==typeof n?new Date(Date.parse(n)):n).getTime()/1e3+11644473600,i=e%Math.pow(2,32),r=(e-i)/Math.pow(2,32);r*=1e7;var o=(i*=1e7)/Math.pow(2,32)|0;o>0&&(i%=Math.pow(2,32),r+=o);var s=se(8);return s.write_shift(4,i),s.write_shift(4,r),s}(t);break;case 31:case 80:for((i=se(4+2*(t.length+1)+(t.length%2?0:2))).write_shift(4,t.length+1),i.write_shift(0,t,"dbcs");i.l!=i.length;)i.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+n+" "+t)}return rr([e,i])}var S$=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function RDe(n){switch(typeof n){case"boolean":return 11;case"number":return(0|n)==n?3:5;case"string":return 31;case"object":if(n instanceof Date)return 64}return-1}function D$(n,t,e){var i=se(8),r=[],o=[],s=8,a=0,c=se(8),l=se(8);if(c.write_shift(4,2),c.write_shift(4,1200),l.write_shift(4,1),o.push(c),r.push(l),s+=8+c.length,!t){(l=se(8)).write_shift(4,0),r.unshift(l);var d=[se(4)];for(d[0].write_shift(4,n.length),a=0;a-1||g$.indexOf(n[a][0])>-1)&&null!=n[a][1]){var h=n[a][1],f=0;if(t){var m=e[f=+t[n[a][0]]];if("version"==m.p&&"string"==typeof h){var g=h.split(".");h=(+g[0]<<16)+(+g[1]||0)}c=E$(m.t,h)}else{var p=RDe(h);-1==p&&(p=31,h=String(h)),c=E$(p,h)}o.push(c),(l=se(8)).write_shift(4,t?f:2+a),r.push(l),s+=8+c.length}var b=8*(o.length+1);for(a=0;a=12?2:1),r="sbcs-cont",o=vr;e&&e.biff>=8&&(vr=1200),e&&8!=e.biff?12==e.biff&&(r="wstr"):n.read_shift(1)&&(r="dbcs-cont"),e.biff>=2&&e.biff<=5&&(r="cpstr");var a=i?n.read_shift(i,r):"";return vr=o,a}function LDe(n){var t=n.t||"",i=se(3);i.write_shift(2,t.length),i.write_shift(1,1);var r=se(2*t.length);return r.write_shift(2*t.length,t,"utf16le"),rr([i,r])}function F$(n,t,e){return e||(e=se(3+2*n.length)),e.write_shift(2,n.length),e.write_shift(1,1),e.write_shift(31,n,"utf16le"),e}function P$(n,t){t||(t=se(6+2*n.length)),t.write_shift(4,1+n.length);for(var e=0;e-1?31:23;switch(i.charAt(0)){case"#":o=28;break;case".":o&=-3}t.write_shift(4,2),t.write_shift(4,o);var s=[8,6815827,6619237,4849780,83];for(e=0;e-1?i.slice(0,r):i;for(t.write_shift(4,2*(a.length+1)),e=0;e-1?i.slice(r+1):"",t)}else{for(s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),e=0;e8?4:2;return[n.read_shift(i),n.read_shift(i,"i"),n.read_shift(i,"i")]}function nw(n){var t=n.read_shift(2),e=n.read_shift(2);return{s:{c:n.read_shift(2),r:t},e:{c:n.read_shift(2),r:e}}}function B$(n,t){return t||(t=se(8)),t.write_shift(2,n.s.r),t.write_shift(2,n.e.r),t.write_shift(2,n.s.c),t.write_shift(2,n.e.c),t}function gM(n,t,e){var i=1536,r=16;switch(e.bookType){case"biff8":case"xla":break;case"biff5":i=1280,r=8;break;case"biff4":i=4,r=6;break;case"biff3":i=3,r=6;break;case"biff2":i=2,r=4;break;default:throw new Error("unsupported BIFF version")}var o=se(r);return o.write_shift(2,i),o.write_shift(2,t),r>4&&o.write_shift(2,29282),r>6&&o.write_shift(2,1997),r>8&&(o.write_shift(2,49161),o.write_shift(2,1),o.write_shift(2,1798),o.write_shift(2,0)),o}function r2e(n,t){var e=!t||t.biff>=8?2:1,i=se(8+e*n.name.length);i.write_shift(4,n.pos),i.write_shift(1,n.hs||0),i.write_shift(1,n.dt),i.write_shift(1,n.name.length),t.biff>=8&&i.write_shift(1,1),i.write_shift(e*n.name.length,n.name,t.biff<8?"sbcs":"utf16le");var r=i.slice(0,i.l);return r.l=i.l,r}function C2e(n,t,e,i){var r=e&&5==e.biff;i||(i=se(r?3+t.length:5+2*t.length)),i.write_shift(2,n),i.write_shift(r?1:2,t.length),r||i.write_shift(1,1),i.write_shift((r?1:2)*t.length,t,r?"sbcs":"utf16le");var o=i.length>i.l?i.slice(0,i.l):i;return null==o.l&&(o.l=o.length),o}function j$(n,t,e,i){var r=e&&5==e.biff;i||(i=se(r?16:20)),i.write_shift(2,0),n.style?(i.write_shift(2,n.numFmtId||0),i.write_shift(2,65524)):(i.write_shift(2,n.numFmtId||0),i.write_shift(2,t<<4));var o=0;return n.numFmtId>0&&r&&(o|=1024),i.write_shift(4,o),i.write_shift(4,0),r||i.write_shift(4,0),i.write_shift(2,0),i}function K2e(n){var t=se(24),e=zn(n[0]);t.write_shift(2,e.r),t.write_shift(2,e.r),t.write_shift(2,e.c),t.write_shift(2,e.c);for(var i="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<16;++r)t.write_shift(1,parseInt(i[r],16));return rr([t,jDe(n[1])])}function Y2e(n){var t=n[1].Tooltip,e=se(10+2*(t.length+1));e.write_shift(2,2048);var i=zn(n[0]);e.write_shift(2,i.r),e.write_shift(2,i.r),e.write_shift(2,i.c),e.write_shift(2,i.c);for(var r=0;r1048576&&(g=1e6),2!=u&&(p=d.read_shift(2));var b=d.read_shift(2),C=c.codepage||1252;2!=u&&(d.l+=16,d.read_shift(1),0!==d[d.l]&&(C=n[d[d.l]]),d.l+=1,d.l+=2),m&&(d.l+=36);for(var x=[],D={},j=Math.min(d.length,2==u?521:p-10-(f?264:0)),P=m?32:11;d.l0;)if(42!==d[d.l])for(++d.l,l[++S]=[],U=0,U=0;U!=x.length;++U){var V=d.slice(d.l,d.l+x[U].len);d.l+=x[U].len,xr(V,0);var q=typeof Xt<"u"?Xt.utils.decode(C,V):nc(V);switch(x[U].type){case"C":q.trim().length&&(l[S][U]=q.replace(/\s+$/,""));break;case"D":l[S][U]=8===q.length?new Date(+q.slice(0,4),+q.slice(4,6)-1,+q.slice(6,8)):q;break;case"F":l[S][U]=parseFloat(q.trim());break;case"+":case"I":l[S][U]=m?2147483648^V.read_shift(-4,"i"):V.read_shift(4,"i");break;case"L":switch(q.trim().toUpperCase()){case"Y":case"T":l[S][U]=!0;break;case"N":case"F":l[S][U]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+q+"|")}break;case"M":if(!h)throw new Error("DBF Unexpected MEMO for type "+u.toString(16));l[S][U]="##MEMO##"+(m?parseInt(q.trim(),10):V.read_shift(4));break;case"N":(q=q.replace(/\u0000/g,"").trim())&&"."!=q&&(l[S][U]=+q||0);break;case"@":l[S][U]=new Date(V.read_shift(-8,"f")-621356832e5);break;case"T":l[S][U]=new Date(864e5*(V.read_shift(4)-2440588)+V.read_shift(4));break;case"Y":l[S][U]=V.read_shift(4,"i")/1e4+V.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":l[S][U]=-V.read_shift(-8,"f");break;case"B":if(f&&8==x[U].len){l[S][U]=V.read_shift(8,"f");break}case"G":case"P":V.l+=x[U].len;break;case"0":if("_NullFlags"===x[U].name)break;default:throw new Error("DBF Unsupported data type "+x[U].type)}}else d.l+=b;if(2!=u&&d.l=0&&js(+l.codepage),"string"==l.type)throw new Error("Cannot write DBF to JS string");var u=Jo(),h=bw(a,{header:1,raw:!0,cellDates:!0}),f=h[0],m=h.slice(1),g=a["!cols"]||[],p=0,b=0,C=0,x=1;for(p=0;p250&&(q=250),"C"==(V=((g[p]||{}).DBF||{}).type)&&g[p].DBF.len>q&&(q=g[p].DBF.len),"B"==U&&"N"==V&&(U="N",S[p]=g[p].DBF.dec,q=g[p].DBF.len),P[p]="C"==U||"N"==V?q:o[U]||0,x+=P[p],j[p]=U}else j[p]="?"}var G=u.next(32);for(G.write_shift(4,318902576),G.write_shift(4,m.length),G.write_shift(2,296+32*C),G.write_shift(2,x),p=0;p<4;++p)G.write_shift(4,0);var ve=+t[vr]||3;for(G.write_shift(4,0|ve<<8),n[ve]!=+l.codepage&&(l.codepage&&console.error("DBF Unsupported codepage "+vr+", using 1252"),vr=1252),p=0,b=0;pP[b]&&(ge=ge.slice(0,P[b])),C=0;C":190,"?":191,"{":223},t=new RegExp("\x1bN("+yi(n).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),e=function(u,h){var f=n[h];return"number"==typeof f?RI(f):f},i=function(u,h,f){var m=h.charCodeAt(0)-32<<4|f.charCodeAt(0)-48;return 59==m?u:RI(m)};function o(u,h){var q,f=u.split(/[\n\r]+/),m=-1,g=-1,p=0,b=0,C=[],x=[],D=null,j={},P=[],S=[],U=[],V=0,J={Workbook:{WBProps:{},Names:[]}};for(+h.codepage>=0&&js(+h.codepage);p!==f.length;++p){V=0;var me,G=f[p].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,i).replace(t,e),ve=G.replace(/;;/g,"\0").split(";").map(function(ce){return ce.replace(/\u0000/g,";")});if(G.length>0)switch(ve[0]){case"ID":case"E":case"B":case"W":break;case"O":for(b=1;b=1&&re<=4&&(J.Workbook.WBProps.date1904=!0)}break;case"P":"P"===ve[1].charAt(0)&&x.push(G.slice(3).replace(/;;/g,";"));break;case"NN":var Y={Sheet:0};for(b=1;b-1&&C[st][Dt];if(!W||!W[1])throw new Error("SYLK shared formula cannot find base");F=hG(W[1],{r:m-st,c:g-Dt})}F&&(C[m][g]?C[m][g].f=F:C[m][g]={t:"n",f:F});break;case"F":var H=0;for(b=1;b0?(P[m].hpt=V,P[m].hpx=Wm(V)):0===V&&(P[m].hidden=!0);break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+G)}H<1&&(D=null);break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+G)}}return P.length>0&&(j["!rows"]=P),S.length>0&&(j["!cols"]=S),S.forEach(function(ce){Cd(ce)}),h&&h.sheetRows&&(C=C.slice(0,h.sheetRows)),[C,j,J]}function a(u,h,f,m){var g="C;Y"+(f+1)+";X"+(m+1)+";K";switch(u.t){case"n":g+=u.v||0,u.f&&!u.F&&(g+=";E"+lw(u.f,{r:f,c:m}));break;case"b":g+=u.v?"TRUE":"FALSE";break;case"e":g+=u.w||u.v;break;case"d":g+='"'+(u.w||u.v)+'"';break;case"s":g+='"'+(null==u.v?"":String(u.v)).replace(/"/g,"").replace(/;/g,";;")+'"'}return g}return n["|"]=254,{to_workbook:function s(u,h){var f=function r(u,h){switch(h.type){case"base64":return o(xs(u),h);case"binary":return o(u,h);case"buffer":return o(rn&&Buffer.isBuffer(u)?u.toString("binary"):nc(u),h);case"array":return o(Gu(u),h)}throw new Error("Unrecognized type "+h.type)}(u,h),m=f[0],g=f[1],p=f[2],b=qn(h);b.date1904=(((p||{}).Workbook||{}).WBProps||{}).date1904;var C=zm(m,b);yi(g).forEach(function(D){C[D]=g[D]});var x=xd(C,h);return yi(p).forEach(function(D){x[D]=p[D]}),x.bookType="sylk",x},from_sheet:function d(u,h,f){var b,m=["ID;PSheetJS;N;E"],g=[],p=xn(u["!ref"]),C=null!=u["!data"],x="\r\n",D=(((f||{}).Workbook||{}).WBProps||{}).date1904;m.push("P;PGeneral"),m.push("F;P0;DG0G8;M255"),u["!cols"]&&function c(u,h){h.forEach(function(f,m){var g="F;W"+(m+1)+" "+(m+1)+" ";f.hidden?g+="0":("number"==typeof f.width&&!f.wpx&&(f.wpx=_0(f.width)),"number"==typeof f.wpx&&!f.wch&&(f.wch=b0(f.wpx)),"number"==typeof f.wch&&(g+=Math.round(f.wch)))," "!=g.charAt(g.length-1)&&u.push(g)})}(m,u["!cols"]),u["!rows"]&&function l(u,h){h.forEach(function(f,m){var g="F;";f.hidden?g+="M0;":f.hpt?g+="M"+20*f.hpt+";":f.hpx&&(g+="M"+20*v0(f.hpx)+";"),g.length>2&&u.push(g+"R"+(m+1))})}(m,u["!rows"]),m.push("B;Y"+(p.e.r-p.s.r+1)+";X"+(p.e.c-p.s.c+1)+";D"+[p.s.c,p.s.r,p.e.c,p.e.r].join(" ")),m.push("O;L;D;B"+(D?";V4":"")+";K47;G100 0.001");for(var j=p.s.r;j<=p.e.r;++j)if(!C||u["!data"][j]){for(var P=[],S=p.s.c;S<=p.e.c;++S)(b=C?u["!data"][j][S]:u[on(S)+yn(j)])&&(null!=b.v||b.f&&!b.F)&&P.push(a(b,0,j,S));g.push(P.join(x))}return m.join(x)+x+g.join(x)+x+"E"+x}}}(),J$=function(){function t(a,c){for(var l=a.split("\n"),d=-1,u=-1,h=0,f=[];h!==l.length;++h)if("BOT"!==l[h].trim()){if(!(d<0)){for(var m=l[h].trim().split(","),g=m[0],p=m[1],b=l[++h]||"";1&(b.match(/["]/g)||[]).length&&h=0||d.indexOf(",")>=0||d.indexOf(";")>=0?function o(d,u){var h=u||{},f="";null!=Wi&&null==h.dense&&(h.dense=Wi);var m={};h.dense&&(m["!data"]=[]);var g={s:{c:0,r:0},e:{c:0,r:0}};"sep="==d.slice(0,4)?13==d.charCodeAt(5)&&10==d.charCodeAt(6)?(f=d.charAt(4),d=d.slice(7)):13==d.charCodeAt(5)||10==d.charCodeAt(5)?(f=d.charAt(4),d=d.slice(6)):f=r(d.slice(0,1024)):f=h&&h.FS?h.FS:r(d.slice(0,1024));var p=0,b=0,C=0,x=0,D=0,j=f.charCodeAt(0),P=!1,S=0,U=d.charCodeAt(0),V=null!=h.dateNF?function oSe(n){var t="number"==typeof n?kt[n]:n;return t=t.replace(vj,"(\\d+)"),new RegExp("^"+t+"$")}(h.dateNF):null;function q(){var J=d.slice(x,D);"\r"==J.slice(-1)&&(J=J.slice(0,-1));var G={};if('"'==J.charAt(0)&&'"'==J.charAt(J.length-1)&&(J=J.slice(1,-1).replace(/""/g,'"')),0===J.length?G.t="z":h.raw||0===J.trim().length?(G.t="s",G.v=J):61==J.charCodeAt(0)?34==J.charCodeAt(1)&&34==J.charCodeAt(J.length-1)?(G.t="s",G.v=J.slice(2,-1).replace(/""/g,'"')):function jMe(n){return 1!=n.length}(J)?(G.t="n",G.f=J.slice(1)):(G.t="s",G.v=J):"TRUE"==J?(G.t="b",G.v=!0):"FALSE"==J?(G.t="b",G.v=!1):isNaN(C=ws(J))?!isNaN((C=Vm(J)).getDate())||V&&J.match(V)?(G.z=h.dateNF||kt[14],V&&J.match(V)&&(J=function sSe(n,t,e){var i=-1,r=-1,o=-1,s=-1,a=-1,c=-1;(t.match(vj)||[]).forEach(function(u,h){var f=parseInt(e[h+1],10);switch(u.toLowerCase().charAt(0)){case"y":i=f;break;case"d":o=f;break;case"h":s=f;break;case"s":c=f;break;case"m":s>=0?a=f:r=f}}),c>=0&&-1==a&&r>=0&&(a=r,r=-1);var l=(""+(i>=0?i:(new Date).getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(o>=1?o:1)).slice(-2);7==l.length&&(l="0"+l),8==l.length&&(l="20"+l);var d=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return-1==s&&-1==a&&-1==c?l:-1==i&&-1==r&&-1==o?d:l+"T"+d}(0,h.dateNF,J.match(V)||[]),C=xi(J,1)),h.cellDates?(G.t="d",G.v=C):(G.t="n",G.v=or(C)),!1!==h.cellText&&(G.w=Yo(G.z,G.v instanceof Date?or(G.v):G.v)),h.cellNF||delete G.z):(G.t="s",G.v=J):(G.t="n",!1!==h.cellText&&(G.w=J),G.v=C),"z"==G.t||(h.dense?(m["!data"][p]||(m["!data"][p]=[]),m["!data"][p][b]=G):m[ln({c:b,r:p})]=G),U=d.charCodeAt(x=D+1),g.e.c0&&q(),m["!ref"]=Wt(g),m}(d,u):zm(function t(d,u){var h=u||{},f=[];if(!d||0===d.length)return f;for(var m=d.split(/[\r\n]/),g=m.length-1;g>=0&&0===m[g].length;)--g;for(var p=10,b=0,C=0;C<=g;++C)-1==(b=m[C].indexOf(" "))?b=m[C].length:b++,p=Math.max(p,b);for(C=0;C<=g;++C){f[C]=[];var x=0;for(n(m[C].slice(0,p).trim(),f,C,x,h),x=1;x<=(m[C].length-p)/10+1;++x)n(m[C].slice(p+10*(x-1),p+10*x).trim(),f,C,x,h)}return h.sheetRows&&(f=f.slice(0,h.sheetRows)),f}(d,u),u)}function a(d,u){var h="",f="string"==u.type?[0,0,0,0]:function VM(n,t){var e="";switch((t||{}).type||"base64"){case"buffer":case"array":return[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]];case"base64":e=xs(n.slice(0,12));break;case"binary":e=n;break;default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3),e.charCodeAt(4),e.charCodeAt(5),e.charCodeAt(6),e.charCodeAt(7)]}(d,u);switch(u.type){case"base64":h=xs(d);break;case"binary":case"string":h=d;break;case"buffer":h=65001==u.codepage?d.toString("utf8"):u.codepage&&typeof Xt<"u"?Xt.utils.decode(u.codepage,d):rn&&Buffer.isBuffer(d)?d.toString("binary"):nc(d);break;case"array":h=Gu(d);break;default:throw new Error("Unrecognized type "+u.type)}return 239==f[0]&&187==f[1]&&191==f[2]?h=Kn(h.slice(3)):"string"!=u.type&&"buffer"!=u.type&&65001==u.codepage?h=Kn(h):"binary"==u.type&&typeof Xt<"u"&&u.codepage&&(h=Xt.utils.decode(u.codepage,Xt.utils.encode(28591,h))),"socialcalc:version:"==h.slice(0,19)?eG.to_sheet("string"==u.type?h:Kn(h),u):s(h,u)}return{to_workbook:function c(d,u){return xd(a(d,u),u)},to_sheet:a,from_sheet:function l(d){for(var f,u=[],h=xn(d["!ref"]),m=null!=d["!data"],g=h.s.r;g<=h.e.r;++g){for(var p=[],b=h.s.c;b<=h.e.c;++b){var C=ln({r:g,c:b});if((f=m?(d["!data"][g]||[])[b]:d[C])&&null!=f.v){for(var x=(f.w||(oc(f),f.w)||"").slice(0,10);x.length<10;)x+=" ";p.push(x+(0===b?" ":""))}else p.push(" ")}u.push(p.join(""))}return u.join("\n")}}}(),rh=function(){function n(F,Z,W){if(F){xr(F,F.l||0);for(var H=W.Enum||de;F.l255||$e.s.r>999999)break;$e.e.c<$e.s.c&&($e.e.c=$e.s.c),$e.e.r<$e.s.r&&($e.e.r=$e.s.r),H["!ref"]=Wt($e),yw(dn,H,Ce);break;case 2561:Cn=mt.read_shift(2),$e.e.cCn&&($e.s.c=Cn),Je=mt.read_shift(4),$e.s.r>Je&&($e.s.r=Je),Je=mt.read_shift(4),$e.e.rJe&&($e.s.r=Je),$e.e.r0&&M>=0;){if(32&Zn)switch(31&Zn){case 2:Mn={t:"n",v:Mn.v+ko&65535};break;case 3:(Mn={t:"n",v:Mn.v+ko&65535}).v>32767&&(Mn.v-=65536);break;case 7:Mn={t:"s",v:ce[Rt=Rt+ko>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(31&Zn)}else switch(31&Zn){case 1:Mn={t:"z"};break;case 2:Mn={t:"n",v:mt.read_shift(2)};break;case 7:Mn={t:"s",v:ce[Rt=mt.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(31&Zn)}!W.sheetStubs&&"z"==Mn.t||(null!=H["!data"]?(H["!data"][Je]||(H["!data"][Je]=[]),H["!data"][Je][Cn]=Mn):H[Co+yn(Je)]=Mn),++Je,--M}}}F.l+=Fn}return dn}(F,Z);if(0==F[2]&&(8==F[3]||9==F[3])&&F.length>=16&&5==F[14]&&108===F[15])throw new Error("Unsupported Works 3 for Mac file");if(2==F[2])W.Enum=de,n(F,function(qe,Co,Mn){switch(Mn){case 0:W.vers=qe,qe>=4096&&(W.qpro=!0);break;case 255:W.vers=qe,W.works=!0;break;case 6:Je=qe;break;case 204:qe&&(Ce=qe);break;case 222:Ce=qe;break;case 15:case 51:(!W.qpro&&!W.works||51==Mn)&&qe[1].v.charCodeAt(0)<48&&(qe[1].v=qe[1].v.slice(1)),(W.works||W.works2)&&(qe[1].v=qe[1].v.replace(/\r\n/g,"\n"));case 13:case 14:case 16:14==Mn&&112==(112&qe[2])&&(15&qe[2])>1&&(15&qe[2])<15&&(qe[1].z=W.dateNF||kt[14],W.cellDates&&(qe[1].t="d",qe[1].v=j1(qe[1].v))),W.qpro&&qe[3]>Ue&&(H["!ref"]=Wt(Je),$e[ce]=H,M.push(ce),H={},W.dense&&(Cn=H["!data"]=[]),Je={s:{r:0,c:0},e:{r:0,c:0}},Ue=qe[3],ce=Ce||"Sheet"+(Ue+1),Ce="");var Zn=W.dense?(Cn[qe[0].r]||[])[qe[0].c]:H[ln(qe[0])];if(Zn){Zn.t=qe[1].t,Zn.v=qe[1].v,null!=qe[1].z&&(Zn.z=qe[1].z),null!=qe[1].f&&(Zn.f=qe[1].f);break}W.dense?(Cn[qe[0].r]||(Cn[qe[0].r]=[]),Cn[qe[0].r][qe[0].c]=qe[1]):H[ln(qe[0])]=qe[1];break;case 21509:W.works2=!0}},W);else{if(26!=F[2]&&14!=F[2])throw new Error("Unrecognized LOTUS BOF "+F[2]);W.Enum=st,14==F[2]&&(W.qpro=!0,F.l=0),n(F,function(qe,Co,Mn){switch(Mn){case 204:ce=qe;break;case 22:qe[1].v.charCodeAt(0)<48&&(qe[1].v=qe[1].v.slice(1)),qe[1].v=qe[1].v.replace(/\x0F./g,function(Zn){return String.fromCharCode(Zn.charCodeAt(1)-32)}).replace(/\r\n/g,"\n");case 23:case 24:case 25:case 37:case 39:case 40:if(qe[3]>Ue&&(H["!ref"]=Wt(Je),$e[ce]=H,M.push(ce),H={},W.dense&&(Cn=H["!data"]=[]),Je={s:{r:0,c:0},e:{r:0,c:0}},ce="Sheet"+((Ue=qe[3])+1)),dn>0&&qe[0].r>=dn)break;W.dense?(Cn[qe[0].r]||(Cn[qe[0].r]=[]),Cn[qe[0].r][qe[0].c]=qe[1]):H[ln(qe[0])]=qe[1],Je.e.c=128?95:Ce)}return H.write_shift(1,0),H}function m(F,Z,W){var H=se(7);return H.write_shift(1,255),H.write_shift(2,Z),H.write_shift(2,F),H.write_shift(2,W,"i"),H}function p(F,Z,W){var H=se(13);return H.write_shift(1,255),H.write_shift(2,Z),H.write_shift(2,F),H.write_shift(8,W,"f"),H}function C(F,Z,W){var H=32768&Z;return Z=(H?F:0)+((Z&=-32769)>=8192?Z-16384:Z),(H?"":"$")+(W?on(Z):yn(Z))}var x={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],63:["ROUND",2],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},D=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function P(F){var Z=[{c:0,r:0},{t:"n",v:0},0];return Z[0].r=F.read_shift(2),Z[3]=F[F.l++],Z[0].c=F[F.l++],Z}function U(F,Z,W,H){var ce=se(6+H.length);ce.write_shift(2,F),ce.write_shift(1,W),ce.write_shift(1,Z),ce.write_shift(1,39);for(var Ce=0;Ce=128?95:Ue)}return ce.write_shift(1,0),ce}function q(F,Z){var W=P(F),H=F.read_shift(4),ce=F.read_shift(4),Ce=F.read_shift(2);if(65535==Ce)return 0===H&&3221225472===ce?(W[1].t="e",W[1].v=15):0===H&&3489660928===ce?(W[1].t="e",W[1].v=42):W[1].v=0,W;var Ue=32768&Ce;return Ce=(32767&Ce)-16446,W[1].v=(1-2*Ue)*(ce*Math.pow(2,Ce+32)+H*Math.pow(2,Ce)),W}function J(F,Z,W,H){var ce=se(14);if(ce.write_shift(2,F),ce.write_shift(1,W),ce.write_shift(1,Z),0==H)return ce.write_shift(4,0),ce.write_shift(4,0),ce.write_shift(2,65535),ce;var Ce=0,Ue=0,M=0;return H<0&&(Ce=1,H=-H),Ue=0|Math.log2(H),2147483648&(M=(H/=Math.pow(2,Ue-31))>>>0)||(++Ue,M=(H/=2)>>>0),H-=M,M|=2147483648,M>>>=0,H*=Math.pow(2,32),ce.write_shift(4,H>>>0),ce.write_shift(4,M),ce.write_shift(2,Ue+=16383+(Ce?32768:0)),ce}function Se(F,Z){var W=P(F),H=F.read_shift(8,"f");return W[1].v=H,W}function re(F,Z){return 0==F[F.l+Z-1]?F.read_shift(Z,"cstr"):""}function We(F,Z){var W=se(5+F.length);W.write_shift(2,14e3),W.write_shift(2,Z);for(var H=0;H127?95:ce}return W[W.l++]=0,W}var de={0:{n:"BOF",f:Ki},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function a(F,Z,W){var H={s:{c:0,r:0},e:{c:0,r:0}};return 8==Z&&W.qpro?(H.s.c=F.read_shift(1),F.l++,H.s.r=F.read_shift(2),H.e.c=F.read_shift(1),F.l++,H.e.r=F.read_shift(2),H):(H.s.c=F.read_shift(2),H.s.r=F.read_shift(2),12==Z&&W.qpro&&(F.l+=2),H.e.c=F.read_shift(2),H.e.r=F.read_shift(2),12==Z&&W.qpro&&(F.l+=2),65535==H.s.c&&(H.s.c=H.e.c=H.s.r=H.e.r=0),H)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function f(F,Z,W){var H=l(F,0,W);return H[1].v=F.read_shift(2,"i"),H}},14:{n:"NUMBER",f:function g(F,Z,W){var H=l(F,0,W);return H[1].v=F.read_shift(8,"f"),H}},15:{n:"LABEL",f:function d(F,Z,W){var H=F.l+Z,ce=l(F,0,W);if(ce[1].t="s",20768==W.vers){F.l++;var Ce=F.read_shift(1);return ce[1].v=F.read_shift(Ce,"utf8"),ce}return W.qpro&&F.l++,ce[1].v=F.read_shift(H-F.l,"cstr"),ce}},16:{n:"FORMULA",f:function b(F,Z,W){var H=F.l+Z,ce=l(F,0,W);if(ce[1].v=F.read_shift(8,"f"),W.qpro)F.l=H;else{var Ce=F.read_shift(2);(function j(F,Z){xr(F,0);for(var W=[],H=0,ce="",Ce="",Ue="",$e="";F.lW.length)return void console.error("WK1 bad formula parse 0x"+M.toString(16)+":|"+W.join("|")+"|");var dn=W.slice(-H);W.length-=H,W.push(x[M][0]+"("+dn.join(",")+")")}}}1==W.length?Z[1].f=""+W[0]:console.error("WK1 bad formula parse |"+W.join("|")+"|")})(F.slice(F.l,F.l+Ce),ce),F.l+=Ce}return ce}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:function h(F,Z,W){var H=F.l+Z,ce=l(F,0,W);if(ce[1].t="s",20768==W.vers){var Ce=F.read_shift(1);return ce[1].v=F.read_shift(Ce,"utf8"),ce}return ce[1].v=F.read_shift(H-F.l,"cstr"),ce}},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:re},222:{n:"SHEETNAMELP",f:function Y(F,Z){var W=F[F.l++];W>Z-1&&(W=Z-1);for(var H="";H.length>1;if(1&W[1].v)switch(7&H){case 0:H=5e3*(H>>3);break;case 1:H=500*(H>>3);break;case 2:H=(H>>3)/20;break;case 3:H=(H>>3)/200;break;case 4:H=(H>>3)/2e3;break;case 5:H=(H>>3)/2e4;break;case 6:H=(H>>3)/16;break;case 7:H=(H>>3)/64}return W[1].v=H,W}},25:{n:"FORMULA19",f:function G(F,Z){var W=q(F);return F.l+=Z-14,W}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function le(F,Z){for(var W={},H=F.l+Z;F.l>6,W}},38:{n:"??"},39:{n:"NUMBER27",f:Se},40:{n:"FORMULA28",f:function me(F,Z){var W=Se(F);return F.l+=Z-12,W}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:re},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function ge(F,Z,W){if(W.qpro&&!(Z<21)){var H=F.read_shift(1);return F.l+=17,F.l+=1,F.l+=2,[H,F.read_shift(Z-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:function i(F,Z){var W=Z||{};if(+W.codepage>=0&&js(+W.codepage),"string"==W.type)throw new Error("Cannot write WK1 to JS string");var H=Jo(),ce=xn(F["!ref"]),Ce=null!=F["!data"],Ue=[];Be(H,0,function o(F){var Z=se(2);return Z.write_shift(2,F),Z}(1030)),Be(H,6,function c(F){var Z=se(8);return Z.write_shift(2,F.s.c),Z.write_shift(2,F.s.r),Z.write_shift(2,F.e.c),Z.write_shift(2,F.e.r),Z}(ce));for(var $e=Math.min(ce.e.r,8191),M=ce.s.c;M<=ce.e.c;++M)Ue[M]=on(M);for(var Rt=ce.s.r;Rt<=$e;++Rt){var Cn=yn(Rt);for(M=ce.s.c;M<=ce.e.c;++M){var Je=Ce?(F["!data"][Rt]||[])[M]:F[Ue[M]+Cn];Je&&"z"!=Je.t&&("n"==Je.t?(0|Je.v)==Je.v&&Je.v>=-32768&&Je.v<=32767?Be(H,13,m(Rt,M,Je.v)):Be(H,14,p(Rt,M,Je.v)):Be(H,15,u(Rt,M,oc(Je).slice(0,239))))}}return Be(H,1),H.end()},book_to_wk3:function r(F,Z){var W=Z||{};if(+W.codepage>=0&&js(+W.codepage),"string"==W.type)throw new Error("Cannot write WK3 to JS string");var H=Jo();Be(H,0,function s(F){var Z=se(26);Z.write_shift(2,4096),Z.write_shift(2,4),Z.write_shift(4,0);for(var W=0,H=0,ce=0,Ce=0;Ce8191&&(W=8191),Z.write_shift(2,W),Z.write_shift(1,ce),Z.write_shift(1,H),Z.write_shift(2,0),Z.write_shift(2,0),Z.write_shift(1,1),Z.write_shift(1,2),Z.write_shift(4,0),Z.write_shift(4,0),Z}(F));for(var ce=0,Ce=0;ce=0;--o)t=((16384&t?1:0)|t<<1&32767)^e[o];return 52811^t}function g0(n){for(var t=0,e=1;3!=t;++t)e=256*e+(n[t]>255?255:n[t]<0?0:n[t]);return e.toString(16).toUpperCase().slice(1)}var xo=6;function _0(n){return Math.floor((n+Math.round(128/xo)/256)*xo)}function b0(n){return Math.floor((n-5)/xo*100+.5)/100}function sw(n){return Math.round((n*xo+5)/xo*256)/256}function Cd(n){n.width?(n.wpx=_0(n.width),n.wch=b0(n.wpx),n.MDW=xo):n.wpx?(n.wch=b0(n.wpx),n.width=sw(n.wch),n.MDW=xo):"number"==typeof n.wch&&(n.width=sw(n.wch),n.wpx=_0(n.width),n.MDW=xo),n.customWidth&&delete n.customWidth}var sG=96;function v0(n){return 96*n/sG}function Wm(n){return n*sG/96}function xIe(n,t,e){e||(e=se(6+4*t.length)),e.write_shift(2,n),Cr(t,e);var i=e.length>e.l?e.slice(0,e.l):e;return null==e.l&&(e.l=e.length),i}var wM,kIe=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],EIe=_o;function aG(n,t){t||(t=se(84)),wM||(wM=U1(kIe));var e=wM[n.patternType];null==e&&(e=40),t.write_shift(4,e);var i=0;if(40!=e)for(K1({auto:1},t),K1({auto:1},t);i<12;++i)t.write_shift(4,0);else{for(;i<4;++i)t.write_shift(4,0);for(;i<12;++i)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function cG(n,t,e){return e||(e=se(16)),e.write_shift(2,t||0),e.write_shift(2,n.numFmtId||0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e}function y0(n,t){return t||(t=se(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var SIe=_o;function HIe(n,t){var e=Jo();return be(e,278),function RIe(n,t){if(t){var e=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(i){for(var r=i[0];r<=i[1];++r)null!=t[r]&&++e}),0!=e&&(be(n,615,Ca(e)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(i){for(var r=i[0];r<=i[1];++r)null!=t[r]&&be(n,44,xIe(r,t[r]))}),be(n,616))}}(e,n.SSF),function FIe(n){be(n,611,Ca(1)),be(n,43,function CIe(n,t){t||(t=se(153)),t.write_shift(2,20*n.sz),function tDe(n,t){t||(t=se(2)),t.write_shift(1,(n.italic?2:0)|(n.strike?8:0)|(n.outline?16:0)|(n.shadow?32:0)|(n.condense?64:0)|(n.extend?128:0)),t.write_shift(1,0)}(n,t),t.write_shift(2,n.bold?700:400);var e=0;"superscript"==n.vertAlign?e=1:"subscript"==n.vertAlign&&(e=2),t.write_shift(2,e),t.write_shift(1,n.underline||0),t.write_shift(1,n.family||0),t.write_shift(1,n.charset||0),t.write_shift(1,0),K1(n.color,t);var i=0;return"major"==n.scheme&&(i=1),"minor"==n.scheme&&(i=2),t.write_shift(1,i),Cr(n.name,t),t.length>t.l?t.slice(0,t.l):t}({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),be(n,612)}(e),function PIe(n){be(n,603,Ca(2)),be(n,45,aG({patternType:"none"})),be(n,45,aG({patternType:"gray125"})),be(n,604)}(e),function OIe(n){be(n,613,Ca(1)),be(n,46,function DIe(n,t){return t||(t=se(51)),t.write_shift(1,0),y0(0,t),y0(0,t),y0(0,t),y0(0,t),y0(0,t),t.length>t.l?t.slice(0,t.l):t}()),be(n,614)}(e),function NIe(n){be(n,626,Ca(1)),be(n,47,cG({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),be(n,627)}(e),function LIe(n,t){be(n,617,Ca(t.length)),t.forEach(function(e){be(n,47,cG(e,0))}),be(n,618)}(e,t.cellXfs),function BIe(n){be(n,619,Ca(1)),be(n,48,function AIe(n,t){return t||(t=se(52)),t.write_shift(4,n.xfId),t.write_shift(2,1),t.write_shift(1,+n.builtinId),t.write_shift(1,0),u0(n.name||"",t),t.length>t.l?t.slice(0,t.l):t}({xfId:0,builtinId:0,name:"Normal"})),be(n,620)}(e),function VIe(n){be(n,505,Ca(0)),be(n,506)}(e),function UIe(n){be(n,508,function IIe(n,t,e){var i=se(2052);return i.write_shift(4,n),u0(t,i),u0(e,i),i.length>i.l?i.slice(0,i.l):i}(0,"TableStyleMedium9","PivotStyleMedium4")),be(n,509)}(e),be(e,279),e.end()}function CM(n,t){if(t&&t.themeXLSX)return t.themeXLSX;if(n&&"string"==typeof n.raw)return n.raw;var e=[qi];return e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e.join("")}function dG(n,t){var e=[21600,21600],i=["m0,0l0",e[1],e[0],e[1],e[0],"0xe"].join(","),r=[Pe("xml",null,{"xmlns:v":Cs.v,"xmlns:o":Cs.o,"xmlns:x":Cs.x,"xmlns:mv":Cs.mv}).replace(/\/>/,">"),Pe("o:shapelayout",Pe("o:idmap",null,{"v:ext":"edit",data:n}),{"v:ext":"edit"})],o=65536*n,s=t||[];return s.length>0&&r.push(Pe("v:shapetype",[Pe("v:stroke",null,{joinstyle:"miter"}),Pe("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:e.join(","),"o:spt":202,path:i})),s.forEach(function(a){++o,r.push(function xMe(n,t){var e=zn(n[0]),i={color2:"#BEFF82",type:"gradient"};"gradient"==i.type&&(i.angle="-180");var r="gradient"==i.type?Pe("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,o=Pe("v:fill",r,i);return["",o,Pe("v:shadow",null,{on:"t",obscured:"t"}),Pe("v:path",null,{"o:connecttype":"none"}),'
','',"","",qr("x:Anchor",[e.c+1,0,e.r+1,0,e.c+3,20,e.r+5,20].join(",")),qr("x:AutoFill","False"),qr("x:Row",String(e.r)),qr("x:Column",String(e.c)),n[1].hidden?"":"","",""].join("")}(a,o))}),r.push(""),r.join("")}function CMe(n){var t=[qi,Pe("comments",null,{xmlns:Wu[0]})],e=[];return t.push(""),n.forEach(function(i){i[1].forEach(function(r){var o=en(r.a);-1==e.indexOf(o)&&(e.push(o),t.push(""+o+"")),r.T&&r.ID&&-1==e.indexOf("tc="+r.ID)&&(e.push("tc="+r.ID),t.push("tc="+r.ID+""))})}),0==e.length&&(e.push("SheetJ5"),t.push("SheetJ5")),t.push(""),t.push(""),n.forEach(function(i){var r=0,o=[],s=0;if(i[1][0]&&i[1][0].T&&i[1][0].ID&&(r=e.indexOf("tc="+i[1][0].ID)),i[1].forEach(function(l){l.a&&(r=e.indexOf(en(l.a))),l.T&&++s,o.push(null==l.t?"":en(l.t))}),0===s)i[1].forEach(function(l){t.push(''),t.push(qr("t",null==l.t?"":en(l.t))),t.push("")});else{t.push('');for(var a="Comment:\n "+o[0]+"\n",c=1;c")}}),t.push(""),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}function EMe(n,t,e){var i=[qi,Pe("ThreadedComments",null,{xmlns:yr.TCMNT}).replace(/[\/]>/,">")];return n.forEach(function(r){var o="";(r[1]||[]).forEach(function(s,a){if(s.T){s.a&&-1==t.indexOf(s.a)&&t.push(s.a);var c={ref:r[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+e.tcid++).slice(-12)+"}"};0==a?o=c.id:c.parentId=o,s.ID=c.id,s.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(s.a)).slice(-12)+"}"),i.push(Pe("threadedComment",qr("text",s.t||""),c))}else delete s.ID})}),i.push(""),i.join("")}var IMe=bo;function FMe(n){var t=Jo(),e=[];return be(t,628),be(t,630),n.forEach(function(i){i[1].forEach(function(r){e.indexOf(r.a)>-1||(e.push(r.a.slice(0,54)),be(t,632,function MMe(n){return Cr(n.slice(0,54))}(r.a)))})}),be(t,631),be(t,633),n.forEach(function(i){i[1].forEach(function(r){r.iauthor=e.indexOf(r.a);var o={s:zn(i[0]),e:zn(i[0])};be(t,635,function AMe(n,t){return null==t&&(t=se(36)),t.write_shift(4,n[1].iauthor),jm(n[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}([o,r])),r.t&&r.t.length>0&&be(t,637,function KSe(n,t){var e=!1;return null==t&&(e=!0,t=se(23+4*n.t.length)),t.write_shift(1,1),Cr(n.t,t),t.write_shift(4,1),function WSe(n,t){t||(t=se(4)),t.write_shift(2,n.ich||0),t.write_shift(2,n.ifnt||0)}({ich:0,ifnt:0},t),e?t.slice(0,t.l):t}(r)),be(t,636),delete r.iauthor})}),be(t,634),be(t,629),t.end()}var LMe=["xlsb","xlsm","xlam","biff8","xla"],oh=function(){var n=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function e(i,r,o,s){var a=!1,c=!1;0==o.length?c=!0:"["==o.charAt(0)&&(c=!0,o=o.slice(1,-1)),0==s.length?a=!0:"["==s.charAt(0)&&(a=!0,s=s.slice(1,-1));var l=o.length>0?0|parseInt(o,10):0,d=s.length>0?0|parseInt(s,10):0;return a?d+=t.c:--d,c?l+=t.r:--l,r+(a?"":"$")+on(d)+(c?"":"$")+yn(l)}return function(r,o){return t=o,r.replace(n,e)}}(),kM=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,lw=function(){return function(t,e){return t.replace(kM,function(i,r,o,s,a,c){var l=ZI(s)-(o?0:e.c),d=YI(c)-(a?0:e.r);return r+"R"+("$"==a?d+1:0==d?"":"["+d+"]")+"C"+("$"==o?l+1:0==l?"":"["+l+"]")})}}();function hG(n,t){return n.replace(kM,function(e,i,r,o,s,a){return i+("$"==r?r+o:on(ZI(o)+t.c))+("$"==s?s+a:yn(YI(a)+t.r))})}function cr(n){n.l+=1}function kd(n,t){var e=n.read_shift(1==t?1:2);return[16383&e,e>>14&1,e>>15&1]}function mG(n,t,e){var i=2;if(e){if(e.biff>=2&&e.biff<=5)return pG(n);12==e.biff&&(i=4)}var r=n.read_shift(i),o=n.read_shift(i),s=kd(n,2),a=kd(n,2);return{s:{r,c:s[0],cRel:s[1],rRel:s[2]},e:{r:o,c:a[0],cRel:a[1],rRel:a[2]}}}function pG(n){var t=kd(n,2),e=kd(n,2),i=n.read_shift(1),r=n.read_shift(1);return{s:{r:t[0],c:i,cRel:t[1],rRel:t[2]},e:{r:e[0],c:r,cRel:e[1],rRel:e[2]}}}function gG(n,t,e){if(e&&e.biff>=2&&e.biff<=5)return function GMe(n){var t=kd(n,2),e=n.read_shift(1);return{r:t[0],c:e,cRel:t[1],rRel:t[2]}}(n);var i=n.read_shift(e&&12==e.biff?4:2),r=kd(n,2);return{r:i,c:r[0],cRel:r[1],rRel:r[2]}}function WMe(n){var t=n.read_shift(2),e=n.read_shift(2);return{r:t,c:255&e,fQuoted:!!(16384&e),cRel:e>>15,rRel:e>>15}}function _G(n){var t=1&n[n.l+1];return n.l+=4,[t,1]}function bG(n){return[n.read_shift(1),n.read_shift(1)]}function xRe(n,t){var e=[n.read_shift(1)];if(12==t)switch(e[0]){case 2:e[0]=4;break;case 4:e[0]=16;break;case 0:e[0]=1;break;case 1:e[0]=2}switch(e[0]){case 4:e[1]=function Qi(n,t){return 1===n.read_shift(t)}(n,1)?"TRUE":"FALSE",12!=t&&(n.l+=7);break;case 37:case 16:e[1]=al[n[n.l]],n.l+=12==t?4:8;break;case 0:n.l+=8;break;case 1:e[1]=vo(n);break;case 2:e[1]=function nh(n,t,e){if(e.biff>5)return function p0(n,t,e){var i=n.read_shift(e&&2==e.biff?1:2);return 0===i?(n.l++,""):function th(n,t,e){if(e){if(e.biff>=2&&e.biff<=5)return n.read_shift(t,"cpstr");if(e.biff>=12)return n.read_shift(t,"dbcs-cont")}var r=n.read_shift(1);return n.read_shift(t,0===r?"sbcs-cont":"dbcs-cont")}(n,i,e)}(n,0,e);var i=n.read_shift(1);return 0===i?(n.l++,""):n.read_shift(i,e.biff<=4||!n.lens?"cpstr":"sbcs-cont")}(n,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+e[0])}return e}function wRe(n,t,e){for(var i=n.read_shift(12==e.biff?4:2),r=[],o=0;o!=i;++o)r.push((12==e.biff?Yu:nw)(n,8));return r}function CRe(n,t,e){var i=0,r=0;12==e.biff?(i=n.read_shift(4),r=n.read_shift(4)):(r=1+n.read_shift(1),i=1+n.read_shift(2)),e.biff>=2&&e.biff<8&&(--i,0==--r&&(r=256));for(var o=0,s=[];o!=i&&(s[o]=[]);++o)for(var a=0;a!=r;++a)s[o][a]=xRe(n,e.biff);return s}function x0(n,t,e){return n.l+=2,[WMe(n)]}function EM(n){return n.l+=6,[]}function vG(n){return n.l+=2,[Ki(n),1&n.read_shift(2)]}var jRe=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],yG={1:{n:"PtgExp",f:function pRe(n,t,e){return n.l++,e&&12==e.biff?[n.read_shift(4,"i"),0]:[n.read_shift(2),n.read_shift(e&&2==e.biff?1:2)]}},2:{n:"PtgTbl",f:_o},3:{n:"PtgAdd",f:cr},4:{n:"PtgSub",f:cr},5:{n:"PtgMul",f:cr},6:{n:"PtgDiv",f:cr},7:{n:"PtgPower",f:cr},8:{n:"PtgConcat",f:cr},9:{n:"PtgLt",f:cr},10:{n:"PtgLe",f:cr},11:{n:"PtgEq",f:cr},12:{n:"PtgGe",f:cr},13:{n:"PtgGt",f:cr},14:{n:"PtgNe",f:cr},15:{n:"PtgIsect",f:cr},16:{n:"PtgUnion",f:cr},17:{n:"PtgRange",f:cr},18:{n:"PtgUplus",f:cr},19:{n:"PtgUminus",f:cr},20:{n:"PtgPercent",f:cr},21:{n:"PtgParen",f:cr},22:{n:"PtgMissArg",f:cr},23:{n:"PtgStr",f:function yRe(n,t,e){return n.l++,m0(n,0,e)}},26:{n:"PtgSheet",f:function WRe(n,t,e){return n.l+=5,n.l+=2,n.l+=2==e.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function qRe(n,t,e){return n.l+=2==e.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function gRe(n){return n.l++,al[n.read_shift(1)]}},29:{n:"PtgBool",f:function bRe(n){return n.l++,0!==n.read_shift(1)}},30:{n:"PtgInt",f:function _Re(n){return n.l++,n.read_shift(2)}},31:{n:"PtgNum",f:function vRe(n){return n.l++,vo(n)}},32:{n:"PtgArray",f:function eRe(n,t,e){var i=(96&n[n.l++])>>5;return n.l+=2==e.biff?6:12==e.biff?14:7,[i]}},33:{n:"PtgFunc",f:function uRe(n,t,e){var i=(96&n[n.l])>>5;n.l+=1;var r=n.read_shift(e&&e.biff<=3?1:2);return[EFe[r],kG[r],i]}},34:{n:"PtgFuncVar",f:function hRe(n,t,e){var i=n[n.l++],r=n.read_shift(1),o=e&&e.biff<=3?[88==i?-1:0,n.read_shift(1)]:function fRe(n){return[n[n.l+1]>>7,32767&n.read_shift(2)]}(n);return[r,(0===o[0]?kG:kFe)[o[1]]]}},35:{n:"PtgName",f:function kRe(n,t,e){var i=n.read_shift(1)>>>5&3,o=n.read_shift(!e||e.biff>=8?4:2);switch(e.biff){case 2:n.l+=5;break;case 3:case 4:n.l+=8;break;case 5:n.l+=12}return[i,0,o]}},36:{n:"PtgRef",f:function cRe(n,t,e){var i=(96&n[n.l])>>5;return n.l+=1,[i,gG(n,0,e)]}},37:{n:"PtgArea",f:function KMe(n,t,e){return[(96&n[n.l++])>>5,mG(n,0,e)]}},38:{n:"PtgMemArea",f:function SRe(n,t,e){var i=n.read_shift(1)>>>5&3;return n.l+=e&&2==e.biff?3:4,[i,n.read_shift(e&&2==e.biff?1:2)]}},39:{n:"PtgMemErr",f:_o},40:{n:"PtgMemNoMem",f:_o},41:{n:"PtgMemFunc",f:function DRe(n,t,e){return[n.read_shift(1)>>>5&3,n.read_shift(e&&2==e.biff?1:2)]}},42:{n:"PtgRefErr",f:function ARe(n,t,e){var i=n.read_shift(1)>>>5&3;return n.l+=4,e.biff<8&&n.l--,12==e.biff&&(n.l+=2),[i]}},43:{n:"PtgAreaErr",f:function YMe(n,t,e){var i=(96&n[n.l++])>>5;return n.l+=e&&e.biff>8?12:e.biff<8?6:8,[i]}},44:{n:"PtgRefN",f:function lRe(n,t,e){var i=(96&n[n.l])>>5;n.l+=1;var r=function qMe(n,t,e){var i=e&&e.biff?e.biff:8;if(i>=2&&i<=5)return function QMe(n){var t=n.read_shift(2),e=n.read_shift(1),i=(32768&t)>>15,r=(16384&t)>>14;return t&=16383,1==i&&t>=8192&&(t-=16384),1==r&&e>=128&&(e-=256),{r:t,c:e,cRel:r,rRel:i}}(n);var r=n.read_shift(i>=12?4:2),o=n.read_shift(2),s=(16384&o)>>14,a=(32768&o)>>15;if(o&=16383,1==a)for(;r>524287;)r-=1048576;if(1==s)for(;o>8191;)o-=16384;return{r,c:o,cRel:s,rRel:a}}(n,0,e);return[i,r]}},45:{n:"PtgAreaN",f:function JMe(n,t,e){var i=(96&n[n.l++])>>5,r=function $Me(n,t,e){if(e.biff<8)return pG(n);var i=n.read_shift(12==e.biff?4:2),r=n.read_shift(12==e.biff?4:2),o=kd(n,2),s=kd(n,2);return{s:{r:i,c:o[0],cRel:o[1],rRel:o[2]},e:{r,c:s[0],cRel:s[1],rRel:s[2]}}}(n,0,e);return[i,r]}},46:{n:"PtgMemAreaN",f:function QRe(n){return[n.read_shift(1)>>>5&3,n.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function KRe(n){return[n.read_shift(1)>>>5&3,n.read_shift(2)]}},57:{n:"PtgNameX",f:function ERe(n,t,e){return 5==e.biff?function TRe(n){var t=n.read_shift(1)>>>5&3,e=n.read_shift(2,"i");n.l+=8;var i=n.read_shift(2);return n.l+=12,[t,e,i]}(n):[n.read_shift(1)>>>5&3,n.read_shift(2),n.read_shift(4)]}},58:{n:"PtgRef3d",f:function dRe(n,t,e){var i=(96&n[n.l])>>5;n.l+=1;var r=n.read_shift(2);return e&&5==e.biff&&(n.l+=12),[i,r,gG(n,0,e)]}},59:{n:"PtgArea3d",f:function XMe(n,t,e){var i=(96&n[n.l++])>>5,r=n.read_shift(2,"i");if(e&&5===e.biff)n.l+=12;return[i,r,mG(n,0,e)]}},60:{n:"PtgRefErr3d",f:function IRe(n,t,e){var i=(96&n[n.l++])>>5,r=n.read_shift(2),o=4;if(e)switch(e.biff){case 5:o=15;break;case 12:o=6}return n.l+=o,[i,r]}},61:{n:"PtgAreaErr3d",f:function ZMe(n,t,e){var i=(96&n[n.l++])>>5,r=n.read_shift(2),o=8;if(e)switch(e.biff){case 5:n.l+=12,o=6;break;case 12:o=12}return n.l+=o,[i,r]}},255:{}},YRe={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},ZRe={1:{n:"PtgElfLel",f:vG},2:{n:"PtgElfRw",f:x0},3:{n:"PtgElfCol",f:x0},6:{n:"PtgElfRwV",f:x0},7:{n:"PtgElfColV",f:x0},10:{n:"PtgElfRadical",f:x0},11:{n:"PtgElfRadicalS",f:EM},13:{n:"PtgElfColS",f:EM},15:{n:"PtgElfColSV",f:EM},16:{n:"PtgElfRadicalLel",f:vG},25:{n:"PtgList",f:function $Re(n){n.l+=2;var t=n.read_shift(2),e=n.read_shift(2),i=n.read_shift(4),r=n.read_shift(2),o=n.read_shift(2);return{ixti:t,coltype:3&e,rt:jRe[e>>2&31],idx:i,c:r,C:o}}},29:{n:"PtgSxName",f:function GRe(n){return n.l+=2,[n.read_shift(4)]}},255:{}},JRe={0:{n:"PtgAttrNoop",f:function XRe(n){return n.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function oRe(n,t,e){var i=255&n[n.l+1]?1:0;return n.l+=e&&2==e.biff?3:4,[i]}},2:{n:"PtgAttrIf",f:function iRe(n,t,e){var i=255&n[n.l+1]?1:0;return n.l+=2,[i,n.read_shift(e&&2==e.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function tRe(n,t,e){n.l+=2;for(var i=n.read_shift(e&&2==e.biff?1:2),r=[],o=0;o<=i;++o)r.push(n.read_shift(e&&2==e.biff?1:2));return r}},8:{n:"PtgAttrGoto",f:function nRe(n,t,e){var i=255&n[n.l+1]?1:0;return n.l+=2,[i,n.read_shift(e&&2==e.biff?1:2)]}},16:{n:"PtgAttrSum",f:function mRe(n,t,e){n.l+=e&&2==e.biff?3:4}},32:{n:"PtgAttrBaxcel",f:_G},33:{n:"PtgAttrBaxcel",f:_G},64:{n:"PtgAttrSpace",f:function sRe(n){return n.read_shift(2),bG(n)}},65:{n:"PtgAttrSpaceSemi",f:function aRe(n){return n.read_shift(2),bG(n)}},128:{n:"PtgAttrIfError",f:function rRe(n){var t=255&n[n.l+1]?1:0;return n.l+=2,[t,n.read_shift(2)]}},255:{}};function w0(n,t,e,i){if(i.biff<8)return _o(n,t);for(var r=n.l+t,o=[],s=0;s!==e.length;++s)switch(e[s][0]){case"PtgArray":e[s][1]=CRe(n,0,i),o.push(e[s][1]);break;case"PtgMemArea":e[s][2]=wRe(n,0,i),o.push(e[s][2]);break;case"PtgExp":i&&12==i.biff&&(e[s][1][1]=n.read_shift(4),o.push(e[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+e[s][0]}return 0!=(t=r-n.l)&&o.push(_o(n,t)),o}function eFe(n){for(var t=[],e=0;e=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function nFe(n,t){var e=n.lastIndexOf("!"),i=t.lastIndexOf("!");return-1==e&&-1==i?n+":"+t:e>0&&i>0&&n.slice(0,e).toLowerCase()==t.slice(0,i).toLowerCase()?n+":"+t.slice(i+1):(console.error("Cannot hydrate range",n,t),n+":"+t)}function xG(n,t,e){if(!n)return"SH33TJSERR0";if(e.biff>8&&(!n.XTI||!n.XTI[t]))return n.SheetNames[t];if(!n.XTI)return"SH33TJSERR6";var i=n.XTI[t];if(e.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),0==t?"":n.XTI[t-1];if(!i)return"SH33TJSERR1";var r="";if(e.biff>8)switch(n[i[0]][0]){case 357:return r=-1==i[1]?"#REF":n.SheetNames[i[1]],i[1]==i[2]?r:r+":"+n.SheetNames[i[2]];case 358:return null!=e.SID?n.SheetNames[e.SID]:"SH33TJSSAME"+n[i[0]][0];default:return"SH33TJSSRC"+n[i[0]][0]}switch(n[i[0]][0][0]){case 1025:return r=-1==i[1]?"#REF":n.SheetNames[i[1]]||"SH33TJSERR3",i[1]==i[2]?r:r+":"+n.SheetNames[i[2]];case 14849:return n[i[0]].slice(1).map(function(o){return o.Name}).join(";;");default:return n[i[0]][0][3]?(r=-1==i[1]?"#REF":n[i[0]][0][3][i[1]]||"SH33TJSERR4",i[1]==i[2]?r:r+":"+n[i[0]][0][3][i[2]]):"SH33TJSERR2"}}function wG(n,t,e){var i=xG(n,t,e);return"#REF"==i?i:d0(i,e)}function wo(n,t,e,i,r){var c,l,d,f,o=r&&r.biff||8,s={s:{c:0,r:0},e:{c:0,r:0}},a=[],u=0,h=0,m="";if(!n[0]||!n[0][0])return"";for(var g=-1,p="",b=0,C=n[0].length;b=0){switch(n[0][g][1][0]){case 0:p=In(" ",n[0][g][1][1]);break;case 1:p=In("\r",n[0][g][1][1]);break;default:if(p="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+n[0][g][1][0])}l+=p,g=-1}a.push(l+tFe[x[0]]+c);break;case"PtgIsect":c=a.pop(),l=a.pop(),a.push(l+" "+c);break;case"PtgUnion":c=a.pop(),l=a.pop(),a.push(l+","+c);break;case"PtgRange":c=a.pop(),l=a.pop(),a.push(nFe(l,c));break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":d=a0(x[1][1],s,r),a.push(c0(d,o));break;case"PtgRefN":d=e?a0(x[1][1],e,r):x[1][1],a.push(c0(d,o));break;case"PtgRef3d":u=x[1][1],d=a0(x[1][2],s,r),m=wG(i,u,r),a.push(m+"!"+c0(d,o));break;case"PtgFunc":case"PtgFuncVar":var j=x[1][0],P=x[1][1];j||(j=0);var S=0==(j&=127)?[]:a.slice(-j);a.length-=j,"User"===P&&(P=S.shift()),a.push(P+"("+S.join(",")+")");break;case"PtgBool":a.push(x[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":a.push(x[1]);break;case"PtgNum":a.push(String(x[1]));break;case"PtgStr":a.push('"'+x[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":f=t$(x[1][1],e?{s:e}:s,r),a.push(XI(f,r));break;case"PtgArea":f=t$(x[1][1],s,r),a.push(XI(f,r));break;case"PtgArea3d":f=x[1][2],m=wG(i,u=x[1][1],r),a.push(m+"!"+XI(f,r));break;case"PtgAttrSum":a.push("SUM("+a.pop()+")");break;case"PtgName":var U=(i.names||[])[(h=x[1][2])-1]||(i[0]||[])[h],V=U?U.Name:"SH33TJSNAME"+String(h);V&&"_xlfn."==V.slice(0,6)&&!r.xlfn&&(V=V.slice(6)),a.push(V);break;case"PtgNameX":var J,q=x[1][1];if(h=x[1][2],!(r.biff<=5)){var G="";if(14849==((i[q]||[])[0]||[])[0]||(1025==((i[q]||[])[0]||[])[0]?i[q][h]&&i[q][h].itab>0&&(G=i.SheetNames[i[q][h].itab-1]+"!"):G=i.SheetNames[h-1]+"!"),i[q]&&i[q][h])G+=i[q][h].Name;else if(i[0]&&i[0][h])G+=i[0][h].Name;else{var ve=(xG(i,q,r)||"").split(";;");ve[h-1]?G=ve[h-1]:G+="SH33TJSERRX"}a.push(G);break}q<0&&(q=-q),i[q]&&(J=i[q][h]),J||(J={Name:"SH33TJSERRY"}),a.push(J.Name);break;case"PtgParen":var Se="(",me=")";if(g>=0){switch(p="",n[0][g][1][0]){case 2:Se=In(" ",n[0][g][1][1])+Se;break;case 3:Se=In("\r",n[0][g][1][1])+Se;break;case 4:me=In(" ",n[0][g][1][1])+me;break;case 5:me=In("\r",n[0][g][1][1])+me;break;default:if(r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+n[0][g][1][0])}g=-1}a.push(Se+a.pop()+me);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":a.push("#REF!");break;case"PtgExp":var re={c:e.c,r:e.r};if(i.sharedf[ln(d={c:x[1][1],r:x[1][0]})]){var Y=i.sharedf[ln(d)];a.push(wo(Y,0,re,i,r))}else{var ge=!1;for(c=0;c!=i.arrayf.length;++c)if(!(d.c<(l=i.arrayf[c])[0].s.c||d.c>l[0].e.c||d.rl[0].e.r)){a.push(wo(l[1],0,re,i,r)),ge=!0;break}ge||a.push(x[1])}break;case"PtgArray":a.push("{"+eFe(x[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=b;break;case"PtgMissArg":a.push("");break;case"PtgList":a.push("Table"+x[1].idx+"[#"+x[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(x))}if(3!=r.biff&&g>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(n[0][b][0])){var We=!0;switch((x=n[0][g])[1][0]){case 4:We=!1;case 0:p=In(" ",x[1][1]);break;case 5:We=!1;case 1:p=In("\r",x[1][1]);break;default:if(p="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+x[1][0])}a.push((We?p:"")+a.pop()+(We?"":p)),g=-1}}if(a.length>1&&r.WTF)throw new Error("bad formula stack");return"TRUE"==a[0]||"FALSE"!=a[0]&&a[0]}function dw(n,t,e){var i=n.read_shift(4),r=function C0(n,t,e){for(var r,o,i=n.l+t,s=[];i!=n.l;)t=i-n.l,r=yG[o=n[n.l]]||yG[YRe[o]],(24===o||25===o)&&(r=(24===o?ZRe:JRe)[n[n.l+1]]),r&&r.f?s.push([r.n,r.f(n,t,e)]):_o(n,t);return s}(n,i,e),o=n.read_shift(4);return[r,o>0?w0(n,o,r,e):null]}var dFe=dw,uw=dw,uFe=dw,hFe=dw;function CG(n){if((0|n)==n&&n=0){var t=se(11);return t.write_shift(4,3),t.write_shift(1,30),t.write_shift(2,n),t.write_shift(4,0),t}var e=se(17);return e.write_shift(4,11),e.write_shift(1,31),e.write_shift(8,n),e.write_shift(4,0),e}var CFe=function wFe(n,t){if("number"==typeof n)return CG(n);if("boolean"==typeof n)return function mFe(n){var t=se(10);return t.write_shift(4,2),t.write_shift(1,29),t.write_shift(1,n?1:0),t.write_shift(4,0),t}(n);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(n))return function fFe(n){var t=se(10);return t.write_shift(4,2),t.write_shift(1,28),t.write_shift(1,n),t.write_shift(4,0),t}(+aM[n]);if(n.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function gFe(n){var t=zn(n),e=se(15);return e.write_shift(4,7),e.write_shift(1,36),e.write_shift(4,t.r),e.write_shift(2,t.c|("$"==n.charAt(0)?0:1)<<14|(n.match(/\$\d/)?0:1)<<15),e.write_shift(4,0),e}(n);if(n.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function vFe(n){var t=n.split(":"),e=t[0],i=se(23);i.write_shift(4,15);var r=zn(e=t[0]);return i.write_shift(1,36),i.write_shift(4,r.r),i.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),i.write_shift(4,0),r=zn(e=t[1]),i.write_shift(1,36),i.write_shift(4,r.r),i.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),i.write_shift(4,0),i.write_shift(1,17),i.write_shift(4,0),i}(n);if(n.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function xFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e);n=n.slice(e+1),"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var r=wr(n),o=se(23);return o.write_shift(4,15),o.write_shift(1,59),o.write_shift(2,2+t.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,r.s.r),o.write_shift(4,r.e.r),o.write_shift(2,r.s.c),o.write_shift(2,r.e.c),o.write_shift(4,0),o}(n,t);if(n.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function _Fe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e),r=zn(n=n.slice(e+1));"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var o=se(17);return o.write_shift(4,9),o.write_shift(1,58),o.write_shift(2,2+t.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,r.r),o.write_shift(2,r.c|("$"==n.charAt(0)?0:1)<<14|(n.match(/\$\d/)?0:1)<<15),o.write_shift(4,0),o}(n,t);if(n.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function yFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e);n=n.slice(e+1),"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var r=n.split(":");s=r[0];var o=se(27);o.write_shift(4,19);var s=r[0],a=zn(s);return o.write_shift(1,58),o.write_shift(2,2+t.SheetNames.map(function(c){return c.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,a.r),o.write_shift(2,a.c|("$"==s.charAt(0)?0:1)<<14|(s.match(/\$\d/)?0:1)<<15),a=zn(s=r[1]),o.write_shift(1,58),o.write_shift(2,2+t.SheetNames.map(function(c){return c.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,a.r),o.write_shift(2,a.c|("$"==s.charAt(0)?0:1)<<14|(s.match(/\$\d/)?0:1)<<15),o.write_shift(1,17),o.write_shift(4,0),o}(n,t);if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(n))return function bFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e);n=n.slice(e+1),"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var r=se(17);return r.write_shift(4,9),r.write_shift(1,60),r.write_shift(2,2+t.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(i.toLowerCase())),r.write_shift(4,0),r.write_shift(2,0),r.write_shift(4,0),r}(n,t);if(/^".*"$/.test(n))return function pFe(n){var t=se(7);t.write_shift(4,3+2*n.length),t.write_shift(1,23),t.write_shift(2,n.length);var e=se(2*n.length);e.write_shift(2*n.length,n,"utf16le");var i=se(4);return i.write_shift(4,0),rr([t,e,i])}(n);if(/^[+-]\d+$/.test(n))return CG(parseInt(n,10));throw"Formula |"+n+"| not supported for XLSB"},kFe={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},kG={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},EFe={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function TFe(n){return("of:="+n.replace(kM,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")}function TG(n){return n.replace(/!/,".")}var E0=typeof Map<"u";function DM(n,t,e){var i=0,r=n.length;if(e){if(E0?e.has(t):Object.prototype.hasOwnProperty.call(e,t))for(var o=E0?e.get(t):e[t];i-1?(e.width=sw(i),e.customWidth=1):null!=t.width&&(e.width=t.width),t.hidden&&(e.hidden=!0),null!=t.level&&(e.outlineLevel=e.level=t.level),e}function sh(n,t){if(n){var e=[.7,.7,.75,.75,.3,.3];"xlml"==t&&(e=[1,1,1,1,.5,.5]),null==n.left&&(n.left=e[0]),null==n.right&&(n.right=e[1]),null==n.top&&(n.top=e[2]),null==n.bottom&&(n.bottom=e[3]),null==n.header&&(n.header=e[4]),null==n.footer&&(n.footer=e[5])}}function Ed(n,t,e){var i=e.revssf[null!=t.z?t.z:"General"],r=60,o=n.length;if(null==i&&e.ssf)for(;r<392;++r)if(null==e.ssf[r]){yd(t.z,r),e.ssf[r]=t.z,e.revssf[t.z]=i=r;break}for(r=0;r!=o;++r)if(n[r].numFmtId===i)return r;return n[o]={numFmtId:i,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},o}function SFe(n,t,e){if(n&&n["!ref"]){var i=xn(n["!ref"]);if(i.e.c"u")return"";var r="",o=n.t,s=n.v;if("z"!==n.t)switch(n.t){case"b":r=n.v?"1":"0";break;case"n":r=""+n.v;break;case"e":r=al[n.v];break;case"d":i&&i.cellDates?r=xi(n.v,-1).toISOString():((n=qn(n)).t="n",r=""+(n.v=or(xi(n.v)))),typeof n.z>"u"&&(n.z=kt[14]);break;default:r=n.v}var a="z"==n.t||null==n.v?"":qr("v",en(r)),c={r:t},l=Ed(i.cellXfs,n,i);switch(0!==l&&(c.s=l),n.t){case"n":case"z":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;default:if(null==n.v){delete n.t;break}if(n.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(i&&i.bookSST){a=qr("v",""+DM(i.Strings,n.v,i.revStrings)),c.t="s";break}c.t="str"}if(n.t!=o&&(n.t=o,n.v=s),"string"==typeof n.f&&n.f){var d=n.F&&n.F.slice(0,t.length)==t?{t:"array",ref:n.F}:null;a=Pe("f",en(n.f),d)+(null!=n.v?a:"")}return n.l&&(n.l.display=en(r),e["!links"].push([t,n.l])),n.D&&(c.cm=1),Pe("c",a,c)}function rPe(n,t,e,i){var s,r=[qi,Pe("worksheet",null,{xmlns:Wu[0],"xmlns:r":yr.r})],a="",c=e.Sheets[e.SheetNames[n]];null==c&&(c={});var l=c["!ref"]||"A1",d=xn(l);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+l+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),l=Wt(d)}i||(i={}),c["!comments"]=[];var u=[];(function HFe(n,t,e,i,r){var o=!1,s={},a=null;if("xlsx"!==i.bookType&&t.vbaraw){var c=t.SheetNames[e];try{t.Workbook&&(c=t.Workbook.Sheets[e].CodeName||c)}catch{}o=!0,s.codeName=rc(en(c))}if(n&&n["!outline"]){var l={summaryBelow:1,summaryRight:1};n["!outline"].above&&(l.summaryBelow=0),n["!outline"].left&&(l.summaryRight=0),a=(a||"")+Pe("outlinePr",null,l)}!o&&!a||(r[r.length]=Pe("sheetPr",a,s))})(c,e,n,t,r),r[r.length]=Pe("dimension",null,{ref:l}),r[r.length]=function ePe(n,t,e,i){var r={workbookViewId:"0"};return(((i||{}).Workbook||{}).Views||[])[0]&&(r.rightToLeft=i.Workbook.Views[0].RTL?"1":"0"),Pe("sheetViews",Pe("sheetView",null,r),{})}(0,0,0,e),t.sheetFormat&&(r[r.length]=Pe("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),null!=c["!cols"]&&c["!cols"].length>0&&(r[r.length]=function KFe(n,t){for(var i,e=[""],r=0;r!=t.length;++r)(i=t[r])&&(e[e.length]=Pe("col",null,hw(r,i)));return e[e.length]="",e.join("")}(0,c["!cols"])),r[s=r.length]="",c["!links"]=[],null!=c["!ref"]&&(a=function iPe(n,t,e,i){var c,p,r=[],o=[],s=xn(n["!ref"]),a="",l="",d=[],u=0,h=0,f=n["!rows"],m=null!=n["!data"],g={r:l},b=-1;for(h=s.s.c;h<=s.e.c;++h)d[h]=on(h);for(u=s.s.r;u<=s.e.r;++u){for(o=[],l=yn(u),h=s.s.c;h<=s.e.c;++h){c=d[h]+l;var C=m?(n["!data"][u]||[])[h]:n[c];void 0!==C&&null!=(a=tPe(C,c,n,t))&&o.push(a)}(o.length>0||f&&f[u])&&(g={r:l},f&&f[u]&&((p=f[u]).hidden&&(g.hidden=1),b=-1,p.hpx?b=v0(p.hpx):p.hpt&&(b=p.hpt),b>-1&&(g.ht=b,g.customHeight=1),p.level&&(g.outlineLevel=p.level)),r[r.length]=Pe("row",o.join(""),g))}if(f)for(;u-1&&(g.ht=b,g.customHeight=1),p.level&&(g.outlineLevel=p.level),r[r.length]=Pe("row","",g));return r.join("")}(c,t),a.length>0&&(r[r.length]=a)),r.length>s+1&&(r[r.length]="",r[s]=r[s].replace("/>",">")),c["!protect"]&&(r[r.length]=function $Fe(n){var t={sheet:1};return zFe.forEach(function(e){null!=n[e]&&n[e]&&(t[e]="1")}),jFe.forEach(function(e){null!=n[e]&&!n[e]&&(t[e]="0")}),n.password&&(t.password=vM(n.password).toString(16).toUpperCase()),Pe("sheetProtection",null,t)}(c["!protect"])),null!=c["!autofilter"]&&(r[r.length]=function YFe(n,t,e,i){var r="string"==typeof n.ref?n.ref:Wt(n.ref);e.Workbook||(e.Workbook={Sheets:[]}),e.Workbook.Names||(e.Workbook.Names=[]);var o=e.Workbook.Names,s=wr(r);s.s.r==s.e.r&&(s.e.r=wr(t["!ref"]).e.r,r=Wt(s));for(var a=0;a0&&(r[r.length]=function VFe(n){if(0===n.length)return"";for(var t='',e=0;e!=n.length;++e)t+='';return t+""}(c["!merges"]));var f,h=-1,m=-1;return c["!links"].length>0&&(r[r.length]="",c["!links"].forEach(function(g){g[1].Target&&(f={ref:g[0]},"#"!=g[1].Target.charAt(0)&&(m=Xn(i,-1,en(g[1].Target).replace(/#.*$/,""),tn.HLINK),f["r:id"]="rId"+m),(h=g[1].Target.indexOf("#"))>-1&&(f.location=en(g[1].Target.slice(h+1))),g[1].Tooltip&&(f.tooltip=en(g[1].Tooltip)),f.display=g[1].display,r[r.length]=Pe("hyperlink",null,f))}),r[r.length]=""),delete c["!links"],null!=c["!margins"]&&(r[r.length]=function qFe(n){return sh(n),Pe("pageMargins",null,n)}(c["!margins"])),(!t||t.ignoreEC||null==t.ignoreEC)&&(r[r.length]=qr("ignoredErrors",Pe("ignoredError",null,{numberStoredAsText:1,sqref:l}))),u.length>0&&(m=Xn(i,-1,"../drawings/drawing"+(n+1)+".xml",tn.DRAW),r[r.length]=Pe("drawing",null,{"r:id":"rId"+m}),c["!drawing"]=u),c["!comments"].length>0&&(m=Xn(i,-1,"../drawings/vmlDrawing"+(n+1)+".vml",tn.VML),r[r.length]=Pe("legacyDrawing",null,{"r:id":"rId"+m}),c["!legacy"]=m),r.length>1&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function aPe(n,t,e,i){var r=function sPe(n,t,e){var i=se(145),r=(e["!rows"]||[])[n]||{};i.write_shift(4,n),i.write_shift(4,0);var o=320;r.hpx?o=20*v0(r.hpx):r.hpt&&(o=20*r.hpt),i.write_shift(2,o),i.write_shift(1,0);var s=0;r.level&&(s|=r.level),r.hidden&&(s|=16),(r.hpx||r.hpt)&&(s|=32),i.write_shift(1,s),i.write_shift(1,0);var a=0,c=i.l;i.l+=4;for(var l={r:n,c:0},d=null!=e["!data"],u=0;u<16;++u)if(!(t.s.c>u+1<<10||t.e.ci.l?i.slice(0,i.l):i}(i,e,t);(r.length>17||(t["!rows"]||[])[i])&&be(n,0,r)}var cPe=Yu,lPe=jm;var GPe=Yu,WPe=jm,IG=["left","right","top","bottom","header","footer"];function lOe(n,t,e,i,r,o,s){var a={r:e,c:i};if(t.c&&o["!comments"].push([ln(a),t.c]),void 0===t.v)return!1;var c="";switch(t.t){case"b":c=t.v?"1":"0";break;case"d":(t=qn(t)).z=t.z||kt[14],t.v=or(xi(t.v)),t.t="n";break;case"n":case"e":c=""+t.v;break;default:c=t.v}switch(a.s=Ed(r.cellXfs,t,r),t.l&&o["!links"].push([ln(a),t.l]),t.t){case"s":case"str":return r.bookSST?(c=DM(r.Strings,null==t.v?"":String(t.v),r.revStrings),a.t="s",a.v=c,s?be(n,18,function DPe(n,t,e){return null==e&&(e=se(8)),Xu(t,e),e.write_shift(4,t.v),e}(0,a)):be(n,7,function TPe(n,t,e){return null==e&&(e=se(12)),Qu(t,e),e.write_shift(4,t.v),e}(0,a))):(a.t="str",s?be(n,17,function UPe(n,t,e){var i=null==n.v?"":String(n.v);return null==e&&(e=se(8+4*i.length)),Xu(t,e),Cr(i,e),e.length>e.l?e.slice(0,e.l):e}(t,a)):be(n,6,function BPe(n,t,e){var i=null==n.v?"":String(n.v);return null==e&&(e=se(12+4*n.v.length)),Qu(t,e),Cr(i,e),e.length>e.l?e.slice(0,e.l):e}(t,a))),!0;case"n":return t.v==(0|t.v)&&t.v>-1e3&&t.v<1e3?s?be(n,13,function OPe(n,t,e){return null==e&&(e=se(8)),Xu(t,e),o$(n.v,e),e}(t,a)):be(n,2,function FPe(n,t,e){return null==e&&(e=se(12)),Qu(t,e),o$(n.v,e),e}(t,a)):s?be(n,16,function MPe(n,t,e){return null==e&&(e=se(12)),Xu(t,e),Zu(n.v,e),e}(t,a)):be(n,5,function IPe(n,t,e){return null==e&&(e=se(16)),Qu(t,e),Zu(n.v,e),e}(t,a)),!0;case"b":return a.t="b",s?be(n,15,function yPe(n,t,e){return null==e&&(e=se(5)),Xu(t,e),e.write_shift(1,n.v?1:0),e}(t,a)):be(n,4,function bPe(n,t,e){return null==e&&(e=se(9)),Qu(t,e),e.write_shift(1,n.v?1:0),e}(t,a)),!0;case"e":return a.t="e",s?be(n,14,function kPe(n,t,e){return null==e&&(e=se(8)),Xu(t,e),e.write_shift(1,n.v),e.write_shift(2,0),e.write_shift(1,0),e}(t,a)):be(n,3,function wPe(n,t,e){return null==e&&(e=se(9)),Qu(t,e),e.write_shift(1,n.v),e}(t,a)),!0}return s?be(n,12,function gPe(n,t,e){return null==e&&(e=se(4)),Xu(t,e)}(0,a)):be(n,1,function mPe(n,t,e){return null==e&&(e=se(8)),Qu(t,e)}(0,a)),!0}function vOe(n,t,e,i){var r=Jo(),o=e.SheetNames[n],s=e.Sheets[o]||{},a=o;try{e&&e.Workbook&&(a=e.Workbook.Sheets[n].CodeName||a)}catch{}var c=xn(s["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return s["!links"]=[],s["!comments"]=[],be(r,129),(e.vbaraw||s["!outline"])&&be(r,147,function hPe(n,t,e){null==e&&(e=se(84+4*n.length));var i=192;t&&(t.above&&(i&=-65),t.left&&(i&=-129)),e.write_shift(1,i);for(var r=1;r<3;++r)e.write_shift(1,0);return K1({auto:1},e),e.write_shift(-4,-1),e.write_shift(-4,-1),r$(n,e),e.slice(0,e.l)}(a,s["!outline"])),be(r,148,lPe(c)),function _Oe(n,t,e){be(n,133),be(n,137,function iOe(n,t,e){null==e&&(e=se(30));var i=924;return(((t||{}).Views||[])[0]||{}).RTL&&(i|=32),e.write_shift(2,i),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(2,0),e.write_shift(2,100),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(4,0),e}(0,e)),be(n,138),be(n,134)}(r,0,e.Workbook),function hOe(n,t){!t||!t["!cols"]||(be(n,390),t["!cols"].forEach(function(e,i){e&&be(n,60,function JPe(n,t,e){null==e&&(e=se(18));var i=hw(n,t);e.write_shift(-4,n),e.write_shift(-4,n),e.write_shift(4,256*(i.width||10)),e.write_shift(4,0);var r=0;return t.hidden&&(r|=1),"number"==typeof i.width&&(r|=2),t.level&&(r|=t.level<<8),e.write_shift(2,r),e}(i,e))}),be(n,391))}(r,s),function dOe(n,t,e,i){var r=xn(t["!ref"]||"A1"),s="",a=[];be(n,145);var c=null!=t["!data"],l=r.e.r;t["!rows"]&&(l=Math.max(r.e.r,t["!rows"].length-1));for(var d=r.s.r;d<=l;++d){s=yn(d),aPe(n,t,r,d);var u=!1;if(d<=r.e.r)for(var h=r.s.c;h<=r.e.c;++h){d===r.s.r&&(a[h]=on(h));var f=c?(t["!data"][d]||[])[h]:t[a[h]+s];u=!!f&&lOe(n,f,d,h,i,t,u)}}be(n,146)}(r,s,0,t),function bOe(n,t){t["!protect"]&&be(n,535,function oOe(n,t){return null==t&&(t=se(66)),t.write_shift(2,n.password?vM(n.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(e){t.write_shift(4,e[1]?null==n[e[0]]||n[e[0]]?0:1:null!=n[e[0]]&&n[e[0]]?0:1)}),t}(t["!protect"]))}(r,s),function gOe(n,t,e,i){if(t["!autofilter"]){var r=t["!autofilter"],o="string"==typeof r.ref?r.ref:Wt(r.ref);e.Workbook||(e.Workbook={Sheets:[]}),e.Workbook.Names||(e.Workbook.Names=[]);var s=e.Workbook.Names,a=wr(o);a.s.r==a.e.r&&(a.e.r=wr(t["!ref"]).e.r,o=Wt(a));for(var c=0;c0){var r=Xn(i,-1,"../drawings/vmlDrawing"+(e+1)+".vml",tn.VML);be(n,551,nM("rId"+r)),t["!legacy"]=r}}(r,s,n,i),be(r,130),r.end()}var IM=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],AOe=":][*?/\\".split("");function PG(n,t){try{if(""==n)throw new Error("Sheet name cannot be blank");if(n.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(39==n.charCodeAt(0)||39==n.charCodeAt(n.length-1))throw new Error("Sheet name cannot start or end with apostrophe (')");if("history"==n.toLowerCase())throw new Error("Sheet name cannot be 'History'");AOe.forEach(function(e){if(-1!=n.indexOf(e))throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(e){if(t)return!1;throw e}return!0}function OOe(n,t){return t||(t=se(127)),t.write_shift(4,n.Hidden),t.write_shift(4,n.iTabID),nM(n.strRelID,t),Cr(n.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function KOe(n,t){var e=Jo();return be(e,131),be(e,128,function jOe(n,t){t||(t=se(127));for(var e=0;4!=e;++e)t.write_shift(4,0);return Cr("SheetJS",t),Cr(Q_.version,t),Cr(Q_.version,t),Cr("7262",t),t.length>t.l?t.slice(0,t.l):t}()),be(e,153,function LOe(n,t){t||(t=se(72));var e=0;return n&&(n.date1904&&(e|=1),n.filterPrivacy&&(e|=8)),t.write_shift(4,e),t.write_shift(4,0),r$(n&&n.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}(n.Workbook&&n.Workbook.WBProps||null)),function GOe(n,t){if(t.Workbook&&t.Workbook.Sheets){for(var e=t.Workbook.Sheets,i=0,r=-1,o=-1;ir||(be(n,135),be(n,158,function $Oe(n,t){return t||(t=se(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,n),t.write_shift(4,n),t.write_shift(1,120),t.length>t.l?t.slice(0,t.l):t}(r)),be(n,136))}}(e,n),function zOe(n,t){be(n,143);for(var e=0;e!=t.SheetNames.length;++e)be(n,156,OOe({Hidden:t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[e]&&t.Workbook.Sheets[e].Hidden||0,iTabID:e+1,strRelID:"rId"+(e+1),name:t.SheetNames[e]}));be(n,144)}(e,n),function QOe(n,t){be(n,353),be(n,357),be(n,362,function qOe(n){var t=n.SheetNames.length,e=se(12*t+28);e.write_shift(4,t+2),e.write_shift(4,0),e.write_shift(4,-2),e.write_shift(4,-2),e.write_shift(4,0),e.write_shift(4,-1),e.write_shift(4,-1);for(var i=0;i-1&&(i|=32,r=r.slice(6)),e.write_shift(4,i),e.write_shift(1,0),e.write_shift(4,null==n.Sheet?4294967295:n.Sheet);var o=[e,Cr(r),CFe(n.Ref,t)];if(n.Comment)o.push(u0(n.Comment));else{var s=se(4);s.write_shift(4,4294967295),o.push(s)}return rr(o)}(e,t))}catch{console.error("Could not serialize defined name "+JSON.stringify(e))}})}(e,n),be(e,132),e.end()}function BG(n){return Pe("NamedRange",null,{"ss:Name":"_xlnm."==n.Name.slice(0,6)?n.Name.slice(6):n.Name,"ss:RefersTo":"="+lw(n.Ref,{r:0,c:0})})}function w4e(n,t,e,i,r,o,s){if(!n||null==n.v&&null==n.f)return"";var a={};if(n.f&&(a["ss:Formula"]="="+en(lw(n.f,s))),n.F&&n.F.slice(0,t.length)==t){var c=zn(n.F.slice(t.length+1));a["ss:ArrayRange"]="RC:R"+(c.r==s.r?"":"["+(c.r-s.r)+"]")+"C"+(c.c==s.c?"":"["+(c.c-s.c)+"]")}if(n.l&&n.l.Target&&(a["ss:HRef"]=en(n.l.Target),n.l.Tooltip&&(a["x:HRefScreenTip"]=en(n.l.Tooltip))),e["!merges"])for(var l=e["!merges"],d=0;d!=l.length;++d)l[d].s.c!=s.c||l[d].s.r!=s.r||(l[d].e.c>l[d].s.c&&(a["ss:MergeAcross"]=l[d].e.c-l[d].s.c),l[d].e.r>l[d].s.r&&(a["ss:MergeDown"]=l[d].e.r-l[d].s.r));var u="",h="";switch(n.t){case"z":if(!i.sheetStubs)return"";break;case"n":u="Number",h=String(n.v);break;case"b":u="Boolean",h=n.v?"1":"0";break;case"e":u="Error",h=al[n.v];break;case"d":u="DateTime",h=new Date(n.v).toISOString(),null==n.z&&(n.z=n.z||kt[14]);break;case"s":u="String",h=function ESe(n){return(n+"").replace(HI,function(e){return UI[e]}).replace(Pj,function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"})}(n.v||"")}var f=Ed(i.cellXfs,n,i);a["ss:StyleID"]="s"+(21+f),a["ss:Index"]=s.c+1;var g="z"==n.t?"":''+(null!=n.v?h:"")+"";return(n.c||[]).length>0&&(g+=function x4e(n){return n.map(function(t){var e=function TSe(n){return n.replace(/(\r\n|[\r\n])/g," ")}(t.t||""),i=Pe("ss:Data",e,{xmlns:"http://www.w3.org/TR/REC-html40"});return Pe("Comment",i,{"ss:Author":t.a})}).join("")}(n.c)),Pe("Cell",g,a)}function C4e(n,t){var e='"}function E4e(n,t,e){var i=[],o=e.Sheets[e.SheetNames[n]],s=o?function v4e(n,t,e,i){if(!n||!((i||{}).Workbook||{}).Names)return"";for(var r=i.Workbook.Names,o=[],s=0;s0&&i.push(""+s+""),s=o?function k4e(n,t,e,i){if(!n["!ref"])return"";var r=xn(n["!ref"]),o=n["!merges"]||[],s=0,a=[];n["!cols"]&&n["!cols"].forEach(function(p,b){Cd(p);var C=!!p.width,x=hw(b,p),D={"ss:Index":b+1};C&&(D["ss:Width"]=_0(x.width)),p.hidden&&(D["ss:Hidden"]="1"),a.push(Pe("Column",null,D))});for(var c=null!=n["!data"],l=r.s.r;l<=r.e.r;++l){for(var d=[C4e(l,(n["!rows"]||[])[l])],u=r.s.c;u<=r.e.c;++u){var h=!1;for(s=0;s!=o.length;++s)if(!(o[s].s.c>u||o[s].s.r>l||o[s].e.c"),d.length>2&&a.push(d.join(""))}return a.join("")}(o,t):"",s.length>0&&i.push(""+s+"
"),i.push(function y4e(n,t,e,i){if(!n)return"";var r=[];if(n["!margins"]&&(r.push(""),n["!margins"].header&&r.push(Pe("Header",null,{"x:Margin":n["!margins"].header})),n["!margins"].footer&&r.push(Pe("Footer",null,{"x:Margin":n["!margins"].footer})),r.push(Pe("PageMargins",null,{"x:Bottom":n["!margins"].bottom||"0.75","x:Left":n["!margins"].left||"0.7","x:Right":n["!margins"].right||"0.7","x:Top":n["!margins"].top||"0.75"})),r.push("")),i&&i.Workbook&&i.Workbook.Sheets&&i.Workbook.Sheets[e])if(i.Workbook.Sheets[e].Hidden)r.push(Pe("Visible",1==i.Workbook.Sheets[e].Hidden?"SheetHidden":"SheetVeryHidden",{}));else{for(var o=0;o")}return((((i||{}).Workbook||{}).Views||[])[0]||{}).RTL&&r.push(""),n["!protect"]&&(r.push(qr("ProtectContents","True")),n["!protect"].objects&&r.push(qr("ProtectObjects","True")),n["!protect"].scenarios&&r.push(qr("ProtectScenarios","True")),null==n["!protect"].selectLockedCells||n["!protect"].selectLockedCells?null!=n["!protect"].selectUnlockedCells&&!n["!protect"].selectUnlockedCells&&r.push(qr("EnableSelection","UnlockedCells")):r.push(qr("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(s){n["!protect"][s[0]]&&r.push("<"+s[1]+"/>")})),0==r.length?"":Pe("WorksheetOptions",r.join(""),{xmlns:Cs.x})}(o,0,n,e)),o["!autofilter"]&&i.push(''),i.join("")}function T4e(n,t){t||(t={}),n.SSF||(n.SSF=qn(kt)),n.SSF&&(Bm(),e0(n.SSF),t.revssf=H1(n.SSF),t.revssf[n.SSF[65535]]=0,t.ssf=n.SSF,t.cellXfs=[],Ed(t.cellXfs,{},{revssf:{General:0}}));var e=[];e.push(function p4e(n,t){var e=[];return n.Props&&e.push(function CDe(n,t){var e=[];return yi(hM).map(function(i){for(var r=0;r'+r.join("")+""}(n.Props,n.Custprops)),e.join("")}(n,t)),e.push(function g4e(n){return(((n||{}).Workbook||{}).WBProps||{}).date1904?'':""}(n)),e.push(""),e.push("");for(var i=0;i'];return t.cellXfs.forEach(function(i,r){var o=[];o.push(Pe("NumberFormat",null,{"ss:Format":en(kt[i.numFmtId])}));var s={"ss:ID":"s"+(21+r)};e.push(Pe("Style",o.join(""),s))}),Pe("Styles",e.join(""))}(0,t),e[3]=function b4e(n){if(!((n||{}).Workbook||{}).Names)return"";for(var t=n.Workbook.Names,e=[],i=0;i0&&(i.family=a);var c=n.read_shift(1);switch(c>0&&(i.charset=c),n.l++,i.color=function JSe(n){var t={},i=n.read_shift(1)>>>1,r=n.read_shift(1),o=n.read_shift(2,"i"),s=n.read_shift(1),a=n.read_shift(1),c=n.read_shift(1);switch(n.l++,i){case 0:t.auto=1;break;case 1:t.index=r;var l=Ju[r];l&&(t.rgb=g0(l));break;case 2:t.rgb=g0([s,a,c]);break;case 3:t.theme=r}return 0!=o&&(t.tint=o>0?o/32767:o/32768),t}(n),n.read_shift(1)){case 1:i.scheme="major";break;case 2:i.scheme="minor"}return i.name=bo(n),i}},44:{f:function yIe(n,t){return[n.read_shift(2),bo(n)]}},45:{f:EIe},46:{f:SIe},47:{f:function TIe(n,t){var e=n.l+t,i=n.read_shift(2),r=n.read_shift(2);return n.l=e,{ixfe:i,numFmtId:r}}},48:{},49:{f:function $Se(n){return n.read_shift(4,"i")}},50:{},51:{f:function aMe(n){for(var t=[],e=n.read_shift(4);e-- >0;)t.push([n.read_shift(4),n.read_shift(4)]);return t}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:function Y$(n,t,e){if(!e.cellStyles)return _o(n,t);var i=e&&e.biff>=12?4:2,r=n.read_shift(i),o=n.read_shift(i),s=n.read_shift(i),a=n.read_shift(i),c=n.read_shift(2);2==i&&(n.l+=2);var l={s:r,e:o,w:s,ixfe:a,flags:c};return(e.biff>=5||!e.biff)&&(l.level=c>>8&7),l}},62:{f:function NPe(n){return[qs(n),JI(n),"is"]}},63:{f:function _Me(n){var t={};t.i=n.read_shift(4);var e={};e.r=n.read_shift(4),e.c=n.read_shift(4),t.r=ln(e);var i=n.read_shift(1);return 2&i&&(t.l="1"),8&i&&(t.a="1"),t}},64:{f:function sOe(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:_o,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function nOe(n){var t=n.read_shift(2);return n.l+=28,{RTL:32&t}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function uPe(n,t){var e={},i=n[n.l];return++n.l,e.above=!(64&i),e.left=!(128&i),n.l+=18,e.name=XSe(n,t-19),e}},148:{f:cPe,p:16},151:{f:function XPe(){}},152:{},153:{f:function NOe(n,t){var e={},i=n.read_shift(4);e.defaultThemeVersion=n.read_shift(4);var r=t>8?bo(n):"";return r.length>0&&(e.CodeName=r),e.autoCompressPictures=!!(65536&i),e.backupFile=!!(64&i),e.checkCompatibility=!!(4096&i),e.date1904=!!(1&i),e.filterPrivacy=!!(8&i),e.hidePivotFieldList=!!(1024&i),e.promptedSolutions=!!(16&i),e.publishItems=!!(2048&i),e.refreshAllConnections=!!(262144&i),e.saveExternalLinkValues=!!(128&i),e.showBorderUnselectedTables=!!(4&i),e.showInkAnnotation=!!(32&i),e.showObjects=["all","placeholders","none"][i>>13&3],e.showPivotChartFilter=!!(32768&i),e.updateLinks=["userSet","never","always"][i>>8&3],e}},154:{},155:{},156:{f:function POe(n,t){var e={};return e.Hidden=n.read_shift(4),e.iTabID=n.read_shift(4),e.strRelID=tM(n,t-8),e.name=bo(n),e}},157:{},158:{},159:{T:1,f:function FAe(n){return[n.read_shift(4),n.read_shift(4)]}},160:{T:-1},161:{T:1,f:Yu},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:GPe},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function oMe(n,t){return{flags:n.read_shift(4),version:n.read_shift(4),name:bo(n)}}},336:{T:-1},337:{f:function dMe(n){return n.l+=4,0!=n.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:tM},357:{},358:{},359:{},360:{T:1},361:{},362:{f:function Q$(n,t,e){if(e.biff<8||!(e.biff>8)&&t==n[n.l]+(3==n[n.l+1]?1:0)+1)return function K$(n,t,e){3==n[n.l+1]&&n[n.l]++;var i=m0(n,0,e);return 3==i.charCodeAt(0)?i.slice(1):i}(n,0,e);for(var i=[],r=n.l+t,o=n.read_shift(e.biff>8?4:2);0!=o--;)i.push(WDe(n,0,e));if(n.l!=r)throw new Error("Bad ExternSheet: "+n.l+" != "+r);return i}},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function YPe(n,t,e){var i=n.l+t,r=s$(n),o=n.read_shift(1),s=[r];if(s[2]=o,e.cellFormula){var a=dFe(n,i-n.l,e);s[1]=a}else n.l=i;return s}},427:{f:function ZPe(n,t,e){var i=n.l+t,o=[Yu(n,16)];if(e.cellFormula){var s=hFe(n,i-n.l,e);o[1]=s,n.l=i}else n.l=i;return o}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function eOe(n){var t={};return IG.forEach(function(e){t[e]=vo(n)}),t}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function dPe(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function QPe(n,t){var e=n.l+t,i=Yu(n,16),r=eM(n),o=bo(n),s=bo(n),a=bo(n);n.l=e;var c={rfx:i,relId:r,loc:o,display:a};return s&&(c.Tooltip=s),c}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:tM},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:IMe},633:{T:1},634:{T:-1},635:{T:1,f:function DMe(n){var t={};t.iauthor=n.read_shift(4);var e=Yu(n,16);return t.rfx=e.s,t.ref=ln(e.s),n.l+=16,t}},636:{T:-1},637:{f:QSe},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function COe(n,t){return n.l+=10,{name:bo(n)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function aOe(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Be(n,t,e,i){var r=t;if(!isNaN(r)){var o=i||(e||[]).length||0,s=n.next(4);s.write_shift(2,r),s.write_shift(2,o),o>0&&KI(e)&&n.push(e)}}function A0(n,t,e){return n||(n=se(7)),n.write_shift(2,t),n.write_shift(2,e),n.write_shift(2,0),n.write_shift(1,0),n}function L4e(n,t,e,i){if(null!=t.v)switch(t.t){case"d":case"n":var r="d"==t.t?or(xi(t.v)):t.v;return void(r==(0|r)&&r>=0&&r<65536?Be(n,2,function pAe(n,t,e){var i=se(9);return A0(i,n,t),i.write_shift(2,e),i}(e,i,r)):Be(n,3,function fAe(n,t,e){var i=se(15);return A0(i,n,t),i.write_shift(8,e,"f"),i}(e,i,r)));case"b":case"e":return void Be(n,5,function O4e(n,t,e,i){var r=se(9);return A0(r,n,t),R$(e,i||"b",r),r}(e,i,t.v,t.t));case"s":case"str":return void Be(n,4,function N4e(n,t,e){var i=se(8+2*e.length);return A0(i,n,t),i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i.l255||f.e.r>=m){if(t.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:IV16384");f.e.c=Math.min(f.e.c,255),f.e.r=Math.min(f.e.c,m-1)}Be(i,2057,gM(0,16,t)),Be(i,13,Ks(1)),Be(i,12,Ks(100)),Be(i,15,Vo(!0)),Be(i,17,Vo(!1)),Be(i,16,Zu(.001)),Be(i,95,Vo(!0)),Be(i,42,Vo(!1)),Be(i,43,Vo(!1)),Be(i,130,Ks(1)),Be(i,128,function R2e(n){var t=se(8);return t.write_shift(4,0),t.write_shift(2,n[0]?n[0]+1:0),t.write_shift(2,n[1]?n[1]+1:0),t}([0,0])),Be(i,131,Vo(!1)),Be(i,132,Vo(!1)),l&&function G4e(n,t){if(t){var e=0;t.forEach(function(i,r){++e<=256&&i&&Be(n,125,function iAe(n,t){var e=se(12);e.write_shift(2,t),e.write_shift(2,t),e.write_shift(2,256*n.width),e.write_shift(2,0);var i=0;return n.hidden&&(i|=1),e.write_shift(1,i),e.write_shift(1,i=n.level||0),e.write_shift(2,0),e}(hw(r,i),r))})}}(i,o["!cols"]),Be(i,512,function E2e(n,t){var e=8!=t.biff&&t.biff?2:4,i=se(2*e+6);return i.write_shift(e,n.s.r),i.write_shift(e,n.e.r+1),i.write_shift(2,n.s.c),i.write_shift(2,n.e.c+1),i.write_shift(2,0),i}(f,t)),l&&(o["!links"]=[]);for(var g=[],p=[],b=f.s.c;b<=f.e.c;++b)h[b]=on(b);for(var C=f.s.r;C<=f.e.r;++C)for(c&&(p=o["!data"][C]||[]),u=yn(C),b=f.s.c;b<=f.e.c;++b){d=h[b]+u;var x=c?p[b]:o[d];x&&(W4e(i,x,C,b,t),l&&x.l&&o["!links"].push([d,x.l]),l&&x.c&&g.push([d,x.c]))}var D=a.CodeName||a.name||r;return l&&Be(i,574,function m2e(n){var t=se(18),e=1718;return n&&n.RTL&&(e|=64),t.write_shift(2,e),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}((s.Views||[])[0])),l&&(o["!merges"]||[]).length&&Be(i,229,function j2e(n){var t=se(2+8*n.length);t.write_shift(2,n.length);for(var e=0;e255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+n.SheetNames[e]+"' extends beyond column IV (255). Data may be lost.")}var o=t||{};switch(o.biff||2){case 8:case 5:return function K4e(n,t){var e=t||{},i=[];n&&!n.SSF&&(n.SSF=qn(kt)),n&&n.SSF&&(Bm(),e0(n.SSF),e.revssf=H1(n.SSF),e.revssf[n.SSF[65535]]=0,e.ssf=n.SSF),e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,BM(e),e.cellXfs=[],Ed(e.cellXfs,{},{revssf:{General:0}}),n.Props||(n.Props={});for(var r=0;r255||o.e.r>16383){if(i.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");o.e.c=Math.min(o.e.c,255),o.e.r=Math.min(o.e.c,16383)}for(var l=[],d=o.s.c;d<=o.e.c;++d)c[d]=on(d);for(var u=o.s.r;u<=o.e.r;++u)for(r&&(l=t["!data"][u]||[]),a=yn(u),d=o.s.c;d<=o.e.c;++d){var h=r?l[d]:t[c[d]+a];h&&L4e(n,h,u,d)}}(i,n.Sheets[n.SheetNames[r]],0,e),Be(i,10),i.end()}(n,t)}throw new Error("invalid type "+o.bookType+" for BIFF")}function HG(n,t,e,i){for(var r=n["!merges"]||[],o=[],s={},a=null!=n["!data"],c=t.s.c;c<=t.e.c;++c){for(var l=0,d=0,u=0;ue||r[u].s.c>c||r[u].e.r1&&(s.rowspan=l),d>1&&(s.colspan=d),i.editable?m=''+m+"":f&&(s["data-t"]=f&&f.t||"z",null!=f.v&&(s["data-v"]=f.v),null!=f.z&&(s["data-z"]=f.z),f.l&&"#"!=(f.l.Target||"#").charAt(0)&&(m=''+m+"")),s.id=(i.id||"sjs")+"-"+h,o.push(Pe("td",m,s))}}return""+o.join("")+""}var zG='SheetJS Table Export',jG="";function GG(n,t){var e=t||{},r=null!=e.footer?e.footer:jG,o=[null!=e.header?e.header:zG],s=wr(n["!ref"]);o.push(function $G(n,t,e){return[].join("")+""}(0,0,e));for(var a=s.s.r;a<=s.e.r;++a)o.push(HG(n,s,a,e));return o.push(""+r),o.join("")}var eNe=function(){var n=["",'',"",'',"",'',"",""].join(""),t=""+n+"";return function(){return qi+t}}();function tNe(n,t){var e="number",i="",r={"style:name":t},o="",s=0;e:if((n=n.replace(/"[$]"/g,"$")).indexOf(";")>-1&&(console.error("Unsupported ODS Style Map exported. Using first branch of "+n),n=n.slice(0,n.indexOf(";"))),"@"!=n){if(n.indexOf(/\$/)>-1&&(e="currency"),'"'==n[s]){for(o="";'"'!=n[++s]||'"'==n[++s];)o+=n[s];"*"==n[1+--s]?(s++,i+=""+en(o.replace(/""/g,'"'))+""):i+=""+en(o.replace(/""/g,'"'))+"",n=n.slice(s+1),s=0}var a=n.match(/# (\?+)\/(\?+)/);if(a)i+=Pe("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":a[1].length,"number:max-denominator-value":Math.max(+a[1].replace(/./g,"9"),+a[2].replace(/./g,"9"))});else if(a=n.match(/# (\?+)\/(\d+)/))i+=Pe("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":a[1].length,"number:denominator-value":+a[2]});else if(a=n.match(/(\d+)(|\.\d+)%/))e="percentage",i+=Pe("number:number",null,{"number:decimal-places":a[2]&&a.length-1||0,"number:min-decimal-places":a[2]&&a.length-1||0,"number:min-integer-digits":a[1].length})+"%";else{var c=!1;if(["y","m","d"].indexOf(n[0])>-1){e="date";t:for(;s";break;case"yyy":case"yyyy":i+='';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":case"mm":case"mmm":case"mmmm":i+='';break;case"d":case"dd":i+='';break;case"ddd":case"dddd":i+=''}break;case'"':for(;'"'!=n[++s]||'"'==n[++s];)o+=n[s];--s,i+=""+en(o.slice(1).replace(/""/g,'"'))+"";break;case"/":i+=""+en(o)+"";break;default:console.error("unrecognized character "+o+" in ODF format "+n)}if(!c)break e;n=n.slice(s+1),s=0}if(n.match(/^\[?[hms]/))for("number"==e&&(e="time"),n.match(/\[/)&&(n=n.replace(/[\[\]]/g,""),r["number:truncate-on-overflow"]="false");s';break;case"m":case"mm":i+='';break;case"s":case"ss":if("."==n[s+1])do{o+=n[s+1],++s}while("0"==n[s+1]);i+='"}break;case'"':for(;'"'!=n[++s]||'"'==n[++s];)o+=n[s];--s,i+=""+en(o.slice(1).replace(/""/g,'"'))+"";break;case"/":i+=""+en(o)+"";break;case"a":if("a/p"==n.slice(s,s+3).toLowerCase()){i+="",s+=2;break}if("am/pm"==n.slice(s,s+5).toLowerCase()){i+="",s+=4;break}default:console.error("unrecognized character "+o+" in ODF format "+n)}else{if(n.indexOf(/\$/)>-1&&(e="currency"),"$"==n[0]&&(i+='$',n=n.slice(1),s=0),'"'==n[s=0]){for(;'"'!=n[++s]||'"'==n[++s];)o+=n[s];"*"==n[1+--s]?(s++,i+=""+en(o.replace(/""/g,'"'))+""):i+=""+en(o.replace(/""/g,'"'))+"",n=n.slice(s+1),s=0}var d=n.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(d&&d[0]){var u=d[1].replace(/,/g,"");i+="-1?' number:grouping="true"':"")+(d[2]&&' number:decimal-places="'+(d[2].length-1)+'"'||' number:decimal-places="0"')+(d[3]&&d[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(d[3]?' number:min-exponent-digits="'+d[3].match(/0+/)[0].length+'"':"")+">",s=d.index+d[0].length}else console.error("Could not find numeric part of "+n);if('"'==n[s]){for(o="";'"'!=n[++s]||'"'==n[++s];)o+=n[s];--s,i+=""+en(o.replace(/""/g,'"'))+""}}}}else e="text",i="";return i?Pe("number:"+e+"-style",i,r):(console.error("Could not generate ODS number format for |"+n+"|"),"")}function JG(n,t,e){var i=n.filter(function(r){return r.Sheet==(-1==e?null:e)});return i.length?" \n"+i.map(function(r){var o=TG(r.Ref);return" "+Pe("table:named-range",null,{"table:name":r.Name,"table:cell-range-address":o,"table:base-cell-address":o.replace(/[\.]?[^\.]*$/,".$A$1")})}).join("\n")+"\n \n":""}var eW=function(){var n=function(o){return en(o).replace(/ +/g,function(s){return''}).replace(/\t/g,"").replace(/\n/g,"").replace(/^ /,"").replace(/ $/,"")},t=" \n",i=function(o,s,a,c,l){var d=[];d.push(' \n');var u=0,h=0,f=wr(o["!ref"]||"A1"),m=o["!merges"]||[],g=0,p=null!=o["!data"];if(o["!cols"])for(h=0;h<=f.e.c;++h)d.push(" \n");var C=o["!rows"]||[];for(u=0;u\n");for(;u<=f.e.r;++u){for(d.push(" \n"),h=0;hh||m[g].s.r>u||m[g].e.c\n");else{var P=ln({r:u,c:h}),S=p?(o["!data"][u]||[])[h]:o[P];if(S&&S.f&&(D["table:formula"]=en(TFe(S.f)),S.F&&S.F.slice(0,P.length)==P)){var U=wr(S.F);D["table:number-matrix-columns-spanned"]=U.e.c-U.s.c+1,D["table:number-matrix-rows-spanned"]=U.e.r-U.s.r+1}if(S){switch(S.t){case"b":j=S.v?"TRUE":"FALSE",D["office:value-type"]="boolean",D["office:boolean-value"]=S.v?"true":"false";break;case"n":j=S.w||String(S.v||0),D["office:value-type"]="float",D["office:value"]=S.v||0;break;case"s":case"str":j=null==S.v?"":S.v,D["office:value-type"]="string";break;case"d":j=S.w||xi(S.v).toISOString(),D["office:value-type"]="date",D["office:date-value"]=xi(S.v).toISOString(),D["table:style-name"]="ce1";break;default:d.push(t);continue}var V=n(j);if(S.l&&S.l.Target){var q=S.l.Target;"#"!=(q="#"==q.charAt(0)?"#"+TG(q.slice(1)):q).charAt(0)&&!q.match(/^\w+:/)&&(q="../"+q),V=Pe("text:a",V,{"xlink:href":q.replace(/&/g,"&")})}l[S.z]&&(D["table:style-name"]="ce"+l[S.z].slice(1)),d.push(" "+Pe("table:table-cell",Pe("text:p",V,{}),D)+"\n")}else d.push(t)}}d.push(" \n")}return(s.Workbook||{}).Names&&d.push(JG(s.Workbook.Names,0,a)),d.push(" \n"),d.join("")};return function(s,a){var c=[qi],l=o0({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=o0({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==a.bookType?(c.push("\n"),c.push(f$().replace(//,"").replace(/<\/office:document-meta>/,"")+"\n")):c.push("\n");var u=function(o,s){o.push(" \n");var a=0;s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u&&u["!cols"])for(var h=0;h\n'),o.push(' \n'),o.push(" \n"),++a}});var c=0;s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u&&u["!rows"])for(var h=0;h\n'),o.push(' \n'),o.push(" \n"),++c}}),o.push(' \n'),o.push(' \n'),o.push(" \n"),o.push(' \n'),o.push(' \n'),o.push(" /\n"),o.push(' \n'),o.push(" /\n"),o.push(" \n"),o.push(" \n");var l={},d=69;return s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u)for(var h=null!=u["!data"],f=wr(u["!ref"]),m=0;m<=f.e.r;++m)for(var g=0;g<=f.e.c;++g){var p=h?(u["!data"][m]||[])[g]:u[ln({r:m,c:g})];if(p&&p.z&&"general"!=p.z.toLowerCase()&&!l[p.z]){var b=tNe(p.z,"N"+d);b&&(l[p.z]="N"+d,++d,o.push(b+"\n"))}}}),o.push(' \n'),yi(l).forEach(function(u){o.push('\n')}),o.push(" \n"),l}(c,s);c.push(" \n"),c.push(" \n"),((s.Workbook||{}).WBProps||{}).date1904&&c.push(' \n \n \n');for(var h=0;h!=s.SheetNames.length;++h)c.push(i(s.Sheets[s.SheetNames[h]],s,h,0,u));return(s.Workbook||{}).Names&&c.push(JG(s.Workbook.Names,0,-1)),c.push(" \n"),c.push(" \n"),c.push("fods"==a.bookType?"":""),c.join("")}}();function tW(n,t){if("fods"==t.bookType)return eW(n,t);var e=VI(),i="",r=[],o=[];return Jt(e,i="mimetype","application/vnd.oasis.opendocument.spreadsheet"),Jt(e,i="content.xml",eW(n,t)),r.push([i,"text/xml"]),o.push([i,"ContentFile"]),Jt(e,i="styles.xml",eNe(n,t)),r.push([i,"text/xml"]),o.push([i,"StylesFile"]),Jt(e,i="meta.xml",qi+f$()),r.push([i,"text/xml"]),o.push([i,"MetadataFile"]),Jt(e,i="manifest.rdf",function _De(n){var t=[qi];t.push('\n');for(var e=0;e!=n.length;++e)t.push(h$(n[e][0],n[e][1])),t.push(gDe("",n[e][0]));return t.push(h$("","Document","pkg")),t.push(""),t.join("")}(o)),r.push([i,"application/rdf+xml"]),Jt(e,i="META-INF/manifest.xml",function pDe(n){var t=[qi];t.push('\n'),t.push(' \n');for(var e=0;e\n');return t.push(""),t.join("")}(r)),e}var lr=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":("function"==typeof Buffer.from?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function ll(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Or(n){return typeof TextDecoder<"u"?(new TextDecoder).decode(n):Kn(nc(n))}function Ea(n){return typeof TextEncoder<"u"?(new TextEncoder).encode(n):Lo(rc(n))}function Td(n){for(var t=0,e=0;e=128&&(i|=(127&n[e])<<7,n[e++]<128||(i|=(127&n[e])<<14,n[e++]<128)||(i|=(127&n[e])<<21,n[e++]<128)||(i+=(127&n[e])*Math.pow(2,28),++e,n[e++]<128)||(i+=(127&n[e])*Math.pow(2,35),++e,n[e++]<128)||(i+=(127&n[e])*Math.pow(2,42),++e,n[e++]<128)))break e;return t.l=e,i}function bt(n){var t=new Uint8Array(7);t[0]=127&n;var e=1;e:if(n>127){if(t[e-1]|=128,t[e]=n>>7&127,++e,n<=16383||(t[e-1]|=128,t[e]=n>>14&127,++e,n<=2097151)||(t[e-1]|=128,t[e]=n>>21&127,++e,n<=268435455)||(t[e-1]|=128,t[e]=n/256>>>21&127,++e,n<=34359738367)||(t[e-1]|=128,t[e]=n/65536>>>21&127,++e,n<=4398046511103))break e;t[e-1]|=128,t[e]=n/16777216>>>21&127,++e}return t[lr](0,e)}function nW(n){for(var t={l:0},e=[];t.l=128){if(e|=(127&n[t])<<7,n[t++]<128||(e|=(127&n[t])<<14,n[t++]<128)||(e|=(127&n[t])<<21,n[t++]<128))break e;e|=(127&n[t])<<28}return e}function Ke(n){for(var t=[],e={l:0};e.l=128;);s=n[lr](e.l,a),e.l=a;break;case 1:s=n[lr](a,a+8),e.l=a+8;break;case 2:var c=I0(n,e);s=n[lr](e.l,e.l+c),e.l+=c;break;case 5:s=n[lr](a,a+4),e.l=a+4;break;default:throw new Error("PB Type ".concat(o," for Field ").concat(r," at offset ").concat(i))}var l={data:s,type:o};null==t[r]&&(t[r]=[]),t[r].push(l)}return t}function Ct(n){var t=[];return n.forEach(function(e,i){0!=i&&e.forEach(function(r){r.data&&(t.push(bt(8*i+r.type)),2==r.type&&t.push(bt(r.data.length)),t.push(r.data))})}),Td(t)}function ah(n,t){return n?.map(function(e){return t(e.data)})||[]}function M0(n){for(var t,e=[],i={l:0};i.l>>0>0),e.push(s)}return e}function R0(n){var t=[];return n.forEach(function(e){var i=[[],[{data:bt(e.id),type:0}],[]];null!=e.merge&&(i[3]=[{data:bt(+!!e.merge),type:0}]);var r=[];e.messages.forEach(function(s){r.push(s.data),s.meta[3]=[{type:0,data:bt(s.data.length)}],i[2].push({data:Ct(s.meta),type:2})});var o=Ct(i);t.push(bt(o.length)),t.push(o),r.forEach(function(s){return t.push(s)})}),Td(t)}function rNe(n,t){if(0!=n)throw new Error("Unexpected Snappy chunk type ".concat(n));for(var e={l:0},i=I0(t,e),r=[],o=e.l;o>2&7),l=(224&t[o++])<<3,l|=t[o++]):(d=1+(t[o++]>>2),2==s?(l=t[o]|t[o+1]<<8,o+=2):(l=(t[o]|t[o+1]<<8|t[o+2]<<16|t[o+3]<<24)>>>0,o+=4)),0==l)throw new Error("Invalid offset 0");for(var u=r.length-1,h=l;u>=0&&h>=r[u].length;)h-=r[u].length,--u;if(u<0){if(0!=h)throw new Error("Invalid offset beyond length");h=r[u=0].length}if(d0&&(r.push(r[u][lr](r[u].length-h)),d-=h),++u;d>=r[u].length;)r.push(r[u]),d-=r[u].length,++u;d&&r.push(r[u][lr](0,d))}r.length>25&&(r=[Td(r)])}else{var a=t[o++]>>2;if(a<60)++a;else{var c=a-59;a=t[o],c>1&&(a|=t[o+1]<<8),c>2&&(a|=t[o+2]<<16),c>3&&(a|=t[o+3]<<24),a>>>=0,a++,o+=c}r.push(t[lr](o,o+a)),o+=a}}for(var f=0,m=0;m>8&255]))):i<=16777216?(s+=4,t.push(new Uint8Array([248,i-1&255,i-1>>8&255,i-1>>16&255]))):i<=4294967296&&(s+=5,t.push(new Uint8Array([252,i-1&255,i-1>>8&255,i-1>>16&255,i-1>>>24&255]))),t.push(n[lr](e,e+i)),s+=i,r[0]=0,r[1]=255&s,r[2]=s>>8&255,r[3]=s>>16&255,e+=i}return Td(t)}function mw(n,t){var e=new Uint8Array(32),i=ll(e),r=12,o=0;switch(e[0]=5,n.t){case"n":e[1]=2,function iNe(n,t,e){var i=Math.floor(0==e?0:Math.LOG10E*Math.log(Math.abs(e)))+6176-16,r=e/Math.pow(10,i-6176);n[t+15]|=i>>7,n[t+14]|=(127&i)<<1;for(var o=0;r>=1;++o,r/=256)n[t+o]=255&r;n[t+15]|=e>=0?0:128}(e,r,n.v),o|=1,r+=16;break;case"b":e[1]=6,i.setFloat64(r,n.v?1:0,!0),o|=2,r+=8;break;case"s":var s=null==n.v?"":String(n.v),a=t.indexOf(s);-1==a&&(t[a=t.length]=s),e[1]=3,i.setUint32(r,a,!0),o|=8,r+=4;break;default:throw"unsupported cell type "+n.t}return i.setUint32(8,o,!0),e[lr](0,r)}function pw(n,t){var e=new Uint8Array(32),i=ll(e),r=12,o=0;switch(e[0]=4,n.t){case"n":e[2]=2,i.setFloat64(r,n.v,!0),o|=32,r+=8;break;case"b":e[2]=6,i.setFloat64(r,n.v?1:0,!0),o|=32,r+=8;break;case"s":var s=null==n.v?"":String(n.v),a=t.indexOf(s);-1==a&&(t[a=t.length]=s),e[2]=3,i.setUint32(r,a,!0),o|=16,r+=4;break;default:throw"unsupported cell type "+n.t}return i.setUint32(8,o,!0),e[lr](0,r)}function Yn(n){return wn(Ke(n)[1][0].data)}function dl(n){return Ct([[],[{type:0,data:bt(n)}]])}function Sd(n,t){var e,i=null!=(e=n.messages[0].meta[5])&&e[0]?nW(n.messages[0].meta[5][0].data):[];-1==i.indexOf(t)&&(i.push(t),n.messages[0].meta[5]=[{type:2,data:iW(i)}])}function ul(n,t){var e,i=null!=(e=n.messages[0].meta[5])&&e[0]?nW(n.messages[0].meta[5][0].data):[];n.messages[0].meta[5]=[{type:2,data:iW(i.filter(function(r){return r!=t}))}]}function pNe(n,t,e){var i,r,o=[[],[{type:0,data:bt(0)}],[{type:0,data:bt(0)}],[{type:2,data:new Uint8Array([])}],[{type:2,data:new Uint8Array(Array.from({length:510},function(){return 255}))}],[{type:0,data:bt(5)}],[{type:2,data:new Uint8Array([])}],[{type:2,data:new Uint8Array(Array.from({length:510},function(){return 255}))}],[{type:0,data:bt(1)}]];if(null==(i=o[6])||!i[0]||null==(r=o[7])||!r[0])throw"Mutation only works on post-BNC storages!";var s=0;if(o[7][0].data.length<2*n.length){var a=new Uint8Array(2*n.length);a.set(o[7][0].data),o[7][0].data=a}if(o[4][0].data.length<2*n.length){var c=new Uint8Array(2*n.length);c.set(o[4][0].data),o[4][0].data=c}for(var l=ll(o[7][0].data),d=0,u=[],h=ll(o[4][0].data),f=0,m=[],g=e?4:1,p=0;p-1,r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};BM(t=t||{});var o=VI(),s="",a=0;if(t.cellXfs=[],Ed(t.cellXfs,{},{revssf:{General:0}}),n.Props||(n.Props={}),Jt(o,s="docProps/core.xml",p$(n.Props,t)),r.coreprops.push(s),Xn(t.rels,2,s,tn.CORE_PROPS),s="docProps/app.xml",!n.Props||!n.Props.SheetNames)if(n.Workbook&&n.Workbook.Sheets){for(var c=[],l=0;l0&&(Jt(o,s="docProps/custom.xml",v$(n.Custprops)),r.custprops.push(s),Xn(t.rels,4,s,tn.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,a=1;a<=n.SheetNames.length;++a){var u={"!id":{}},h=n.Sheets[n.SheetNames[a-1]];if(Jt(o,s="xl/worksheets/sheet"+a+"."+e,rPe(a-1,t,n,u)),r.sheets.push(s),Xn(t.wbrels,-1,"worksheets/sheet"+a+"."+e,tn.WS[0]),h){var m=h["!comments"],g=!1,p="";if(m&&m.length>0){var b=!1;m.forEach(function(C){C[1].forEach(function(x){1==x.T&&(b=!0)})}),b&&(Jt(o,p="xl/threadedComments/threadedComment"+a+".xml",EMe(m,d,t)),r.threadedcomments.push(p),Xn(u,-1,"../threadedComments/threadedComment"+a+".xml",tn.TCMNT)),Jt(o,p="xl/comments"+a+"."+e,CMe(m)),r.comments.push(p),Xn(u,-1,"../comments"+a+"."+e,tn.CMNT),g=!0}h["!legacy"]&&g&&Jt(o,"xl/drawings/vmlDrawing"+a+".vml",dG(a,h["!comments"])),delete h["!comments"],delete h["!legacy"]}u["!id"].rId1&&Jt(o,h0(s),$m(u))}return null!=t.Strings&&t.Strings.length>0&&(Jt(o,s="xl/sharedStrings."+e,function RAe(n,t){if(!t.bookSST)return"";var e=[qi];e[e.length]=Pe("sst",null,{xmlns:Wu[0],count:n.Count,uniqueCount:n.Unique});for(var i=0;i!=n.length;++i)if(null!=n[i]){var r=n[i],o="";r.r?o+=r.r:(o+=""),e[e.length]=o+=""}return e.length>2&&(e[e.length]="",e[1]=e[1].replace("/>",">")),e.join("")}(t.Strings,t)),r.strs.push(s),Xn(t.wbrels,-1,"sharedStrings."+e,tn.SST)),Jt(o,s="xl/workbook."+e,function FOe(n){var t=[qi];t[t.length]=Pe("workbook",null,{xmlns:Wu[0],"xmlns:r":yr.r});var e=n.Workbook&&(n.Workbook.Names||[]).length>0,i={codeName:"ThisWorkbook"};n.Workbook&&n.Workbook.WBProps&&(IM.forEach(function(a){null!=n.Workbook.WBProps[a[0]]&&n.Workbook.WBProps[a[0]]!=a[1]&&(i[a[0]]=n.Workbook.WBProps[a[0]])}),n.Workbook.WBProps.CodeName&&(i.codeName=n.Workbook.WBProps.CodeName,delete i.CodeName)),t[t.length]=Pe("workbookPr",null,i);var r=n.Workbook&&n.Workbook.Sheets||[],o=0;if(r&&r[0]&&r[0].Hidden){for(t[t.length]="",o=0;o!=n.SheetNames.length&&r[o]&&r[o].Hidden;++o);o==n.SheetNames.length&&(o=0),t[t.length]='',t[t.length]=""}for(t[t.length]="",o=0;o!=n.SheetNames.length;++o){var s={name:en(n.SheetNames[o].slice(0,31))};if(s.sheetId=""+(o+1),s["r:id"]="rId"+(o+1),r[o])switch(r[o].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden"}t[t.length]=Pe("sheet",null,s)}return t[t.length]="",e&&(t[t.length]="",n.Workbook&&n.Workbook.Names&&n.Workbook.Names.forEach(function(a){var c={name:a.Name};a.Comment&&(c.comment=a.Comment),null!=a.Sheet&&(c.localSheetId=""+a.Sheet),a.Hidden&&(c.hidden="1"),a.Ref&&(t[t.length]=Pe("definedName",en(a.Ref),c))}),t[t.length]=""),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(n)),r.workbooks.push(s),Xn(t.rels,1,s,tn.WB),Jt(o,s="xl/theme/theme1.xml",CM(n.Themes,t)),r.themes.push(s),Xn(t.wbrels,-1,"theme/theme1.xml",tn.THEME),Jt(o,s="xl/styles."+e,function vIe(n,t){var i,e=[qi,Pe("styleSheet",null,{xmlns:Wu[0],"xmlns:vt":yr.vt})];return n.SSF&&null!=(i=function pIe(n){var t=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(e){for(var i=e[0];i<=e[1];++i)null!=n[i]&&(t[t.length]=Pe("numFmt",null,{numFmtId:i,formatCode:en(n[i])}))}),1===t.length?"":(t[t.length]="",t[0]=Pe("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(n.SSF))&&(e[e.length]=i),e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',(i=function _Ie(n){var t=[];return t[t.length]=Pe("cellXfs",null),n.forEach(function(e){t[t.length]=Pe("xf",null,e)}),t[t.length]="",2===t.length?"":(t[0]=Pe("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(t.cellXfs))&&(e[e.length]=i),e[e.length]='',e[e.length]='',e[e.length]='',e.length>2&&(e[e.length]="",e[1]=e[1].replace("/>",">")),e.join("")}(n,t)),r.styles.push(s),Xn(t.wbrels,-1,"styles."+e,tn.STY),n.vbaraw&&i&&(Jt(o,s="xl/vbaProject.bin",n.vbaraw),r.vba.push(s),Xn(t.wbrels,-1,"vbaProject.bin",tn.VBA)),Jt(o,s="xl/metadata."+e,function pMe(){var n=[qi];return n.push('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),n.join("")}()),r.metadata.push(s),Xn(t.wbrels,-1,"metadata."+e,tn.XLMETA),d.length>1&&(Jt(o,s="xl/persons/person.xml",function SMe(n){var t=[qi,Pe("personList",null,{xmlns:yr.TCMNT,"xmlns:x":Wu[0]}).replace(/[\/]>/,">")];return n.forEach(function(e,i){t.push(Pe("person",null,{displayName:e,id:"{54EE7950-7262-4200-6969-"+("000000000000"+i).slice(-12)+"}",userId:e,providerId:"None"}))}),t.push(""),t.join("")}(d)),r.people.push(s),Xn(t.wbrels,-1,"persons/person.xml",tn.PEOPLE)),Jt(o,"[Content_Types].xml",u$(r,t)),Jt(o,"_rels/.rels",$m(t.rels)),Jt(o,"xl/_rels/workbook.xml.rels",$m(t.wbrels)),delete t.revssf,delete t.ssf,o}function hW(n,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return t0(t.file,wt.write(n,{type:rn?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return wt.write(n,t)}function MNe(n,t){switch(t.bookType){case"ods":return tW(n,t);case"numbers":return function _Ne(n,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var e=wt.read(t.numbers,{type:"base64"}),i=function gNe(n){var t={},e=[];return n.FileIndex.map(function(i,r){return[i,n.FullPaths[r]]}).forEach(function(i){var r=i[0],o=i[1];2==r.type&&r.name.match(/\.iwa/)&&0==r.content[0]&&M0(F0(r.content)).forEach(function(s){e.push(s.id),t[s.id]={deps:[],location:o,type:wn(s.messages[0].meta[1][0].data)}})}),n.FileIndex.forEach(function(i){i.name.match(/\.iwa/)&&0==i.content[0]&&M0(F0(i.content)).forEach(function(r){r.messages.forEach(function(o){[5,6].forEach(function(s){o.meta[s]&&o.meta[s].forEach(function(a){t[r.id].deps.push(wn(a.data))})})})})}),t}(e),r=cc(e,i,1);if(null==r)throw"Could not find message ".concat(1," in Numbers template");var o=ah(Ke(r.messages[0].data)[1],Yn);if(o.length>1)throw new Error("Template NUMBERS file must have exactly one sheet");return n.SheetNames.forEach(function(s,a){a>=1&&(function bNe(n,t,e){var i=-1,r=-1,o={};kr(n,t,1,function(l,d){var u=Ke(l.messages[0].data);i=Yn(Ke(l.messages[0].data)[1][0].data),r=Dd({deps:[1],location:t[i].location,type:2},t),o[i]=r,Sd(l,r),u[1].push({type:2,data:dl(r)});var h=cc(n,t,i);h.id=r,t[1].location==t[r].location?d.push(h):kr(n,t,r,function(f,m){return m.push(h)}),l.messages[0].data=Ct(u)});var s=-1;kr(n,t,r,function(l,d){for(var u=Ke(l.messages[0].data),h=3;h<=69;++h)delete u[h];var f=ah(u[2],Yn);f.forEach(function(p){return ul(l,p)}),s=Dd({deps:[r],location:t[f[0]].location,type:t[f[0]].type},t),Sd(l,s),o[f[0]]=s,u[2]=[{type:2,data:dl(s)}];var m=cc(n,t,f[0]);if(m.id=s,t[f[0]].location==t[r].location)d.push(m);else{var g=t[r].location;g=(g=g.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,2,function(p){var b=Ke(p.messages[0].data),C=b[3].findIndex(function(D){var j,P,S=Ke(D.data);return null!=(j=S[3])&&j[0]?Or(S[3][0].data)==g:!(null==(P=S[2])||!P[0]||Or(S[2][0].data)!=g)}),x=Ke(b[3][C].data);x[6]||(x[6]=[]),x[6].push({type:2,data:Ct([[],[{type:0,data:bt(s)}]])}),b[3][C].data=Ct(x),p.messages[0].data=Ct(b)}),kr(n,t,s,function(p,b){return b.push(m)})}l.messages[0].data=Ct(u)});var a=-1;kr(n,t,s,function(l,d){for(var u=Ke(l.messages[0].data),h=Ke(u[1][0].data),f=3;f<=69;++f)delete h[f];var m=Yn(h[2][0].data);h[2][0].data=dl(o[m]),u[1][0].data=Ct(h);var g=Yn(u[2][0].data);ul(l,g),Sd(l,a=Dd({deps:[s],location:t[g].location,type:t[g].type},t)),o[g]=a,u[2][0].data=dl(a);var p=cc(n,t,g);p.id=a,t[s].location==t[a].location?d.push(p):kr(n,t,a,function(b,C){return C.push(p)}),l.messages[0].data=Ct(u)});var c=t[a].location;c=(c=c.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,a,function(l,d){var u,h,f=Ke(l.messages[0].data),g=Or(f[1][0].data).replace(/-[A-Z0-9]*/,"-".concat(e.toString(16).padStart(4,"0")));if(f[1][0].data=Ea(g),[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(P){return delete f[P]}),f[45]){var b=Yn(Ke(f[45][0].data)[1][0].data);ul(l,b),delete f[45]}f[70]&&(null==(u=Ke(f[70][0].data)[2])||u.forEach(function(P){var S=Ke(P.data);[2,3].map(function(U){return S[U][0]}).forEach(function(U){var V=Ke(U.data);if(V[8]){var q=Yn(V[8][0].data);ul(l,q)}})}),delete f[70]),[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(P){if(f[P]){var S=Yn(f[P][0].data);delete f[P],ul(l,S)}});var x=Ke(f[4][0].data);[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(P){var S;if(null!=(S=x[P])&&S[0]){var U=Yn(x[P][0].data),V=Dd({deps:[a],location:t[U].location,type:t[U].type},t);ul(l,U),Sd(l,V),o[U]=V;var q=cc(n,t,U);if(q.id=V,t[U].location==t[a].location)d.push(q);else{t[V].location=t[U].location.replace(U.toString(),V.toString()),t[V].location==t[U].location&&(t[V].location=t[V].location.replace(/\.iwa/,"-".concat(V,".iwa"))),wt.utils.cfb_add(n,t[V].location,P0(R0([q])));var J=t[V].location;J=(J=J.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,2,function(G){var ve=Ke(G.messages[0].data);ve[3].push({type:2,data:Ct([[],[{type:0,data:bt(V)}],[{type:2,data:Ea(J.replace(/-.*$/,""))}],[{type:2,data:Ea(J)}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:bt(0)}],[],[{type:0,data:bt(0)}]])}),ve[1]=[{type:0,data:bt(Math.max(V+1,wn(ve[1][0].data)))}];var Se=ve[3].findIndex(function(re){var Y,ge,le=Ke(re.data);return null!=(Y=le[3])&&Y[0]?Or(le[3][0].data)==c:!(null==(ge=le[2])||!ge[0]||Or(le[2][0].data)!=c)}),me=Ke(ve[3][Se].data);me[6]||(me[6]=[]),me[6].push({type:2,data:Ct([[],[{type:0,data:bt(V)}]])}),ve[3][Se].data=Ct(me),G.messages[0].data=Ct(ve)})}x[P][0].data=dl(V)}});var D=Ke(x[1][0].data);null==(h=D[2])||h.forEach(function(P){var S=Yn(P.data),U=Dd({deps:[a],location:t[S].location,type:t[S].type},t);ul(l,S),Sd(l,U),o[S]=U;var V=cc(n,t,S);if(V.id=U,t[S].location==t[a].location)d.push(V);else{t[U].location=t[S].location.replace(S.toString(),U.toString()),t[U].location==t[S].location&&(t[U].location=t[U].location.replace(/\.iwa/,"-".concat(U,".iwa"))),wt.utils.cfb_add(n,t[U].location,P0(R0([V])));var q=t[U].location;q=(q=q.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,2,function(J){var G=Ke(J.messages[0].data);G[3].push({type:2,data:Ct([[],[{type:0,data:bt(U)}],[{type:2,data:Ea(q.replace(/-.*$/,""))}],[{type:2,data:Ea(q)}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:bt(0)}],[],[{type:0,data:bt(0)}]])}),G[1]=[{type:0,data:bt(Math.max(U+1,wn(G[1][0].data)))}];var ve=G[3].findIndex(function(me){var re,Y,ge=Ke(me.data);return null!=(re=ge[3])&&re[0]?Or(ge[3][0].data)==c:!(null==(Y=ge[2])||!Y[0]||Or(ge[2][0].data)!=c)}),Se=Ke(G[3][ve].data);Se[6]||(Se[6]=[]),Se[6].push({type:2,data:Ct([[],[{type:0,data:bt(U)}]])}),G[3][ve].data=Ct(Se),J.messages[0].data=Ct(G)})}P.data=dl(U)}),x[1][0].data=Ct(D);var j=Ke(x[3][0].data);j[1].forEach(function(P){var S=Ke(P.data),U=Yn(S[2][0].data),V=o[U];if(!o[U]){V=Dd({deps:[a],location:"",type:t[U].type},t),t[V].location="Root Entry/Index/Tables/Tile-".concat(V,".iwa"),o[U]=V;var q=cc(n,t,U);q.id=V,ul(l,U),Sd(l,V),wt.utils.cfb_add(n,"/Index/Tables/Tile-".concat(V,".iwa"),P0(R0([q]))),kr(n,t,2,function(J){var G=Ke(J.messages[0].data);G[3].push({type:2,data:Ct([[],[{type:0,data:bt(V)}],[{type:2,data:Ea("Tables/Tile")}],[{type:2,data:Ea("Tables/Tile-".concat(V))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:bt(0)}],[],[{type:0,data:bt(0)}]])}),G[1]=[{type:0,data:bt(Math.max(V+1,wn(G[1][0].data)))}];var ve=G[3].findIndex(function(me){var re,Y,ge=Ke(me.data);return null!=(re=ge[3])&&re[0]?Or(ge[3][0].data)==c:!(null==(Y=ge[2])||!Y[0]||Or(ge[2][0].data)!=c)}),Se=Ke(G[3][ve].data);Se[6]||(Se[6]=[]),Se[6].push({type:2,data:Ct([[],[{type:0,data:bt(V)}]])}),G[3][ve].data=Ct(Se),J.messages[0].data=Ct(G)})}S[2][0].data=dl(V),P.data=Ct(S)}),x[3][0].data=Ct(j),f[4][0].data=Ct(x),l.messages[0].data=Ct(f)})}(e,i,a+1),r=cc(e,i,1),o=ah(Ke(r.messages[0].data)[1],Yn)),function vNe(n,t,e,i,r,o){var s=[];kr(n,t,o,function(l){var d=Ke(l.messages[0].data);d[1]=[{type:2,data:Ea(i)}],s=ah(d[2],Yn),l.messages[0].data=Ct(d)});var c=Yn(Ke(cc(n,t,s[0]).messages[0].data)[2][0].data);kr(n,t,c,function(l,d){return function yNe(n,t,e,i,r,o){var s=wr(e["!ref"]);s.s.r=s.s.c=0;var a=!1;s.e.c>999&&(a=!0,s.e.c=999),s.e.r>999999&&(a=!0,s.e.r=999999),a&&console.error("Truncating to ".concat(Wt(s)));var c=bw(e,{range:s,header:1}),l=["~Sh33tJ5~"],d=t[o].location;d=(d=d.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,"");var u=Ke(i.messages[0].data);u[6][0].data=bt(s.e.r+1),u[7][0].data=bt(s.e.c+1),delete u[46];var h=Ke(u[4][0].data);kr(n,t,Yn(Ke(h[1][0].data)[2][0].data),function(Se,me){var re,Y=Ke(Se.messages[0].data);if(null!=(re=Y?.[2])&&re[0])for(var ge=0;ge0&&(Jt(o,s="docProps/custom.xml",v$(n.Custprops)),r.custprops.push(s),Xn(t.rels,4,s,tn.CUST_PROPS)),a=1;a<=n.SheetNames.length;++a){var d={"!id":{}},u=n.Sheets[n.SheetNames[a-1]];if(Jt(o,s="xl/worksheets/sheet"+a+"."+e,vOe(a-1,t,n,d)),r.sheets.push(s),Xn(t.wbrels,-1,"worksheets/sheet"+a+"."+e,tn.WS[0]),u){var f=u["!comments"],m=!1,g="";f&&f.length>0&&(Jt(o,g="xl/comments"+a+"."+e,FMe(f)),r.comments.push(g),Xn(d,-1,"../comments"+a+"."+e,tn.CMNT),m=!0),u["!legacy"]&&m&&Jt(o,"xl/drawings/vmlDrawing"+a+".vml",dG(a,u["!comments"])),delete u["!comments"],delete u["!legacy"]}d["!id"].rId1&&Jt(o,h0(s),$m(d))}return null!=t.Strings&&t.Strings.length>0&&(Jt(o,s="xl/sharedStrings."+e,function LAe(n){var t=Jo();be(t,159,function OAe(n,t){return t||(t=se(8)),t.write_shift(4,n.Count),t.write_shift(4,n.Unique),t}(n));for(var e=0;e22)throw new Error("Bad Code Name: Worksheet"+s)}})}(n.SheetNames,n.Workbook&&n.Workbook.Sheets||[],!!n.vbaraw);for(var e=0;e255&&(e=95),o=e>>2,(i=n.charCodeAt(l++))>255&&(i=95),s=(3&e)<<4|i>>4,(r=n.charCodeAt(l++))>255&&(r=95),a=(15&i)<<2|r>>6,c=63&r,isNaN(i)?a=c=64:isNaN(r)&&(c=64),t+=$s.charAt(o)+$s.charAt(s)+$s.charAt(a)+$s.charAt(c);return t}(n);case"binary":case"string":return n;case"file":return t0(t.file,n,"binary");case"buffer":return rn?tc(n,"binary"):n.split("").map(function(e){return e.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}(bW(n.Sheets[n.SheetNames[r]],e),e);case"csv":return lc(jM(n.Sheets[n.SheetNames[r]],e),e,"\ufeff");case"dif":return lc(J$.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"dbf":return _w(_M.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"prn":return lc(Gm.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"rtf":return lc(function iIe(n,t){var e=["{\\rtf1\\ansi"];if(!n["!ref"])return e[0]+"}";for(var r,i=xn(n["!ref"]),o=null!=n["!data"],s=[],a=i.s.r;a<=i.e.r;++a){e.push("\\trowd\\trautofit1");for(var c=i.s.c;c<=i.e.c;++c)e.push("\\cellx"+(c+1));for(e.push("\\pard\\intbl"),o&&(s=n["!data"][a]||[]),c=i.s.c;c<=i.e.c;++c){var l=ln({r:a,c});(r=o?s[c]:n[l])&&(null!=r.v||r.f&&!r.F)?(e.push(" "+(r.w||(oc(r),r.w)||"").replace(/[\r\n]/g,"\\par ")),e.push("\\cell")):e.push(" \\cell")}e.push("\\pard\\intbl\\row")}return e.join("")+"}"}(n.Sheets[n.SheetNames[r]]),e);case"eth":return lc(eG.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"fods":return lc(tW(n,e),e);case"wk1":return _w(rh.sheet_to_wk1(n.Sheets[n.SheetNames[r]],e),e);case"wk3":return _w(rh.book_to_wk3(n,e),e);case"biff2":e.biff||(e.biff=2);case"biff3":e.biff||(e.biff=3);case"biff4":return e.biff||(e.biff=4),_w(VG(n,e),e);case"biff5":e.biff||(e.biff=5);case"biff8":case"xla":case"xls":return e.biff||(e.biff=8),function PNe(n,t){var e=t||{};return hW(function F4e(n,t){var e=t||{},i=wt.utils.cfb_new({root:"R"}),r="/Workbook";switch(e.bookType||"xls"){case"xls":e.bookType="biff8";case"xla":e.bookType||(e.bookType="xla");case"biff8":r="/Workbook",e.biff=8;break;case"biff5":r="/Book",e.biff=5;break;default:throw new Error("invalid type "+e.bookType+" for XLS CFB")}return wt.utils.cfb_add(i,r,VG(n,e)),8==e.biff&&(n.Props||n.Custprops)&&function R4e(n,t){var s,e=[],i=[],r=[],o=0,a=xj(oM,"n"),c=xj(sM,"n");if(n.Props)for(s=yi(n.Props),o=0;o-1||g$.indexOf(r[o][0])>-1||null!=r[o][1]&&l.push(r[o]);i.length&&wt.utils.cfb_add(t,"/\x05SummaryInformation",I$(i,S0.SI,c,sM)),(e.length||l.length)&&wt.utils.cfb_add(t,"/\x05DocumentSummaryInformation",I$(e,S0.DSI,a,oM,l.length?l:null,S0.UDI))}(n,i),8==e.biff&&n.vbaraw&&function NMe(n,t){t.FullPaths.forEach(function(e,i){if(0!=i){var r=e.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==r.slice(-1)&&wt.utils.cfb_add(n,r,t.FileIndex[i].content)}})}(i,wt.read(n.vbaraw,{type:"string"==typeof n.vbaraw?"binary":"buffer"})),i}(n,e),e)}(n,e);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function RNe(n,t){var e=qn(t||{});return function fW(n,t){var e={},i=rn?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(e.compression="DEFLATE"),t.password)e.type=i;else switch(t.type){case"base64":e.type="base64";break;case"binary":e.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":e.type=i;break;default:throw new Error("Unrecognized type "+t.type)}var r=n.FullPaths?wt.write(n,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[e.type]||e.type,compression:!!t.compression}):n.generate(e);if(typeof Deno<"u"&&"string"==typeof r){if("binary"==t.type||"base64"==t.type)return r;r=new Uint8Array(Y_(r))}return t.password&&typeof encrypt_agile<"u"?hW(encrypt_agile(r,t.password),t):"file"===t.type?t0(t.file,r):"string"==t.type?Kn(r):r}(MNe(n,e),e)}(n,e);default:throw new Error("Unrecognized bookType |"+e.bookType+"|")}}function pW(n,t,e,i,r,o,s){var a=yn(e),c=s.defval,l=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),d=!0,u=null!=n["!data"],h=1===r?[]:{};if(1!==r)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:e,enumerable:!1})}catch{h.__rowNum__=e}else h.__rowNum__=e;if(!u||n["!data"][e])for(var f=t.s.c;f<=t.e.c;++f){var m=u?(n["!data"][e]||[])[f]:n[i[f]+a];if(void 0!==m&&void 0!==m.t){var g=m.v;switch(m.t){case"z":if(null==g)break;continue;case"e":g=0==g?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+m.t)}if(null!=o[f]){if(null==g)if("e"==m.t&&null===g)h[o[f]]=null;else if(void 0!==c)h[o[f]]=c;else{if(!l||null!==g)continue;h[o[f]]=null}else h[o[f]]=l&&("n"!==m.t||"n"===m.t&&!1!==s.rawNumbers)?g:oc(m,g,s);null!=g&&(d=!1)}}else{if(void 0===c)continue;null!=o[f]&&(h[o[f]]=c)}}return{row:h,isempty:d}}function bw(n,t){if(null==n||null==n["!ref"])return[];var e={t:"n",v:0},i=0,r=1,o=[],s=0,a="",c={s:{r:0,c:0},e:{r:0,c:0}},l=t||{},d=null!=l.range?l.range:n["!ref"];switch(1===l.header?i=1:"A"===l.header?i=2:Array.isArray(l.header)?i=3:null==l.header&&(i=0),typeof d){case"string":c=xn(d);break;case"number":(c=xn(n["!ref"])).s.r=d;break;default:c=d}i>0&&(r=0);var u=yn(c.s.r),h=[],f=[],m=0,g=0,p=null!=n["!data"],b=c.s.r,C=0,x={};p&&!n["!data"][b]&&(n["!data"][b]=[]);var D=l.skipHidden&&n["!cols"]||[],j=l.skipHidden&&n["!rows"]||[];for(C=c.s.c;C<=c.e.c;++C)if(!(D[C]||{}).hidden)switch(h[C]=on(C),e=p?n["!data"][b][C]:n[h[C]+u],i){case 1:o[C]=C-c.s.c;break;case 2:o[C]=h[C];break;case 3:o[C]=l.header[C-c.s.c];break;default:if(null==e&&(e={w:"__EMPTY",t:"s"}),a=s=oc(e,null,l),g=x[s]||0){do{a=s+"_"+g++}while(x[a]);x[s]=g,x[a]=1}else x[s]=1;o[C]=a}for(b=c.s.r+r;b<=c.e.r;++b)if(!(j[b]||{}).hidden){var P=pW(n,c,b,h,i,o,l);(!1===P.isempty||(1===i?!1!==l.blankrows:l.blankrows))&&(f[m++]=P.row)}return f.length=m,f}var gW=/"/g;function _W(n,t,e,i,r,o,s,a){for(var c=!0,l=[],d="",u=yn(e),h=null!=n["!data"],f=h&&n["!data"][e]||[],m=t.s.c;m<=t.e.c;++m)if(i[m]){var g=h?f[m]:n[i[m]+u];if(null==g)d="";else if(null!=g.v){c=!1,d=""+(a.rawNumbers&&"n"==g.t?g.v:oc(g,null,a));for(var p=0,b=0;p!==d.length;++p)if((b=d.charCodeAt(p))===r||b===o||34===b||a.forceQuotes){d='"'+d.replace(gW,'""')+'"';break}"ID"==d&&(d='"ID"')}else null==g.f||g.F?d="":(c=!1,(d="="+g.f).indexOf(",")>=0&&(d='"'+d.replace(gW,'""')+'"'));l.push(d)}return!1===a.blankrows&&c?null:l.join(s)}function jM(n,t){var e=[],i=t??{};if(null==n||null==n["!ref"])return"";for(var r=xn(n["!ref"]),o=void 0!==i.FS?i.FS:",",s=o.charCodeAt(0),a=void 0!==i.RS?i.RS:"\n",c=a.charCodeAt(0),l=new RegExp(("|"==o?"\\|":o)+"+$"),d="",u=[],h=i.skipHidden&&n["!cols"]||[],f=i.skipHidden&&n["!rows"]||[],m=r.s.c;m<=r.e.c;++m)(h[m]||{}).hidden||(u[m]=on(m));for(var g=0,p=r.s.r;p<=r.e.r;++p)(f[p]||{}).hidden||null!=(d=_W(n,r,p,u,s,c,o,i))&&(i.strip&&(d=d.replace(l,"")),(d||!1!==i.blankrows)&&e.push((g++?a:"")+d));return e.join("")}function bW(n,t){t||(t={}),t.FS="\t",t.RS="\n";var e=jM(n,t);if(typeof Xt>"u"||"string"==t.type)return e;var i=Xt.utils.encode(1200,e,"str");return String.fromCharCode(255)+String.fromCharCode(254)+i}function vW(n,t,e){var i=e||{},r=n?null!=n["!data"]:i.dense;null!=Wi&&null==r&&(r=Wi);var o=+!i.skipHeader,s=n||{};!n&&r&&(s["!data"]=[]);var a=0,c=0;if(s&&null!=i.origin)if("number"==typeof i.origin)a=i.origin;else{var l="string"==typeof i.origin?zn(i.origin):i.origin;a=l.r,c=l.c}var d={s:{c:0,r:0},e:{c,r:a+t.length-1+o}};if(s["!ref"]){var u=xn(s["!ref"]);d.e.c=Math.max(d.e.c,u.e.c),d.e.r=Math.max(d.e.r,u.e.r),-1==a&&(d.e.r=(a=u.e.r+1)+t.length-1+o)}else-1==a&&(a=0,d.e.r=t.length-1+o);var h=i.header||[],f=0,m=[];t.forEach(function(p,b){r&&!s["!data"][a+b+o]&&(s["!data"][a+b+o]=[]),r&&(m=s["!data"][a+b+o]),yi(p).forEach(function(C){-1==(f=h.indexOf(C))&&(h[f=h.length]=C);var x=p[C],D="z",j="",P=r?"":on(c+f)+yn(a+b+o),S=r?m[c+f]:s[P];!x||"object"!=typeof x||x instanceof Date?("number"==typeof x?D="n":"boolean"==typeof x?D="b":"string"==typeof x?D="s":x instanceof Date?(D="d",i.cellDates||(D="n",x=or(x)),j=null!=S&&S.z&&vd(S.z)?S.z:i.dateNF||kt[14]):null===x&&i.nullError&&(D="e",x=0),S?(S.t=D,S.v=x,delete S.w,delete S.R,j&&(S.z=j)):r?m[c+f]=S={t:D,v:x}:s[P]=S={t:D,v:x},j&&(S.z=j)):r?m[c+f]=x:s[P]=x})}),d.e.c=Math.max(d.e.c,c+h.length-1);var g=yn(a);if(r&&!s["!data"][a]&&(s["!data"][a]=[]),o)for(f=0;f=65535)throw new Error("Too many worksheets");if(i&&n.SheetNames.indexOf(e)>=0){var o=e.match(/(^.*?)(\d+)$/);r=o&&+o[2]||0;var s=o&&o[1]||e;for(++r;r<=65535&&-1!=n.SheetNames.indexOf(e=s+r);++r);}if(PG(e),n.SheetNames.indexOf(e)>=0)throw new Error("Worksheet with name |"+e+"| already exists!");return n.SheetNames.push(e),n.Sheets[e]=t,e}var xW_json_to_sheet=function VNe(n,t){return vW(null,n,t)};let JNe=(()=>{class n{constructor(){}exportAsExcelFile(e,i){const s=O0({Sheets:{data:xW_json_to_sheet(e)},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(s,i)}saveAsExcelFile(e,i){const r=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});Wa.saveAs(r,i+"_export_"+(new Date).getTime()+".xlsx")}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();const eLe=["*",[["mat-toolbar-row"]]],tLe=["*","mat-toolbar-row"],nLe=Pl(class{constructor(n){this._elementRef=n}});let iLe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),rLe=(()=>{class n extends nLe{constructor(e,i,r){super(e),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(gt))},n.\u0275cmp=Ve({type:n,selectors:[["mat-toolbar"]],contentQueries:function(e,i,r){if(1&e&&qt(r,iLe,5),2&e){let o;Ae(o=Ie())&&(i._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[ye],ngContentSelectors:tLe,decls:2,vars:0,template:function(e,i){1&e&&(Rn(eLe),dt(0),dt(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),n})(),oLe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})();const wW=["*"],sLe=["content"];function aLe(n,t){if(1&n){const e=Le();_(0,"div",2),z("click",function(){return he(e),fe(O()._onBackdropClicked())}),v()}2&n&&ot("mat-drawer-shown",O()._isShowingBackdrop())}function cLe(n,t){1&n&&(_(0,"mat-drawer-content"),dt(1,2),v())}const lLe=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],dLe=["mat-drawer","mat-drawer-content","*"],uLe={transformDrawer:$n("transform",[pn("open, open-instant",ze({transform:"none",visibility:"visible"})),pn("void",ze({"box-shadow":"none",visibility:"hidden"})),Qt("void => open-instant",Gt("0ms")),Qt("void <=> open, open-instant => void",Gt("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},hLe=new ae("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function fLe(){return!1}}),CW=new ae("MAT_DRAWER_CONTAINER");let GM=(()=>{class n extends xg{constructor(e,i,r,o,s){super(r,o,s),this._changeDetectorRef=e,this._container=i}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(hn(()=>EW)),y(Ne),y(ou),y(Xe))},n.\u0275cmp=Ve({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(e,i){2&e&&Ai("margin-left",i._container._contentMargins.left,"px")("margin-right",i._container._contentMargins.right,"px")},features:[tt([{provide:xg,useExisting:n}]),ye],ngContentSelectors:wW,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),dt(0))},encapsulation:2,changeDetection:0}),n})(),kW=(()=>{class n{get position(){return this._position}set position(e){(e="end"===e?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=Qe(e)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(e){("true"===e||"false"===e||null==e)&&(e=Qe(e)),this._autoFocus=e}get opened(){return this._opened}set opened(e){this.toggle(Qe(e))}constructor(e,i,r,o,s,a,c,l){this._elementRef=e,this._focusTrapFactory=i,this._focusMonitor=r,this._platform=o,this._ngZone=s,this._interactivityChecker=a,this._doc=c,this._container=l,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new Me,this._animationEnd=new Me,this._animationState="void",this.openedChange=new De(!0),this._openedStream=this.openedChange.pipe(mn(d=>d),ct(()=>{})),this.openedStart=this._animationStarted.pipe(mn(d=>d.fromState!==d.toState&&0===d.toState.indexOf("open")),Cv(void 0)),this._closedStream=this.openedChange.pipe(mn(d=>!d),ct(()=>{})),this.closedStart=this._animationStarted.pipe(mn(d=>d.fromState!==d.toState&&"void"===d.toState),Cv(void 0)),this._destroyed=new Me,this.onPositionChanged=new De,this._modeChanged=new Me,this.openedChange.subscribe(d=>{d?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{ga(this._elementRef.nativeElement,"keydown").pipe(mn(d=>27===d.keyCode&&!this.disableClose&&!so(d)),St(this._destroyed)).subscribe(d=>this._ngZone.run(()=>{this.close(),d.stopPropagation(),d.preventDefault()}))}),this._animationEnd.pipe(ja((d,u)=>d.fromState===u.fromState&&d.toState===u.toState)).subscribe(d=>{const{fromState:u,toState:h}=d;(0===h.indexOf("open")&&"void"===u||"void"===h&&0===u.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_takeFocus(){if(!this._focusTrap)return;const e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{!i&&"function"==typeof this._elementRef.nativeElement.focus&&e.focus()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(e){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState(),"end"===this._position&&this._updatePositionInParent("end")}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,i){e&&i&&(this._openedVia=i);const r=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),r}_setOpen(e,i,r){return this._opened=e,e?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",i&&this._restoreFocus(r)),this._updateFocusTrapState(),new Promise(o=>{this.openedChange.pipe(An(1)).subscribe(s=>o(s?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_updatePositionInParent(e){const i=this._elementRef.nativeElement,r=i.parentNode;"end"===e?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),r.insertBefore(this._anchor,i)),r.appendChild(i)):this._anchor&&this._anchor.parentNode.insertBefore(i,this._anchor)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(ms),y(Hn),y(Xe),y(mg),y(gt,8),y(CW,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-drawer"]],viewQuery:function(e,i){if(1&e&&pt(sLe,5),2&e){let r;Ae(r=Ie())&&(i._content=r.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(e,i){1&e&&Ub("@transform.start",function(o){return i._animationStarted.next(o)})("@transform.done",function(o){return i._animationEnd.next(o)}),2&e&&(vt("align",null),$b("@transform",i._animationState),ot("mat-drawer-end","end"===i.position)("mat-drawer-over","over"===i.mode)("mat-drawer-push","push"===i.mode)("mat-drawer-side","side"===i.mode)("mat-drawer-opened",i.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:wW,decls:3,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"],["content",""]],template:function(e,i){1&e&&(Rn(),_(0,"div",0,1),dt(2),v())},dependencies:[xg],encapsulation:2,data:{animation:[uLe.transformDrawer]},changeDetection:0}),n})(),EW=(()=>{class n{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=Qe(e)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(e){this._backdropOverride=null==e?null:Qe(e)}get scrollable(){return this._userContent||this._content}constructor(e,i,r,o,s,a=!1,c){this._dir=e,this._element=i,this._ngZone=r,this._changeDetectorRef=o,this._animationMode=c,this._drawers=new yl,this.backdropClick=new De,this._destroyed=new Me,this._doCheckSubject=new Me,this._contentMargins={left:null,right:null},this._contentMarginChanges=new Me,e&&e.change.pipe(St(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),s.change().pipe(St(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=a}ngAfterContentInit(){this._allDrawers.changes.pipe(er(this._allDrawers),St(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(i=>!i._container||i._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(er(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Pc(10),St(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,i=0;if(this._left&&this._left.opened)if("side"==this._left.mode)e+=this._left._getWidth();else if("push"==this._left.mode){const r=this._left._getWidth();e+=r,i-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)i+=this._right._getWidth();else if("push"==this._right.mode){const r=this._right._getWidth();i+=r,e-=r}e=e||null,i=i||null,(e!==this._contentMargins.left||i!==this._contentMargins.right)&&(this._contentMargins={left:e,right:i},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe(mn(i=>i.fromState!==i.toState),St(this._drawers.changes)).subscribe(i=>{"open-instant"!==i.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==e.mode&&e.openedChange.pipe(St(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e&&e.onPositionChanged.pipe(St(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(An(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(e){e&&e._modeChanged.pipe(St(oi(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){const i=this._element.nativeElement.classList,r="mat-drawer-container-has-open";e?i.add(r):i.remove(r)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{"end"==e.position?this._end=e:this._start=e}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._canHaveBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(e){return"side"!==e.mode||!!this._backdropOverride}_isDrawerOpen(e){return null!=e&&e.opened}}return n.\u0275fac=function(e){return new(e||n)(y(Hi,8),y(Ne),y(Xe),y(an),y(_a),y(hLe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,GM,5),qt(r,kW,5)),2&e){let o;Ae(o=Ie())&&(i._content=o.first),Ae(o=Ie())&&(i._allDrawers=o)}},viewQuery:function(e,i){if(1&e&&pt(GM,5),2&e){let r;Ae(r=Ie())&&(i._userContent=r.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mat-drawer-container-explicit-backdrop",i._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[tt([{provide:CW,useExisting:n}])],ngContentSelectors:dLe,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,i){1&e&&(Rn(lLe),A(0,aLe,1,2,"div",0),dt(1),dt(2,1),A(3,cLe,2,0,"mat-drawer-content",1)),2&e&&(E("ngIf",i.hasBackdrop),w(3),E("ngIf",!i._content))},dependencies:[ri,GM],styles:['.mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0}),n})(),mLe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft,Vc,Vc,Ft]}),n})();function pLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O().setFhirServer(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e.name)}}function gLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(2).setEdition(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e.resource.version)}}function _Le(n,t){if(1&n&&(zt(0),_(1,"button",15),k(2),v(),_(3,"mat-menu",null,16)(5,"span",11),k(6,"Versions / Releases"),v(),A(7,gLe,2,1,"button",9),v(),jt()),2&n){const e=t.$implicit,i=Pt(4);w(1),E("matMenuTriggerFor",i),w(1),Ze(e.editionName),w(5),E("ngForOf",e.editions)}}function bLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O().setLanguage(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e)}}function vLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(2).setFhirServer(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e.name)}}function yLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(3).setEdition(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e.resource.version)}}function xLe(n,t){if(1&n&&(zt(0),_(1,"button",15),k(2),v(),_(3,"mat-menu",null,16)(5,"span",11),k(6,"Versions / Releases"),v(),A(7,yLe,2,1,"button",9),v(),jt()),2&n){const e=t.$implicit,i=Pt(4);w(1),E("matMenuTriggerFor",i),w(1),Ze(e.editionName),w(5),E("ngForOf",e.editions)}}function wLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(2).setLanguage(o))}),k(1),v()}if(2&n){const e=t.$implicit;w(1),Ze(e)}}function CLe(n,t){if(1&n){const e=Le();_(0,"mat-toolbar")(1,"button",17),z("click",function(){return he(e),O(),fe(Pt(2).toggle())}),_(2,"mat-icon"),k(3,"menu"),v()(),_e(4,"img",18),_(5,"span",19),k(6,"SNOMED CT Implementation Demos"),v(),_(7,"span",20),k(8,"Implementation Demos"),v(),_e(9,"span",21),_(10,"button",22),k(11,"Select Demonstrator"),v(),_(12,"mat-menu",5,23)(14,"button",7),z("click",function(){return he(e),fe(O().navigate("/allergies"))}),k(15,"Allergies CRG"),v(),_(16,"button",7),z("click",function(){return he(e),fe(O().navigate("/sandbox"))}),k(17,"Terminology Bindings Sandbox"),v(),_(18,"button",7),z("click",function(){return he(e),fe(O().navigate("/questionnaires"))}),k(19,"SNOMED & FHIR Questionnaires"),v(),_(20,"button",7),z("click",function(){return he(e),fe(O().navigate("/context"))}),k(21,"Context Representation"),v(),_(22,"button",7),z("click",function(){return he(e),fe(O().navigate("/snoguess"))}),k(23,"Playground"),v()(),_(24,"button",24),k(25),v(),_(26,"mat-menu",null,25),A(28,vLe,2,1,"button",9),v(),_(29,"button",24),k(30),v(),_(31,"mat-menu",5,26)(33,"span",11),k(34,"Editions"),v(),A(35,xLe,8,3,"ng-container",12),v(),_(36,"button",24),k(37),v(),_(38,"mat-menu",null,27),A(40,wLe,2,1,"button",9),v(),_(41,"a",28)(42,"mat-icon"),k(43,"info"),v()()()}if(2&n){const e=Pt(13),i=Pt(27),r=Pt(32),o=Pt(39),s=O();w(10),E("matMenuTriggerFor",e),w(14),E("matMenuTriggerFor",i),w(1),it("FHIR Server: ",s.selectedServer.name,""),w(3),E("ngForOf",s.fhirServers),w(1),E("matMenuTriggerFor",r),w(1),Ze(s.selectedEdition),w(5),E("ngForOf",s.editionsDetails),w(1),E("matMenuTriggerFor",o),w(1),Ze(s.selectedLanguage),w(3),E("ngForOf",s.languages)}}let kLe=(()=>{class n{constructor(e,i,r,o,s){this.codingSpecService=e,this.excelService=i,this.terminologyService=r,this.router=o,this.activatedRoute=s,this.title="sct-implementation-demonstrator",this.bindingsForExport=[],this.editions=[],this.editionsDetails=[],this.languages=["be","en","es","fr","no"],this.selectedEdition="Edition",this.selectedLanguage="en",this.fhirServers=[{name:"SNOMED Dev IS",url:"https://dev-is-browser.ihtsdotools.org/fhir"},{name:"SNOMED Public",url:"https://snowstorm.ihtsdotools.org/fhir"},{name:"SNOMED Dev 2",url:"https://snowstorm-temp.kaicode.io/fhir"}],this.selectedServer=this.fhirServers[1],this.embeddedMode=!1,this.router.events.subscribe(a=>{a instanceof Sl&>ag("config","G-7SK998GPMX",{page_path:a.urlAfterRedirects})})}ngOnInit(){this.setFhirServer(this.selectedServer),this.bindingsForExport=[];let e=this.codingSpecService.getCodingSpec();for(const i of e)for(const r of i.bindings)this.bindingsForExport.push({section:i.title,title:r.title,ecl:r.ecl.replace(/\s\s+/g," ")});this.activatedRoute.queryParams.subscribe(i=>{this.embeddedMode="true"===i.embedded,i.edition?this.updateCodeSystemOptions(i.edition):this.updateCodeSystemOptions()})}navigate(e){this.router.navigate([e])}updateCodeSystemOptions(e){this.terminologyService.getCodeSystems().subscribe(i=>{this.editionsDetails=[],this.editions=i.entry;let r=new Set;this.editions.forEach(s=>{r.add(s.resource.title)}),r.forEach(s=>{this.editionsDetails.push({editionName:s,editions:this.editions.filter(a=>a.resource.title.includes(s)).sort(this.compare)})});let o=this.editionsDetails.findIndex(s=>"International Edition"===s.editionName);e?this.editions.forEach(s=>{s.resource.version===e&&this.setEdition(s)}):this.setEdition(o>=0?this.editionsDetails[o].editions[0]:this.editions[0])})}compare(e,i){return e.resource.datei.resource.date?-1:0}setFhirServer(e){this.selectedServer=e,this.terminologyService.setSnowstormFhirBase(e.url),this.selectedEdition="Edition",this.editions=[],this.editionsDetails=[],this.updateCodeSystemOptions()}setEdition(e){this.selectedEdition=e.resource.title?.replace("SNOMED CT release ",""),this.terminologyService.setFhirUrlParam(e.resource.version)}setLanguage(e){this.selectedLanguage=e,this.terminologyService.setLang(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(DTe),y(JNe),y(Ur),y(ro),y(Dl))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-root"]],decls:37,vars:11,consts:[["autosize","",1,"example-container"],["mode","over",1,"example-sidenav"],["drawer",""],[1,"flex","flex-col","justify-center"],["mat-button","",3,"matMenuTriggerFor"],[1,"wide-menu"],["demosMenuN","matMenu"],["mat-menu-item","",3,"click"],["serverMenuN","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["editionsMenuN","matMenu"],[1,"ml-4"],[4,"ngFor","ngForOf"],["menuN","matMenu"],[4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor"],["sub_menu","matMenu"],["mat-icon-button","","id","menu-button",3,"click"],["src","assets/img/small_logo.png","id","logo"],["id","title"],["id","short-title"],[1,"example-spacer"],["mat-flat-button","","color","accent",1,"bar-button",3,"matMenuTriggerFor"],["demosMenu","matMenu"],["mat-flat-button","","color","primary",1,"bar-button",3,"matMenuTriggerFor"],["serverMenu","matMenu"],["editionsMenu","matMenu"],["menu","matMenu"],["mat-flat-button","","href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank","color","primary","id","info-button"]],template:function(i,r){if(1&i&&(_(0,"mat-drawer-container",0)(1,"mat-drawer",1,2)(3,"div",3)(4,"button",4),k(5,"Select Demonstrator"),v(),_(6,"mat-menu",5,6)(8,"button",7),z("click",function(){return r.navigate("/allergies")}),k(9,"Allergies CRG"),v(),_(10,"button",7),z("click",function(){return r.navigate("/sandbox")}),k(11,"Terminology Bindings Sandbox"),v(),_(12,"button",7),z("click",function(){return r.navigate("/questionnaires")}),k(13,"SNOMED & FHIR Questionnaires"),v(),_(14,"button",7),z("click",function(){return r.navigate("/context")}),k(15,"Context Representation"),v(),_(16,"button",7),z("click",function(){return r.navigate("/snoguess")}),k(17,"Playground"),v()(),_(18,"button",4),k(19),v(),_(20,"mat-menu",null,8),A(22,pLe,2,1,"button",9),v(),_(23,"button",4),k(24),v(),_(25,"mat-menu",5,10)(27,"span",11),k(28,"Editions"),v(),A(29,_Le,8,3,"ng-container",12),v(),_(30,"button",4),k(31),v(),_(32,"mat-menu",null,13),A(34,bLe,2,1,"button",9),v()()(),A(35,CLe,44,10,"mat-toolbar",14),_e(36,"router-outlet"),v()),2&i){const o=Pt(7),s=Pt(21),a=Pt(26),c=Pt(33);w(4),E("matMenuTriggerFor",o),w(14),E("matMenuTriggerFor",s),w(1),it("FHIR Server: ",r.selectedServer.name,""),w(3),E("ngForOf",r.fhirServers),w(1),E("matMenuTriggerFor",a),w(1),it("Edition: ",r.selectedEdition,""),w(5),E("ngForOf",r.editionsDetails),w(1),E("matMenuTriggerFor",c),w(1),it("Language: ",r.selectedLanguage,""),w(3),E("ngForOf",r.languages),w(1),E("ngIf",!r.embeddedMode)}},dependencies:[io,ri,sT,rLe,Wce,Fo,Vs,co,lu,$a,du,kW,EW],styles:[".mat-toolbar[_ngcontent-%COMP%]{background-color:#000;color:#fff;font-size:1.8rem;font-weight:700}button[_ngcontent-%COMP%]{font-weight:700;font-size:medium}.bar-button[_ngcontent-%COMP%]{margin-left:15px}#title[_ngcontent-%COMP%]{margin-left:15px;font-size:1.4rem}.example-spacer[_ngcontent-%COMP%]{flex:1 1 auto}a[_ngcontent-%COMP%]{margin-left:15px} .mat-mdc-menu-panel{max-width:-moz-fit-content!important;max-width:fit-content!important;overflow-x:hidden!important}.mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-raised-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{margin:0!important}#demo-selector[_ngcontent-%COMP%]{margin:5px 15px;padding:10px}#menu-button[_ngcontent-%COMP%], #short-title[_ngcontent-%COMP%]{display:none}#logo[_ngcontent-%COMP%]{height:4rem}@media (max-width: 768px){#title[_ngcontent-%COMP%]{display:none}#short-title[_ngcontent-%COMP%]{display:block;margin-left:15px;font-size:.9rem}#logo[_ngcontent-%COMP%]{height:3.5rem}#info-button[_ngcontent-%COMP%]{display:none}}@media (max-width: 1200px){.bar-button[_ngcontent-%COMP%]{display:none}#menu-button[_ngcontent-%COMP%]{display:block}}"]})}return n})();function TW(n){return new pe(3e3,!1)}function o3e(){return typeof window<"u"&&typeof window.document<"u"}function WM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ad(n){switch(n.length){case 0:return new bg;case 1:return n[0];default:return new D5(n)}}function SW(n,t,e,i,r=new Map,o=new Map){const s=[],a=[];let c=-1,l=null;if(i.forEach(d=>{const u=d.get("offset"),h=u==c,f=h&&l||new Map;d.forEach((m,g)=>{let p=g,b=m;if("offset"!==g)switch(p=t.normalizePropertyName(p,s),b){case YT:b=r.get(g);break;case Nc:b=o.get(g);break;default:b=t.normalizeStyleValue(g,p,b,s)}f.set(p,b)}),h||a.push(f),l=f,c=u}),s.length)throw function qLe(n){return new pe(3502,!1)}();return a}function qM(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&QM(e,"start",n)));break;case"done":n.onDone(()=>i(e&&QM(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&QM(e,"destroy",n)))}}function QM(n,t,e){const o=KM(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function KM(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function ks(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function DW(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let XM=(n,t)=>!1,AW=(n,t,e)=>[],IW=null;function YM(n){const t=n.parentNode||n.host;return t===IW?null:t}(WM()||typeof Element<"u")&&(o3e()?(IW=(()=>document.documentElement)(),XM=(n,t)=>{for(;t;){if(t===n)return!0;t=YM(t)}return!1}):XM=(n,t)=>n.contains(t),AW=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let ch=null,MW=!1;const RW=XM,FW=AW;let PW=(()=>{class n{validateStyleProperty(e){return function a3e(n){ch||(ch=function c3e(){return typeof document<"u"?document.body:null}()||{},MW=!!ch.style&&"WebkitAppearance"in ch.style);let t=!0;return ch.style&&!function s3e(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in ch.style,!t&&MW&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ch.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return RW(e,i)}getParentElement(e){return YM(e)}query(e,i,r){return FW(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],c){return new bg(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),ZM=(()=>{class n{}return n.NOOP=new PW,n})();const l3e=1e3,JM="ng-enter",ww="ng-leave",Cw="ng-trigger",kw=".ng-trigger",NW="ng-animating",eR=".ng-animating";function hl(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:tR(parseFloat(t[1]),t[2])}function tR(n,t){return"s"===t?n*l3e:n}function Ew(n,t,e){return n.hasOwnProperty("duration")?n:function u3e(n,t,e){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(TW()),{duration:0,delay:0,easing:""};r=tR(parseFloat(a[1]),a[2]);const c=a[3];null!=c&&(o=tR(parseFloat(c),a[4]));const l=a[5];l&&(s=l)}else r=n;if(!e){let a=!1,c=t.length;r<0&&(t.push(function ELe(){return new pe(3100,!1)}()),a=!0),o<0&&(t.push(function TLe(){return new pe(3101,!1)}()),a=!0),a&&t.splice(c,0,TW())}return{duration:r,delay:o,easing:s}}(n,t,e)}function N0(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function LW(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Id(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function VW(n,t,e){return e?t+":"+e+";":""}function UW(n){let t="";for(let e=0;e{const o=iR(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),WM()&&UW(n))}function lh(n,t){n.style&&(t.forEach((e,i)=>{const r=iR(i);n.style[r]=""}),WM()&&UW(n))}function L0(n){return Array.isArray(n)?1==n.length?n[0]:T5(n):n}const nR=new RegExp("{{\\s*(.+?)\\s*}}","g");function HW(n){let t=[];if("string"==typeof n){let e;for(;e=nR.exec(n);)t.push(e[1]);nR.lastIndex=0}return t}function B0(n,t,e){const i=n.toString(),r=i.replace(nR,(o,s)=>{let a=t[s];return null==a&&(e.push(function DLe(n){return new pe(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function Tw(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const m3e=/-+([a-z0-9])/g;function iR(n){return n.replace(m3e,(...t)=>t[1].toUpperCase())}function p3e(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Es(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function ALe(n){return new pe(3004,!1)}()}}function zW(n,t){return window.getComputedStyle(n)[t]}const Aw="*";function x3e(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function w3e(n,t,e){if(":"==n[0]){const c=function C3e(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof c)return void t.push(c);n=c}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function zLe(n){return new pe(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(jW(r,s));"<"==o[0]&&!(r==Aw&&s==Aw)&&t.push(jW(s,r))}(i,e,t)):e.push(n),e}const Iw=new Set(["true","1"]),Mw=new Set(["false","0"]);function jW(n,t){const e=Iw.has(n)||Mw.has(n),i=Iw.has(t)||Mw.has(t);return(r,o)=>{let s=n==Aw||n==r,a=t==Aw||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?Iw.has(n):Mw.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?Iw.has(t):Mw.has(t)),s&&a}}const k3e=new RegExp("s*:selfs*,?","g");function rR(n,t,e,i){return new E3e(n).build(t,e,i)}class E3e{constructor(t){this._driver=t}build(t,e,i){const r=new D3e(e);return this._resetContextStyleTimingState(r),Es(this,L0(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function MLe(){return new pe(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const c=a,l=c.name;l.toString().split(/\s*,\s*/).forEach(d=>{c.name=d,o.push(this.visitState(c,e))}),c.name=l}else if(1==a.type){const c=this.visitTransition(a,e);i+=c.queryCount,r+=c.depCount,s.push(c)}else e.errors.push(function RLe(){return new pe(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{HW(c).forEach(l=>{s.hasOwnProperty(l)||o.add(l)})})}),o.size&&(Tw(o.values()),e.errors.push(function FLe(n,t){return new pe(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Es(this,L0(t.animation),e);return{type:1,matchers:x3e(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:dh(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Es(this,i,e)),options:dh(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=Es(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:dh(t.options)}}visitAnimate(t,e){const i=function I3e(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return oR(Ew(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=oR(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=Ew(e,t);return oR(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:ze({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const l={};i.easing&&(l.easing=i.easing),s=ze(l)}e.currentTime+=i.duration+i.delay;const c=this.visitStyle(s,e);c.isEmptyStep=a,r=c}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Nc?i.push(a):e.errors.push(new pe(3002,!1)):i.push(LW(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let c of a.values())if(c.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,c)=>{const l=e.collectedStyles.get(e.currentQuerySelector),d=l.get(c);let u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(e.errors.push(function OLe(n,t,e,i,r){return new pe(3010,!1)}()),u=!1),o=d.startTime),u&&l.set(c,{startTime:o,endTime:r}),e.options&&function f3e(n,t,e){const i=t.params||{},r=HW(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function SLe(n){return new pe(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function NLe(){return new pe(3011,!1)}()),i;let o=0;const s=[];let a=!1,c=!1,l=0;const d=t.steps.map(b=>{const C=this._makeStyleAst(b,e);let x=null!=C.offset?C.offset:function A3e(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(C.styles),D=0;return null!=x&&(o++,D=C.offset=x),c=c||D<0||D>1,a=a||D0&&o{const x=h>0?C==f?1:h*C:s[C],D=x*p;e.currentTime=m+g.delay+D,g.duration=D,this._validateStyleAst(b,e),b.offset=x,i.styles.push(b)}),i}visitReference(t,e){return{type:8,animation:Es(this,L0(t.animation),e),options:dh(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:dh(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:dh(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function T3e(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(k3e,"")),n=n.replace(/@\*/g,kw).replace(/@\w+/g,e=>kw+"-"+e.slice(1)).replace(/:animating/g,eR),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,ks(e.collectedStyles,e.currentQuerySelector,new Map);const a=Es(this,L0(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:dh(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function ULe(){return new pe(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:Ew(t.timings,e.errors,!0);return{type:12,animation:Es(this,L0(t.animation),e),timings:i,options:null}}}class D3e{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function dh(n){return n?(n=N0(n)).params&&(n.params=function S3e(n){return n?N0(n):null}(n.params)):n={},n}function oR(n,t,e){return{duration:n,delay:t,easing:e}}function sR(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Rw{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const F3e=new RegExp(":enter","g"),O3e=new RegExp(":leave","g");function aR(n,t,e,i,r,o=new Map,s=new Map,a,c,l=[]){return(new N3e).buildKeyframes(n,t,e,i,r,o,s,a,c,l)}class N3e{buildKeyframes(t,e,i,r,o,s,a,c,l,d=[]){l=l||new Rw;const u=new cR(t,e,l,r,o,d,[]);u.options=c;const h=c.delay?hl(c.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([s],null,u.errors,c),Es(this,i,u);const f=u.timelines.filter(m=>m.containsAnimation());if(f.length&&a.size){let m;for(let g=f.length-1;g>=0;g--){const p=f[g];if(p.element===e){m=p;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,c)}return f.length?f.map(m=>m.buildKeyframes()):[sR(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:hl(B0(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?hl(i.duration):null,a=null!=i.delay?hl(i.delay):null;return 0!==s&&t.forEach(c=>{const l=e.appendInstructionToTimeline(c,s,a);o=Math.max(o,l.duration+l.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),Es(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Fw);const s=hl(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Es(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?hl(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),Es(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return Ew(e.params?B0(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(c=>{a.forwardTime((c.offset||0)*o),a.setStyles(c.styles,c.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?hl(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Fw);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let c=null;a.forEach((l,d)=>{e.currentQueryIndex=d;const u=e.createSubContext(t.options,l);o&&u.delayNextStep(o),l===e.element&&(c=u.currentTimeline),Es(this,t.animation,u),u.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,u.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),c&&(e.currentTimeline.mergeTimelineCollectedStyles(c),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let c=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=i.currentStaggerTime}const d=e.currentTimeline;c&&d.delayNextStep(c);const u=d.currentTime;Es(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-u+(r.startTime-i.currentTimeline.startTime)}}const Fw={};class cR{constructor(t,e,i,r,o,s,a,c){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Fw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new Pw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=hl(i.duration)),null!=i.delay&&(r.delay=hl(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=B0(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new cR(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Fw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new L3e(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(F3e,"."+this._enterClassName)).replace(O3e,"."+this._leaveClassName);let l=this._driver.query(this.element,t,1!=i);0!==i&&(l=i<0?l.slice(l.length+i,l.length):l.slice(0,i)),a.push(...l)}return!o&&0==a.length&&s.push(function HLe(n){return new pe(3014,!1)}()),a}}class Pw{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Pw(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Nc),this._currentKeyframe.set(e,Nc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function B3e(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,Nc)}else Id(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,c]of s){const l=B0(c,o,i);this._pendingStyles.set(a,l),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Nc),this._updateStyle(a,l)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,c)=>{const l=Id(a,new Map,this._backFill);l.forEach((d,u)=>{d===YT?t.add(u):d===Nc&&e.add(u)}),i||l.set("offset",c/this.duration),r.push(l)});const o=t.size?Tw(t.values()):[],s=e.size?Tw(e.values()):[];if(i){const a=r[0],c=new Map(a);a.set("offset",0),c.set("offset",1),r=[a,c]}return sR(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class L3e extends Pw{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,c=Id(t[0]);c.set("offset",0),o.push(c);const l=Id(t[0]);l.set("offset",WW(a)),o.push(l);const d=t.length-1;for(let u=1;u<=d;u++){let h=Id(t[u]);const f=h.get("offset");h.set("offset",WW((e+f*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return sR(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function WW(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class lR{}const V3e=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class U3e extends lR{normalizePropertyName(t,e){return iR(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(V3e.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function ILe(n,t){return new pe(3005,!1)}())}return s+o}}function qW(n,t,e,i,r,o,s,a,c,l,d,u,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:u,errors:h}}const dR={};class QW{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function H3e(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,c,l,d){const u=[],h=this.ast.options&&this.ast.options.params||dR,m=this.buildStyles(i,a&&a.params||dR,u),g=c&&c.params||dR,p=this.buildStyles(r,g,u),b=new Set,C=new Map,x=new Map,D="void"===r,j={params:z3e(g,h),delay:this.ast.options?.delay},P=d?[]:aR(t,e,this.ast.animation,o,s,m,p,j,l,u);let S=0;if(P.forEach(V=>{S=Math.max(V.duration+V.delay,S)}),u.length)return qW(e,this._triggerName,i,r,D,m,p,[],[],C,x,S,u);P.forEach(V=>{const q=V.element,J=ks(C,q,new Set);V.preStyleProps.forEach(ve=>J.add(ve));const G=ks(x,q,new Set);V.postStyleProps.forEach(ve=>G.add(ve)),q!==e&&b.add(q)});const U=Tw(b.values());return qW(e,this._triggerName,i,r,D,m,p,P,U,C,x,S)}}function z3e(n,t){const e=N0(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class j3e{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=N0(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=B0(s,r,e));const c=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,c,s,e),i.set(a,s)})}),i}}class G3e{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new j3e(r.style,r.options&&r.options.params||{},i))}),KW(this.states,"true","1"),KW(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new QW(t,r,this.states))}),this.fallbackTransition=function W3e(n,t,e){return new QW(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function KW(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const q3e=new Rw;class Q3e{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],r=[],o=rR(this._driver,e,i,r);if(i.length)throw function QLe(n){return new pe(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=SW(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=aR(this._driver,e,o,JM,ww,new Map,new Map,i,q3e,r),s.forEach(d=>{const u=ks(a,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(function KLe(){return new pe(3300,!1)}()),s=[]),r.length)throw function XLe(n){return new pe(3504,!1)}();a.forEach((d,u)=>{d.forEach((h,f)=>{d.set(f,this._driver.computeStyle(u,f,Nc))})});const l=Ad(s.map(d=>{const u=a.get(d.element);return this._buildPlayer(d,new Map,u)}));return this._playersById.set(t,l),l.onDestroy(()=>this.destroy(t)),this.players.push(l),l}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function YLe(n){return new pe(3301,!1)}();return e}listen(t,e,i,r){const o=KM(e,"","","");return qM(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const XW="ng-animate-queued",uR="ng-animate-disabled",J3e=[],YW={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},eBe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ys="__ng_removed";class hR{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function rBe(n){return n??null}(i?t.value:t),i){const o=N0(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const V0="void",fR=new hR(V0);class tBe{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Zs(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function ZLe(n,t){return new pe(3302,!1)}();if(null==i||0==i.length)throw function JLe(n){return new pe(3303,!1)}();if(!function oBe(n){return"start"==n||"done"==n}(i))throw function e3e(n,t){return new pe(3400,!1)}();const o=ks(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=ks(this._engine.statesByElement,t,new Map);return a.has(e)||(Zs(t,Cw),Zs(t,Cw+"-"+e),a.set(e,fR)),()=>{this._engine.afterFlush(()=>{const c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function t3e(n){return new pe(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new mR(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Zs(t,Cw),Zs(t,Cw+"-"+e),this._engine.statesByElement.set(t,a=new Map));let c=a.get(e);const l=new hR(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),a.set(e,l),c||(c=fR),l.value!==V0&&c.value===l.value){if(!function cBe(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{lh(t,p),dc(t,b)})}return}const h=ks(this._engine.playersByElement,t,[]);h.forEach(g=>{g.namespaceId==this.id&&g.triggerName==e&&g.queued&&g.destroy()});let f=o.matchTransition(c.value,l.value,t,l.params),m=!1;if(!f){if(!r)return;f=o.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:c,toState:l,player:s,isFallbackTransition:m}),m||(Zs(t,XW),s.onStart(()=>{Km(t,XW)})),s.onDone(()=>{let g=this.players.indexOf(s);g>=0&&this.players.splice(g,1);const p=this._engine.playersByElement.get(t);if(p){let b=p.indexOf(s);b>=0&&p.splice(b,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,kw,!0);i.forEach(r=>{if(r[Ys])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((c,l)=>{if(s.set(l,c.value),this._triggers.has(l)){const d=this.trigger(t,l,V0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&Ad(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const c=this._triggers.get(s).fallbackTransition,l=i.get(s)||fR,d=new hR(V0),u=new mR(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:c,fromState:l,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Ys];(!o||o===YW)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Zs(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const c=KM(o,i.triggerName,i.fromState.value,i.toState.value);c._data=t,qM(i.player,a.phase,c,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class nBe{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new tBe(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const c=r.get(a);if(c){const l=i.indexOf(c);i.splice(l+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Ow(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Ow(e))return;const o=e[Ys];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Zs(t,uR)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Km(t,uR))}removeNode(t,e,i,r){if(Ow(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Ys]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Ow(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,kw,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,eR,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ad(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ys];if(e&&e.setForRemoval){if(t[Ys]=YW,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(uR)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ad(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function n3e(n){return new pe(3402,!1)}()}_flushAnimations(t,e){const i=new Rw,r=[],o=new Map,s=[],a=new Map,c=new Map,l=new Map,d=new Set;this.disabledNodes.forEach(re=>{d.add(re);const Y=this.driver.query(re,".ng-animate-queued",!0);for(let ge=0;ge{const ge=JM+g++;m.set(Y,ge),re.forEach(le=>Zs(le,ge))});const p=[],b=new Set,C=new Set;for(let re=0;reb.add(le)):C.add(Y))}const x=new Map,D=eq(h,Array.from(b));D.forEach((re,Y)=>{const ge=ww+g++;x.set(Y,ge),re.forEach(le=>Zs(le,ge))}),t.push(()=>{f.forEach((re,Y)=>{const ge=m.get(Y);re.forEach(le=>Km(le,ge))}),D.forEach((re,Y)=>{const ge=x.get(Y);re.forEach(le=>Km(le,ge))}),p.forEach(re=>{this.processLeaveNode(re)})});const j=[],P=[];for(let re=this._namespaceList.length-1;re>=0;re--)this._namespaceList[re].drainQueuedTransitions(e).forEach(ge=>{const le=ge.player,We=ge.element;if(j.push(le),this.collectedEnterElements.length){const H=We[Ys];if(H&&H.setForMove){if(H.previousTriggersValues&&H.previousTriggersValues.has(ge.triggerName)){const ce=H.previousTriggersValues.get(ge.triggerName),Ce=this.statesByElement.get(ge.element);if(Ce&&Ce.has(ge.triggerName)){const Ue=Ce.get(ge.triggerName);Ue.value=ce,Ce.set(ge.triggerName,Ue)}}return void le.destroy()}}const de=!u||!this.driver.containsElement(u,We),st=x.get(We),Dt=m.get(We),F=this._buildInstruction(ge,i,Dt,st,de);if(F.errors&&F.errors.length)return void P.push(F);if(de)return le.onStart(()=>lh(We,F.fromStyles)),le.onDestroy(()=>dc(We,F.toStyles)),void r.push(le);if(ge.isFallbackTransition)return le.onStart(()=>lh(We,F.fromStyles)),le.onDestroy(()=>dc(We,F.toStyles)),void r.push(le);const Z=[];F.timelines.forEach(H=>{H.stretchStartingKeyframe=!0,this.disabledNodes.has(H.element)||Z.push(H)}),F.timelines=Z,i.append(We,F.timelines),s.push({instruction:F,player:le,element:We}),F.queriedElements.forEach(H=>ks(a,H,[]).push(le)),F.preStyleProps.forEach((H,ce)=>{if(H.size){let Ce=c.get(ce);Ce||c.set(ce,Ce=new Set),H.forEach((Ue,$e)=>Ce.add($e))}}),F.postStyleProps.forEach((H,ce)=>{let Ce=l.get(ce);Ce||l.set(ce,Ce=new Set),H.forEach((Ue,$e)=>Ce.add($e))})});if(P.length){const re=[];P.forEach(Y=>{re.push(function i3e(n,t){return new pe(3505,!1)}())}),j.forEach(Y=>Y.destroy()),this.reportError(re)}const S=new Map,U=new Map;s.forEach(re=>{const Y=re.element;i.has(Y)&&(U.set(Y,Y),this._beforeAnimationBuild(re.player.namespaceId,re.instruction,S))}),r.forEach(re=>{const Y=re.element;this._getPreviousPlayers(Y,!1,re.namespaceId,re.triggerName,null).forEach(le=>{ks(S,Y,[]).push(le),le.destroy()})});const V=p.filter(re=>nq(re,c,l)),q=new Map;JW(q,this.driver,C,l,Nc).forEach(re=>{nq(re,c,l)&&V.push(re)});const G=new Map;f.forEach((re,Y)=>{JW(G,this.driver,new Set(re),c,YT)}),V.forEach(re=>{const Y=q.get(re),ge=G.get(re);q.set(re,new Map([...Array.from(Y?.entries()??[]),...Array.from(ge?.entries()??[])]))});const ve=[],Se=[],me={};s.forEach(re=>{const{element:Y,player:ge,instruction:le}=re;if(i.has(Y)){if(d.has(Y))return ge.onDestroy(()=>dc(Y,le.toStyles)),ge.disabled=!0,ge.overrideTotalTime(le.totalTime),void r.push(ge);let We=me;if(U.size>1){let st=Y;const Dt=[];for(;st=st.parentNode;){const F=U.get(st);if(F){We=F;break}Dt.push(st)}Dt.forEach(F=>U.set(F,We))}const de=this._buildAnimation(ge.namespaceId,le,S,o,G,q);if(ge.setRealPlayer(de),We===me)ve.push(ge);else{const st=this.playersByElement.get(We);st&&st.length&&(ge.parentPlayer=Ad(st)),r.push(ge)}}else lh(Y,le.fromStyles),ge.onDestroy(()=>dc(Y,le.toStyles)),Se.push(ge),d.has(Y)&&r.push(ge)}),Se.forEach(re=>{const Y=o.get(re.element);if(Y&&Y.length){const ge=Ad(Y);re.setRealPlayer(ge)}}),r.forEach(re=>{re.parentPlayer?re.syncPlayerEvents(re.parentPlayer):re.destroy()});for(let re=0;re!de.destroyed);We.length?sBe(this,Y,We):this.processLeaveNode(Y)}return p.length=0,ve.forEach(re=>{this.players.push(re),re.onDone(()=>{re.destroy();const Y=this.players.indexOf(re);this.players.splice(Y,1)}),re.play()}),ve}elementContainsData(t,e){let i=!1;const r=e[Ys];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const c=!o||o==V0;a.forEach(l=>{l.queued||!c&&l.triggerName!=r||s.push(l)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const c of e.timelines){const l=c.element,d=l!==o,u=ks(i,l,[]);this._getPreviousPlayers(l,d,s,a,e.toState).forEach(f=>{const m=f.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),f.destroy(),u.push(f)})}lh(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,c=e.element,l=[],d=new Set,u=new Set,h=e.timelines.map(m=>{const g=m.element;d.add(g);const p=g[Ys];if(p&&p.removedBeforeQueried)return new bg(m.duration,m.delay);const b=g!==c,C=function aBe(n){const t=[];return tq(n,t),t}((i.get(g)||J3e).map(S=>S.getRealPlayer())).filter(S=>!!S.element&&S.element===g),x=o.get(g),D=s.get(g),j=SW(0,this._normalizer,0,m.keyframes,x,D),P=this._buildPlayer(m,j,C);if(m.subTimeline&&r&&u.add(g),b){const S=new mR(t,a,g);S.setRealPlayer(P),l.push(S)}return P});l.forEach(m=>{ks(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function iBe(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,m.element,m))}),d.forEach(m=>Zs(m,NW));const f=Ad(h);return f.onDestroy(()=>{d.forEach(m=>Km(m,NW)),dc(c,e.toStyles)}),u.forEach(m=>{ks(r,m,[]).push(f)}),f}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new bg(t.duration,t.delay)}}class mR{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new bg,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>qM(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ks(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Ow(n){return n&&1===n.nodeType}function ZW(n,t){const e=n.style.display;return n.style.display=t??"none",e}function JW(n,t,e,i,r){const o=[];e.forEach(c=>o.push(ZW(c)));const s=[];i.forEach((c,l)=>{const d=new Map;c.forEach(u=>{const h=t.computeStyle(l,u,r);d.set(u,h),(!h||0==h.length)&&(l[Ys]=eBe,s.push(l))}),n.set(l,d)});let a=0;return e.forEach(c=>ZW(c,o[a++])),s}function eq(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const i=1,r=new Set(t),o=new Map;function s(a){if(!a)return i;let c=o.get(a);if(c)return c;const l=a.parentNode;return c=e.has(l)?l:r.has(l)?i:s(l),o.set(a,c),c}return t.forEach(a=>{const c=s(a);c!==i&&e.get(c).push(a)}),e}function Zs(n,t){n.classList?.add(t)}function Km(n,t){n.classList?.remove(t)}function sBe(n,t,e){Ad(e).onDone(()=>n.processLeaveNode(t))}function tq(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Nw{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new nBe(t,e,i),this._timelineEngine=new Q3e(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const c=[],l=[],d=rR(this._driver,o,c,l);if(c.length)throw function WLe(n,t){return new pe(3404,!1)}();a=function $3e(n,t,e){return new G3e(n,t,e)}(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=DW(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=DW(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let dBe=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&dc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(dc(this._element,this._initialStyles),this._endStyles&&(dc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(lh(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(lh(this._element,this._endStyles),this._endStyles=null),dc(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function pR(n){let t=null;return n.forEach((e,i)=>{(function uBe(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class iq{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:zW(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class hBe{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return RW(t,e)}getParentElement(t){return YM(t)}query(t,e,i){return FW(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){const c={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(c.easing=o);const l=new Map,d=s.filter(f=>f instanceof iq);(function g3e(n,t){return 0===n||0===t})(i,r)&&d.forEach(f=>{f.currentSnapshot.forEach((m,g)=>l.set(g,m))});let u=function h3e(n){return n.length?n[0]instanceof Map?n:n.map(t=>LW(t)):[]}(e).map(f=>Id(f));u=function _3e(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,zW(n,a)))}}return t}(t,u,l);const h=function lBe(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=pR(t[0]),t.length>1&&(i=pR(t[t.length-1]))):t instanceof Map&&(e=pR(t)),e||i?new dBe(n,e,i):null}(t,u);return new iq(t,u,c,h)}}let fBe=(()=>{class n extends E5{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:na.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?T5(e):e;return rq(this._renderer,null,i,"register",[r]),new mBe(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(Q(yp),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class mBe extends Qce{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new pBe(this._id,t,e||{},this._renderer)}}class pBe{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return rq(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function rq(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const oq="@.disabled";let gBe=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let d=this._rendererCache.get(o);return d||(d=new sq("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,d)),d}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const c=d=>{Array.isArray(d)?d.forEach(c):this.engine.registerTrigger(s,a,e,d.name,d)};return i.data.animation.forEach(c),new _Be(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(Q(yp),Q(Nw),Q(Xe))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class sq{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==oq?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class _Be extends sq{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==oq?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function bBe(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function vBe(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let yBe=(()=>{class n extends Nw{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(ZM),Q(lR),Q(af))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const aq=[{provide:E5,useClass:fBe},{provide:lR,useFactory:function xBe(){return new U3e}},{provide:Nw,useClass:yBe},{provide:yp,useFactory:function wBe(n,t,e){return new gBe(n,t,e)},deps:[xv,Nw,Xe]}],gR=[{provide:ZM,useFactory:()=>new hBe},{provide:Jn,useValue:"BrowserAnimations"},...aq],cq=[{provide:ZM,useClass:PW},{provide:Jn,useValue:"NoopAnimations"},...aq];let CBe=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?cq:gR}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:gR,imports:[a3]}),n})(),kBe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})(),e5e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Jv,Br,Ft,Nl,g5,kBe]}),n})();zf("firebase","10.9.0","app"),i7({apiKey:"AIzaSyAFjiIuMBA1IpTrw__WdkQiK5PKht4_go8",authDomain:"snoguess-e4d1c.firebaseapp.com",projectId:"snoguess-e4d1c",storageBucket:"snoguess-e4d1c.appspot.com",messagingSenderId:"289449411190",appId:"1:289449411190:web:49ff68411f9e5148f11557"});let i5e=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=xt({type:n,bootstrap:[kLe]});static#n=this.\u0275inj=yt({imports:[kae,a3,Lme,TTe,CBe,ige,oLe,k5,lde,kde,j5,Y0e,Wy,_fe,Mde,kfe,khe,Pme,Yde,kue,tpe,LS,gpe,Tpe,Hge,Jge,wge,m_e,e5e,f0e,LS,mLe]})}return n})();_re().bootstrapModule(i5e).catch(n=>console.error(n))},627:(Tr,fh,Qr)=>{const sn=Qr(602).z,hc=Qr(224).array;Tr.exports=class ml{constructor(lt={}){Object.assign(this,{list:lt.emptyList&&[]||Array.prototype.concat.apply(sn,[hc,lt.list||[]]),exclude:lt.exclude||[],splitRegex:lt.splitRegex||/\b/,placeHolder:lt.placeHolder||"*",regex:lt.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:lt.replaceRegex||/\w/g})}isProfane(lt){return this.list.filter(ur=>{const Eo=new RegExp(`\\b${ur.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(ur.toLowerCase())&&Eo.test(lt)}).length>0||!1}replaceWord(lt){return lt.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(lt){return lt.split(this.splitRegex).map(ur=>this.isProfane(ur)?this.replaceWord(ur):ur).join(this.splitRegex.exec(lt)[0])}addWords(){let lt=Array.from(arguments);this.list.push(...lt),lt.map(ur=>ur.toLowerCase()).forEach(ur=>{this.exclude.includes(ur)&&this.exclude.splice(this.exclude.indexOf(ur),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(lt=>lt.toLowerCase()))}}},201:Tr=>{Tr.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]},224:(Tr,fh,Qr)=>{Tr.exports={object:Qr(184),array:Qr(201),regex:Qr(716)}},184:Tr=>{Tr.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}},716:Tr=>{Tr.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi},327:function(Tr,fh){var Qr,hc;void 0!==(hc="function"==typeof(Qr=function(){"use strict";function ea(kn,Pn,To){var ti=new XMLHttpRequest;ti.open("GET",kn),ti.responseType="blob",ti.onload=function(){Ss(ti.response,Pn,To)},ti.onerror=function(){console.error("could not download file")},ti.send()}function lt(kn){var Pn=new XMLHttpRequest;Pn.open("HEAD",kn,!1);try{Pn.send()}catch{}return 200<=Pn.status&&299>=Pn.status}function ur(kn){try{kn.dispatchEvent(new MouseEvent("click"))}catch{var Pn=document.createEvent("MouseEvents");Pn.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),kn.dispatchEvent(Pn)}}var Eo="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,Xm=Eo.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Ss=Eo.saveAs||("object"!=typeof window||window!==Eo?function(){}:"download"in HTMLAnchorElement.prototype&&!Xm?function(kn,Pn,To){var ti=Eo.URL||Eo.webkitURL,So=document.createElement("a");So.download=Pn=Pn||kn.name||"download",So.rel="noopener","string"==typeof kn?(So.href=kn,So.origin===location.origin?ur(So):lt(So.href)?ea(kn,Pn,To):ur(So,So.target="_blank")):(So.href=ti.createObjectURL(kn),setTimeout(function(){ti.revokeObjectURL(So.href)},4e4),setTimeout(function(){ur(So)},0))}:"msSaveOrOpenBlob"in navigator?function(kn,Pn,To){if(Pn=Pn||kn.name||"download","string"!=typeof kn)navigator.msSaveOrOpenBlob(function ml(kn,Pn){return typeof Pn>"u"?Pn={autoBom:!1}:"object"!=typeof Pn&&(console.warn("Deprecated: Expected third argument to be a object"),Pn={autoBom:!Pn}),Pn.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(kn.type)?new Blob(["\ufeff",kn],{type:kn.type}):kn}(kn,To),Pn);else if(lt(kn))ea(kn,Pn,To);else{var ti=document.createElement("a");ti.href=kn,ti.target="_blank",setTimeout(function(){ur(ti)})}}:function(kn,Pn,To,ti){if((ti=ti||open("","_blank"))&&(ti.document.title=ti.document.body.innerText="downloading..."),"string"==typeof kn)return ea(kn,Pn,To);var So="application/octet-stream"===kn.type,Vw=/constructor/i.test(Eo.HTMLElement)||Eo.safari,mh=/CriOS\/[\d]+/.test(navigator.userAgent);if((mh||So&&Vw||Xm)&&typeof FileReader<"u"){var ta=new FileReader;ta.onloadend=function(){var fc=ta.result;fc=mh?fc:fc.replace(/^data:[^;]*;/,"data:attachment/file;"),ti?ti.location.href=fc:location=fc,ti=null},ta.readAsDataURL(kn)}else{var Rd=Eo.URL||Eo.webkitURL,Ym=Rd.createObjectURL(kn);ti?ti.location=Ym:location.href=Ym,ti=null,setTimeout(function(){Rd.revokeObjectURL(Ym)},4e4)}});Eo.saveAs=Ss.saveAs=Ss,Tr.exports=Ss})?Qr.apply(fh,[]):Qr)&&(Tr.exports=hc)},602:Tr=>{"use strict";Tr.exports=JSON.parse('{"z":["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}')}},Tr=>{Tr(Tr.s=52)}]); \ No newline at end of file +(self.webpackChunksct_implementation_demonstrator=self.webpackChunksct_implementation_demonstrator||[]).push([[179],{52:(Tr,fh,Qr)=>{"use strict";function sn(n){return"function"==typeof n}function hc(n){const e=n(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const ml=hc(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function ea(n,t){if(n){const e=n.indexOf(t);0<=e&&n.splice(e,1)}}class lt{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const o of e)o.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(sn(i))try{i()}catch(o){t=o instanceof ml?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{Km(o)}catch(s){t=t??[],s instanceof ml?t=[...t,...s.errors]:t.push(s)}}if(t)throw new ml(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Km(t);else{if(t instanceof lt){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&ea(e,t)}remove(t){const{_finalizers:e}=this;e&&ea(e,t),t instanceof lt&&t._removeParent(this)}}lt.EMPTY=(()=>{const n=new lt;return n.closed=!0,n})();const ur=lt.EMPTY;function Eo(n){return n instanceof lt||n&&"closed"in n&&sn(n.remove)&&sn(n.add)&&sn(n.unsubscribe)}function Km(n){sn(n)?n():n.unsubscribe()}const Ss={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},kn={setTimeout(n,t,...e){const{delegate:i}=kn;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){const{delegate:t}=kn;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Pn(n){kn.setTimeout(()=>{const{onUnhandledError:t}=Ss;if(!t)throw n;t(n)})}function To(){}const ti=mh("C",void 0,void 0);function mh(n,t,e){return{kind:n,value:t,error:e}}let ta=null;function Rd(n){if(Ss.useDeprecatedSynchronousErrorHandling){const t=!ta;if(t&&(ta={errorThrown:!1,error:null}),n(),t){const{errorThrown:e,error:i}=ta;if(ta=null,e)throw i}}else n()}class fc extends lt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Eo(t)&&t.add(this)):this.destination=yq}static create(t,e,i){return new ph(t,e,i)}next(t){this.isStopped?Hw(function Vw(n){return mh("N",n,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Hw(function So(n){return mh("E",void 0,n)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Hw(ti,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()}}}const _q=Function.prototype.bind;function Uw(n,t){return _q.call(n,t)}class bq{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){j0(i)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){j0(i)}else j0(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){j0(e)}}}class ph extends fc{constructor(t,e,i){let r;if(super(),sn(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&Ss.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Uw(t.next,o),error:t.error&&Uw(t.error,o),complete:t.complete&&Uw(t.complete,o)}):r=t}this.destination=new bq(r)}}function j0(n){Ss.useDeprecatedSynchronousErrorHandling?function Xm(n){Ss.useDeprecatedSynchronousErrorHandling&&ta&&(ta.errorThrown=!0,ta.error=n)}(n):Pn(n)}function Hw(n,t){const{onStoppedNotification:e}=Ss;e&&kn.setTimeout(()=>e(n,t))}const yq={closed:!0,next:To,error:function vq(n){throw n},complete:To},zw="function"==typeof Symbol&&Symbol.observable||"@@observable";function pl(n){return n}function yR(n){return 0===n.length?pl:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}let Dn=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const o=function Cq(n){return n&&n instanceof fc||function wq(n){return n&&sn(n.next)&&sn(n.error)&&sn(n.complete)}(n)&&Eo(n)}(e)?e:new ph(e,i,r);return Rd(()=>{const{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 new(i=xR(i))((r,o)=>{const s=new ph({next:a=>{try{e(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[zw](){return this}pipe(...e){return yR(e)(this)}toPromise(e){return new(e=xR(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function xR(n){var t;return null!==(t=n??Ss.Promise)&&void 0!==t?t:Promise}const kq=hc(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Me=(()=>{class n extends Dn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new wR(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new kq}next(e){Rd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(e)}})}error(e){Rd(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){Rd(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{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(null===(e=this.observers)||void 0===e?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){const{hasError:i,isStopped:r,observers:o}=this;return i||r?ur:(this.currentObservers=null,o.push(e),new lt(()=>{this.currentObservers=null,ea(o,e)}))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){const e=new Dn;return e.source=this,e}}return n.create=(t,e)=>new wR(t,e),n})();class wR extends Me{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:ur}}function CR(n){return sn(n?.lift)}function Ci(n){return t=>{if(CR(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 ui(n,t,e,i,r){return new Eq(n,t,e,i,r)}class Eq extends fc{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(c){t.error(c)}}:super._next,this._error=r?function(a){try{r(a)}catch(c){t.error(c)}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()){const{closed:e}=this;super.unsubscribe(),!e&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function ct(n,t){return Ci((e,i)=>{let r=0;e.subscribe(ui(i,o=>{i.next(n.call(t,o,r++))}))})}function Fd(n){return this instanceof Fd?(this.v=n,this):new Fd(n)}function Aq(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=n[Symbol.asyncIterator];return t?t.call(n):(n=function TR(n){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)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.")}(n),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,c){!function r(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}(a,c,(s=n[o](s)).done,s.value)})}}}const $w=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function SR(n){return sn(n?.then)}function DR(n){return sn(n[zw])}function AR(n){return Symbol.asyncIterator&&sn(n?.[Symbol.asyncIterator])}function IR(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const MR=function Mq(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function RR(n){return sn(n?.[MR])}function FR(n){return function Dq(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(n,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(h){i[h]&&(r[h]=function(f){return new Promise(function(m,g){o.push([h,f,m,g])>1||a(h,f)})})}function a(h,f){try{!function c(h){h.value instanceof Fd?Promise.resolve(h.value.v).then(l,d):u(o[0][2],h)}(i[h](f))}catch(m){u(o[0][3],m)}}function l(h){a("next",h)}function d(h){a("throw",h)}function u(h,f){h(f),o.shift(),o.length&&a(o[0][0],o[0][1])}}(this,arguments,function*(){const e=n.getReader();try{for(;;){const{value:i,done:r}=yield Fd(e.read());if(r)return yield Fd(void 0);yield yield Fd(i)}}finally{e.releaseLock()}})}function PR(n){return sn(n?.getReader)}function Kr(n){if(n instanceof Dn)return n;if(null!=n){if(DR(n))return function Rq(n){return new Dn(t=>{const e=n[zw]();if(sn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if($w(n))return function Fq(n){return new Dn(t=>{for(let e=0;e{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Pn)})}(n);if(AR(n))return OR(n);if(RR(n))return function Oq(n){return new Dn(t=>{for(const e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(PR(n))return function Nq(n){return OR(FR(n))}(n)}throw IR(n)}function OR(n){return new Dn(t=>{(function Lq(n,t){var e,i,r,o;return function Tq(n,t,e,i){return new(e||(e=Promise))(function(o,s){function a(d){try{l(i.next(d))}catch(u){s(u)}}function c(d){try{l(i.throw(d))}catch(u){s(u)}}function l(d){d.done?o(d.value):function r(o){return o instanceof e?o:new e(function(s){s(o)})}(d.value).then(a,c)}l((i=i.apply(n,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Aq(n);!(i=yield e.next()).done;)if(t.next(i.value),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()})})(n,t).catch(e=>t.error(e))})}function mc(n,t,e,i=0,r=!1){const o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function hr(n,t,e=1/0){return sn(t)?hr((i,r)=>ct((o,s)=>t(i,o,r,s))(Kr(n(i,r))),e):("number"==typeof t&&(e=t),Ci((i,r)=>function Bq(n,t,e,i,r,o,s,a){const c=[];let l=0,d=0,u=!1;const h=()=>{u&&!c.length&&!l&&t.complete()},f=g=>l{o&&t.next(g),l++;let p=!1;Kr(e(g,d++)).subscribe(ui(t,b=>{r?.(b),o?f(b):t.next(b)},()=>{p=!0},void 0,()=>{if(p)try{for(l--;c.length&&lm(b)):m(b)}h()}catch(b){t.error(b)}}))};return n.subscribe(ui(t,f,()=>{u=!0,h()})),()=>{a?.()}}(i,r,n,e)))}function gh(n=1/0){return hr(pl,n)}const ns=new Dn(n=>n.complete());function NR(n){return n&&sn(n.schedule)}function Gw(n){return n[n.length-1]}function LR(n){return sn(Gw(n))?n.pop():void 0}function Ym(n){return NR(Gw(n))?n.pop():void 0}function BR(n,t=0){return Ci((e,i)=>{e.subscribe(ui(i,r=>mc(i,n,()=>i.next(r),t),()=>mc(i,n,()=>i.complete(),t),r=>mc(i,n,()=>i.error(r),t)))})}function VR(n,t=0){return Ci((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function UR(n,t){if(!n)throw new Error("Iterable cannot be null");return new Dn(e=>{mc(e,t,()=>{const i=n[Symbol.asyncIterator]();mc(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Pi(n,t){return t?function Wq(n,t){if(null!=n){if(DR(n))return function Hq(n,t){return Kr(n).pipe(VR(t),BR(t))}(n,t);if($w(n))return function jq(n,t){return new Dn(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(SR(n))return function zq(n,t){return Kr(n).pipe(VR(t),BR(t))}(n,t);if(AR(n))return UR(n,t);if(RR(n))return function $q(n,t){return new Dn(e=>{let i;return mc(e,t,()=>{i=n[MR](),mc(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void e.error(s)}o?e.complete():e.next(r)},0,!0)}),()=>sn(i?.return)&&i.return()})}(n,t);if(PR(n))return function Gq(n,t){return UR(FR(n),t)}(n,t)}throw IR(n)}(n,t):Kr(n)}function oi(...n){const t=Ym(n),e=function Uq(n,t){return"number"==typeof Gw(n)?n.pop():t}(n,1/0),i=n;return i.length?1===i.length?Kr(i[0]):gh(e)(Pi(i,t)):ns}function HR(n={}){const{connector:t=(()=>new Me),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,c,l=0,d=!1,u=!1;const h=()=>{a?.unsubscribe(),a=void 0},f=()=>{h(),s=c=void 0,d=u=!1},m=()=>{const g=s;f(),g?.unsubscribe()};return Ci((g,p)=>{l++,!u&&!d&&h();const b=c=c??t();p.add(()=>{l--,0===l&&!u&&!d&&(a=Ww(m,r))}),b.subscribe(p),!s&&l>0&&(s=new ph({next:k=>b.next(k),error:k=>{u=!0,h(),a=Ww(f,e,k),b.error(k)},complete:()=>{d=!0,h(),a=Ww(f,i),b.complete()}}),Kr(g).subscribe(s))})(o)}}function Ww(n,t,...e){if(!0===t)return void n();if(!1===t)return;const i=new ph({next:()=>{i.unsubscribe(),n()}});return Kr(t(...e)).subscribe(i)}function ni(n){for(let t in n)if(n[t]===ni)return t;throw Error("Could not find renamed property on target object.")}function qw(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function si(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(si).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function Qw(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const qq=ni({__forward_ref__:ni});function hn(n){return n.__forward_ref__=hn,n.toString=function(){return si(this())},n}function At(n){return Kw(n)?n():n}function Kw(n){return"function"==typeof n&&n.hasOwnProperty(qq)&&n.__forward_ref__===hn}function Xw(n){return n&&!!n.\u0275providers}const $0="https://g.co/ng/security#xss";class pe extends Error{constructor(t,e){super(G0(t,e)),this.code=t}}function G0(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}function Bt(n){return"string"==typeof n?n:null==n?"":String(n)}function W0(n,t){throw new pe(-201,!1)}function Ds(n,t){null==n&&function Bn(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function ke(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function yt(n){return{providers:n.providers||[],imports:n.imports||[]}}function q0(n){return zR(n,Q0)||zR(n,$R)}function zR(n,t){return n.hasOwnProperty(t)?n[t]:null}function jR(n){return n&&(n.hasOwnProperty(Yw)||n.hasOwnProperty(tQ))?n[Yw]:null}const Q0=ni({\u0275prov:ni}),Yw=ni({\u0275inj:ni}),$R=ni({ngInjectableDef:ni}),tQ=ni({ngInjectorDef:ni});var It=(()=>((It=It||{})[It.Default=0]="Default",It[It.Host=1]="Host",It[It.Self=2]="Self",It[It.SkipSelf=4]="SkipSelf",It[It.Optional=8]="Optional",It))();let Zw;function As(n){const t=Zw;return Zw=n,t}function GR(n,t,e){const i=q0(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&It.Optional?null:void 0!==t?t:void W0(si(n))}const hi=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Zm={},Jw="__NG_DI_FLAG__",K0="ngTempTokenPath",iQ="ngTokenPath",rQ=/\n/gm,oQ="\u0275",WR="__source";let Jm;function _h(n){const t=Jm;return Jm=n,t}function sQ(n,t=It.Default){if(void 0===Jm)throw new pe(-203,!1);return null===Jm?GR(n,void 0,t):Jm.get(n,t&It.Optional?null:void 0,t)}function Q(n,t=It.Default){return(function nQ(){return Zw}()||sQ)(At(n),t)}function Et(n,t=It.Default){return Q(n,X0(t))}function X0(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function eC(n){const t=[];for(let e=0;e((Ta=Ta||{})[Ta.OnPush=0]="OnPush",Ta[Ta.Default=1]="Default",Ta))(),na=(()=>{return(n=na||(na={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",na;var n})();const gc={},On=[],Y0=ni({\u0275cmp:ni}),tC=ni({\u0275dir:ni}),nC=ni({\u0275pipe:ni}),QR=ni({\u0275mod:ni}),_c=ni({\u0275fac:ni}),tp=ni({__NG_ELEMENT_ID__:ni});let dQ=0;function Ve(n){return pc(()=>{const t=XR(n),e={...t,decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===Ta.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:null,data:n.data||{},encapsulation:n.encapsulation||na.Emulated,id:"c"+dQ++,styles:n.styles||On,_:null,schemas:n.schemas||null,tView:null};YR(e);const i=n.dependencies;return e.directiveDefs=Z0(i,!1),e.pipeDefs=Z0(i,!0),e})}function hQ(n){return Vn(n)||Yr(n)}function fQ(n){return null!==n}function xt(n){return pc(()=>({type:n.type,bootstrap:n.bootstrap||On,declarations:n.declarations||On,imports:n.imports||On,exports:n.exports||On,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function KR(n,t){if(null==n)return gc;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}function X(n){return pc(()=>{const t=XR(n);return YR(t),t})}function Xr(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Vn(n){return n[Y0]||null}function Yr(n){return n[tC]||null}function zo(n){return n[nC]||null}function rs(n,t){const e=n[QR]||null;if(!e&&!0===t)throw new Error(`Type ${si(n)} does not have '\u0275mod' property.`);return e}function XR(n){const 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,exportAs:n.exportAs||null,standalone:!0===n.standalone,selectors:n.selectors||On,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:KR(n.inputs,t),outputs:KR(n.outputs)}}function YR(n){n.features?.forEach(t=>t(n))}function Z0(n,t){if(!n)return null;const e=t?zo:hQ;return()=>("function"==typeof n?n():n).map(i=>e(i)).filter(fQ)}const bc=0,rt=1,Yt=2,Di=3,ia=4,Pd=5,Zr=6,vh=7,Oi=8,J0=9,eb=10,nn=11,iC=12,np=13,ZR=14,yh=15,Jr=16,ip=17,xh=18,Sa=19,rp=20,JR=21,fi=22,rC=1,eF=2,tb=7,nb=8,wh=9,Do=10;function os(n){return Array.isArray(n)&&"object"==typeof n[rC]}function ra(n){return Array.isArray(n)&&!0===n[rC]}function oC(n){return 0!=(4&n.flags)}function op(n){return n.componentOffset>-1}function ib(n){return 1==(1&n.flags)}function oa(n){return!!n.template}function pQ(n){return 0!=(256&n[Yt])}function Od(n,t){return n.hasOwnProperty(_c)?n[_c]:null}class bQ{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function jn(){return iF}function iF(n){return n.type.prototype.ngOnChanges&&(n.setInput=yQ),vQ}function vQ(){const n=oF(this),t=n?.current;if(t){const e=n.previous;if(e===gc)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function yQ(n,t,e,i){const r=this.declaredInputs[e],o=oF(n)||function xQ(n,t){return n[rF]=t}(n,{previous:gc,current:null}),s=o.current||(o.current={}),a=o.previous,c=a[r];s[r]=new bQ(c&&c.currentValue,t,a===gc),n[i]=t}jn.ngInherit=!0;const rF="__ngSimpleChanges__";function oF(n){return n[rF]||null}const Is=function(n,t,e){},sF="svg";function Nr(n){for(;Array.isArray(n);)n=n[bc];return n}function rb(n,t){return Nr(t[n])}function ss(n,t){return Nr(t[n.index])}function cF(n,t){return n.data[t]}function Ch(n,t){return n[t]}function jo(n,t){const e=t[n];return os(e)?e:e[bc]}function ob(n){return 64==(64&n[Yt])}function _l(n,t){return null==t?null:n[t]}function lF(n){n[xh]=0}function aC(n,t){n[Pd]+=t;let e=n,i=n[Di];for(;null!==i&&(1===t&&1===e[Pd]||-1===t&&0===e[Pd]);)i[Pd]+=t,e=i,i=i[Di]}const Vt={lFrame:vF(null),bindingsEnabled:!0};function uF(){return Vt.bindingsEnabled}function we(){return Vt.lFrame.lView}function Tn(){return Vt.lFrame.tView}function he(n){return Vt.lFrame.contextLView=n,n[Oi]}function fe(n){return Vt.lFrame.contextLView=null,n}function Lr(){let n=hF();for(;null!==n&&64===n.type;)n=n.parent;return n}function hF(){return Vt.lFrame.currentTNode}function Da(n,t){const e=Vt.lFrame;e.currentTNode=n,e.isParent=t}function cC(){return Vt.lFrame.isParent}function lC(){Vt.lFrame.isParent=!1}function Ao(){const n=Vt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function vc(){return Vt.lFrame.bindingIndex}function kh(){return Vt.lFrame.bindingIndex++}function yc(n){const t=Vt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function PQ(n,t){const e=Vt.lFrame;e.bindingIndex=e.bindingRootIndex=n,dC(t)}function dC(n){Vt.lFrame.currentDirectiveIndex=n}function uC(n){const t=Vt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function gF(){return Vt.lFrame.currentQueryIndex}function hC(n){Vt.lFrame.currentQueryIndex=n}function NQ(n){const t=n[rt];return 2===t.type?t.declTNode:1===t.type?n[Zr]:null}function _F(n,t,e){if(e&It.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&It.Host||(r=NQ(o),null===r||(o=o[yh],10&r.type))););if(null===r)return!1;t=r,n=o}const i=Vt.lFrame=bF();return i.currentTNode=t,i.lView=n,!0}function fC(n){const t=bF(),e=n[rt];Vt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function bF(){const n=Vt.lFrame,t=null===n?null:n.child;return null===t?vF(n):t}function vF(n){const 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 null!==n&&(n.child=t),t}function yF(){const n=Vt.lFrame;return Vt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const xF=yF;function mC(){const n=yF();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 Io(){return Vt.lFrame.selectedIndex}function Nd(n){Vt.lFrame.selectedIndex=n}function ki(){const n=Vt.lFrame;return cF(n.tView,n.selectedIndex)}function xc(){Vt.lFrame.currentNamespace=sF}function Eh(){!function UQ(){Vt.lFrame.currentNamespace=null}()}function sb(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[c]<0&&(n[xh]+=65536),(a>11>16&&(3&n[Yt])===t){n[Yt]+=2048,Is(4,a,o);try{o.call(a)}finally{Is(5,a,o)}}}else{Is(4,a,o);try{o.call(a)}finally{Is(5,a,o)}}}const Th=-1;class ap{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function _C(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[yh],e--;return i}let bC=!0;function ub(n){const t=bC;return bC=n,t}const SF=255,DF=5;let QQ=0;const Aa={};function hb(n,t){const e=AF(n,t);if(-1!==e)return e;const i=t[rt];i.firstCreatePass&&(n.injectorIndex=t.length,vC(i.data,n),vC(t,null),vC(i.blueprint,null));const r=yC(n,t),o=n.injectorIndex;if(TF(r)){const s=lb(r),a=db(r,t),c=a[rt].data;for(let l=0;l<8;l++)t[o+l]=a[s+l]|c[s+l]}return t[o+8]=r,o}function vC(n,t){n.push(0,0,0,0,0,0,0,0,t)}function AF(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function yC(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=NF(r),null===i)return Th;if(e++,r=r[yh],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Th}function xC(n,t,e){!function KQ(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(tp)&&(i=e[tp]),null==i&&(i=e[tp]=QQ++);const r=i&SF;t.data[n+(r>>DF)]|=1<=0?t&SF:JQ:t}(e);if("function"==typeof o){if(!_F(t,n,i))return i&It.Host?IF(r,0,i):MF(t,e,i,r);try{const s=o(i);if(null!=s||i&It.Optional)return s;W0()}finally{xF()}}else if("number"==typeof o){let s=null,a=AF(n,t),c=Th,l=i&It.Host?t[Jr][Zr]:null;for((-1===a||i&It.SkipSelf)&&(c=-1===a?yC(n,t):t[a+8],c!==Th&&OF(i,!1)?(s=t[rt],a=lb(c),t=db(c,t)):a=-1);-1!==a;){const d=t[rt];if(PF(o,a,d.data)){const u=YQ(a,t,e,s,i,l);if(u!==Aa)return u}c=t[a+8],c!==Th&&OF(i,t[rt].data[a+8]===l)&&PF(o,a,t)?(s=d,a=lb(c),t=db(c,t)):a=-1}}return r}function YQ(n,t,e,i,r,o){const s=t[rt],a=s.data[n+8],d=fb(a,s,e,null==i?op(a)&&bC:i!=s&&0!=(3&a.type),r&It.Host&&o===a);return null!==d?Ld(t,s,d,a):Aa}function fb(n,t,e,i,r){const o=n.providerIndexes,s=t.data,a=1048575&o,c=n.directiveStart,d=o>>20,h=r?a+d:n.directiveEnd;for(let f=i?a:a+d;f=c&&m.type===e)return f}if(r){const f=s[c];if(f&&oa(f)&&f.type===e)return c}return null}function Ld(n,t,e,i){let r=n[e];const o=t.data;if(function $Q(n){return n instanceof ap}(r)){const s=r;s.resolving&&function Qq(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new pe(-200,`Circular dependency in DI detected for ${n}${e}`)}(function Ln(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Bt(n)}(o[e]));const a=ub(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?As(s.injectImpl):null;_F(n,i,It.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function zQ(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=iF(t);(e.preOrderHooks??(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==c&&As(c),ub(a),s.resolving=!1,xF()}}return r}function PF(n,t,e){return!!(e[t+(n>>DF)]&1<{const t=n.prototype.constructor,e=t[_c]||wC(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[_c]||wC(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function wC(n){return Kw(n)?()=>{const t=wC(At(n));return t&&t()}:Od(n)}function NF(n){const t=n[rt],e=t.type;return 2===e?t.declTNode:1===e?n[Zr]:null}function Ms(n){return function XQ(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;const e=n.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function CC(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(c,l,d){const u=c.hasOwnProperty(Ah)?c[Ah]:Object.defineProperty(c,Ah,{value:[]})[Ah];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),c}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class ae{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Bd(n,t){n.forEach(e=>Array.isArray(e)?Bd(e,t):t(e))}function BF(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function mb(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function up(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function rK(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function EC(n,t){const e=Rh(n,t);if(e>=0)return n[1|e]}function Rh(n,t){return function VF(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),Ia=ep(Mh("Optional"),8),Vd=ep(Mh("SkipSelf"),4);var $o=(()=>(($o=$o||{})[$o.Important=1]="Important",$o[$o.DashCase=2]="DashCase",$o))();const IC=new Map;let TK=0;const RC="__ngContext__";function eo(n,t){os(t)?(n[RC]=t[rp],function DK(n){IC.set(n[rp],n)}(t)):n[RC]=t}let FC;function PC(n,t){return FC(n,t)}function pp(n){const t=n[Di];return ra(t)?t[Di]:t}function OC(n){return oP(n[np])}function NC(n){return oP(n[ia])}function oP(n){for(;null!==n&&!ra(n);)n=n[ia];return n}function Ph(n,t,e,i,r){if(null!=i){let o,s=!1;ra(i)?o=i:os(i)&&(s=!0,i=i[bc]);const a=Nr(i);0===n&&null!==e?null==r?uP(t,e,a):Ud(t,e,a,r||null,!0):1===n&&null!==e?Ud(t,e,a,r||null,!0):2===n?function jC(n,t,e){const i=vb(n,t);i&&function QK(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function YK(n,t,e,i,r){const o=e[tb];o!==Nr(e)&&Ph(t,n,i,o,r);for(let a=Do;a0&&(n[e-1][ia]=i[ia]);const o=mb(n,Do+t);!function UK(n,t){gp(n,t,t[nn],2,null,null),t[bc]=null,t[Zr]=null}(i[rt],i);const s=o[Sa];null!==s&&s.detachView(o[rt]),i[Di]=null,i[ia]=null,i[Yt]&=-65}return i}function cP(n,t){if(!(128&t[Yt])){const e=t[nn];e.destroyNode&&gp(n,t,e,3,null,null),function jK(n){let t=n[np];if(!t)return UC(n[rt],n);for(;t;){let e=null;if(os(t))e=t[np];else{const i=t[Do];i&&(e=i)}if(!e){for(;t&&!t[ia]&&t!==n;)os(t)&&UC(t[rt],t),t=t[Di];null===t&&(t=n),os(t)&&UC(t[rt],t),e=t&&t[ia]}t=e}}(t)}}function UC(n,t){if(!(128&t[Yt])){t[Yt]&=-65,t[Yt]|=128,function qK(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===na.None||o===na.Emulated)return null}return ss(i,e)}}(n,t.parent,e)}function Ud(n,t,e,i,r){n.insertBefore(t,e,i,r)}function uP(n,t,e){n.appendChild(t,e)}function hP(n,t,e,i,r){null!==i?Ud(n,t,e,i,r):uP(n,t,e)}function vb(n,t){return n.parentNode(t)}function fP(n,t,e){return pP(n,t,e)}let HC,wb,WC,Cb,pP=function mP(n,t,e){return 40&n.type?ss(n,e):null};function yb(n,t,e,i){const r=lP(n,i,t),o=t[nn],a=fP(i.parent||t[Zr],i,t);if(null!=r)if(Array.isArray(e))for(let c=0;cn,createScript:n=>n,createScriptURL:n=>n})}catch{}return wb}()?.createHTML(n)||n}function wP(n){return function qC(){if(void 0===Cb&&(Cb=null,hi.trustedTypes))try{Cb=hi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Cb}()?.createHTML(n)||n}class Hd{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${$0})`}}class rX extends Hd{getTypeName(){return"HTML"}}class oX extends Hd{getTypeName(){return"Style"}}class sX extends Hd{getTypeName(){return"Script"}}class aX extends Hd{getTypeName(){return"URL"}}class cX extends Hd{getTypeName(){return"ResourceURL"}}function cs(n){return n instanceof Hd?n.changingThisBreaksApplicationSecurity:n}function Ma(n,t){const e=function lX(n){return n instanceof Hd&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${$0})`)}return e===t}class pX{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Oh(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class gX{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Oh(t),e}}const bX=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function kb(n){return(n=String(n)).match(bX)?n:"unsafe:"+n}function wc(n){const t={};for(const e of n.split(","))t[e]=!0;return t}function _p(...n){const t={};for(const e of n)for(const i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}const TP=wc("area,br,col,hr,img,wbr"),SP=wc("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),DP=wc("rp,rt"),QC=_p(TP,_p(SP,wc("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")),_p(DP,wc("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")),_p(DP,SP)),KC=wc("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),AP=_p(KC,wc("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"),wc("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")),vX=wc("script,style,template");class yX{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;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)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!QC.hasOwnProperty(e))return this.sanitizedSomething=!0,!vX.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=t.attributes;for(let r=0;r"),!0}endElement(t){const e=t.nodeName.toLowerCase();QC.hasOwnProperty(e)&&!TP.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(IP(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const xX=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wX=/([^\#-~ |!])/g;function IP(n){return n.replace(/&/g,"&").replace(xX,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(wX,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Eb;function MP(n,t){let e=null;try{Eb=Eb||function EP(n){const t=new gX(n);return function _X(){try{return!!(new window.DOMParser).parseFromString(Oh(""),"text/html")}catch{return!1}}()?new pX(t):t}(n);let i=t?String(t):"";e=Eb.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Eb.getInertBodyElement(i)}while(i!==o);return Oh((new yX).sanitizeChildren(XC(e)||e))}finally{if(e){const i=XC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function XC(n){return"content"in n&&function CX(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Nn=(()=>((Nn=Nn||{})[Nn.NONE=0]="NONE",Nn[Nn.HTML=1]="HTML",Nn[Nn.STYLE=2]="STYLE",Nn[Nn.SCRIPT=3]="SCRIPT",Nn[Nn.URL=4]="URL",Nn[Nn.RESOURCE_URL=5]="RESOURCE_URL",Nn))();function zd(n){const t=bp();return t?wP(t.sanitize(Nn.HTML,n)||""):Ma(n,"HTML")?wP(cs(n)):MP(function xP(){return void 0!==WC?WC:typeof document<"u"?document:void 0}(),Bt(n))}function Tb(n){const t=bp();return t?t.sanitize(Nn.URL,n)||"":Ma(n,"URL")?cs(n):kb(Bt(n))}function bp(){const n=we();return n&&n[iC]}const Sb=new ae("ENVIRONMENT_INITIALIZER"),PP=new ae("INJECTOR",-1),OP=new ae("INJECTOR_DEF_TYPES");class NP{get(t,e=Zm){if(e===Zm){const i=new Error(`NullInjectorError: No provider for ${si(t)}!`);throw i.name="NullInjectorError",i}return e}}function IX(...n){return{\u0275providers:LP(0,n),\u0275fromNgModule:!0}}function LP(n,...t){const e=[],i=new Set;let r;return Bd(t,o=>{const s=o;YC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&BP(r,e),e}function BP(n,t){for(let e=0;e{t.push(o)})}}function YC(n,t,e,i){if(!(n=At(n)))return!1;let r=null,o=jR(n);const s=!o&&Vn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const c=n.ngModule;if(o=jR(c),!o)return!1;r=c}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const c="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const l of c)YC(l,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let l;i.add(r);try{Bd(o.imports,d=>{YC(d,t,e,i)&&(l||(l=[]),l.push(d))})}finally{}void 0!==l&&BP(l,t)}if(!a){const l=Od(r)||(()=>new r);t.push({provide:r,useFactory:l,deps:On},{provide:OP,useValue:r,multi:!0},{provide:Sb,useValue:()=>Q(r),multi:!0})}const c=o.providers;null==c||a||ZC(c,d=>{t.push(d)})}}return r!==n&&void 0!==n.providers}function ZC(n,t){for(let e of n)Xw(e)&&(e=e.\u0275providers),Array.isArray(e)?ZC(e,t):t(e)}const MX=ni({provide:String,useValue:ni});function JC(n){return null!==n&&"object"==typeof n&&MX in n}function jd(n){return"function"==typeof n}const ek=new ae("Set Injector scope."),Db={},FX={};let tk;function Ab(){return void 0===tk&&(tk=new NP),tk}class Ra{}class HP extends Ra{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,ik(t,s=>this.processProvider(s)),this.records.set(PP,Nh(void 0,this)),r.has("environment")&&this.records.set(Ra,Nh(void 0,this));const o=this.records.get(ek);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(OP.multi,On,It.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=_h(this),i=As(void 0);try{return t()}finally{_h(e),As(i)}}get(t,e=Zm,i=It.Default){this.assertNotDestroyed(),i=X0(i);const r=_h(this),o=As(void 0);try{if(!(i&It.SkipSelf)){let a=this.records.get(t);if(void 0===a){const c=function BX(n){return"function"==typeof n||"object"==typeof n&&n instanceof ae}(t)&&q0(t);a=c&&this.injectableDefInScope(c)?Nh(nk(t),Db):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&It.Self?Ab():this.parent).get(t,e=i&It.Optional&&e===Zm?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[K0]=s[K0]||[]).unshift(si(t)),r)throw s;return function cQ(n,t,e,i){const r=n[K0];throw t[WR]&&r.unshift(t[WR]),n.message=function lQ(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&n.charAt(1)==oQ?n.slice(2):n;let r=si(t);if(Array.isArray(t))r=t.map(si).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):si(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(rQ,"\n ")}`}("\n"+n.message,r,e,i),n[iQ]=r,n[K0]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{As(o),_h(r)}}resolveInjectorInitializers(){const t=_h(this),e=As(void 0);try{const i=this.get(Sb.multi,On,It.Self);for(const r of i)r()}finally{_h(t),As(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(si(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new pe(205,!1)}processProvider(t){let e=jd(t=At(t))?t:At(t&&t.provide);const i=function OX(n){return JC(n)?Nh(void 0,n.useValue):Nh(zP(n),Db)}(t);if(jd(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Nh(void 0,Db,!0),r.factory=()=>eC(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===Db&&(e.value=FX,e.value=e.factory()),"object"==typeof e.value&&e.value&&function LX(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=At(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function nk(n){const t=q0(n),e=null!==t?t.factory:Od(n);if(null!==e)return e;if(n instanceof ae)throw new pe(204,!1);if(n instanceof Function)return function PX(n){const t=n.length;if(t>0)throw up(t,"?"),new pe(204,!1);const e=function eQ(n){return n&&(n[Q0]||n[$R])||null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new pe(204,!1)}function zP(n,t,e){let i;if(jd(n)){const r=At(n);return Od(r)||nk(r)}if(JC(n))i=()=>At(n.useValue);else if(function UP(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...eC(n.deps||[]));else if(function VP(n){return!(!n||!n.useExisting)}(n))i=()=>Q(At(n.useExisting));else{const r=At(n&&(n.useClass||n.provide));if(!function NX(n){return!!n.deps}(n))return Od(r)||nk(r);i=()=>new r(...eC(n.deps))}return i}function Nh(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function ik(n,t){for(const e of n)Array.isArray(e)?ik(e,t):e&&Xw(e)?ik(e.\u0275providers,t):t(e)}class VX{}class jP{}class HX{resolveComponentFactory(t){throw function UX(n){const t=Error(`No component factory found for ${si(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let bl=(()=>{class n{}return n.NULL=new HX,n})();function zX(){return Lh(Lr(),we())}function Lh(n,t){return new Ne(ss(n,t))}let Ne=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=zX,n})();function jX(n){return n instanceof Ne?n.nativeElement:n}class vp{}let Cc=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function $X(){const n=we(),e=jo(Lr().index,n);return(os(e)?e:n)[nn]}(),n})(),GX=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>null}),n})();class $d{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const WX=new $d("15.2.8"),rk={},ok="ngOriginalError";function sk(n){return n[ok]}class kc{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&sk(t);for(;e&&sk(e);)e=sk(e);return e||null}}function Ec(n){return n instanceof Function?n():n}function WP(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const qP="ng-template";function iY(n,t,e){let i=0,r=!0;for(;io?"":r[u+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==WP(f,l,0)||2&i&&l!==h){if(sa(i))return!1;s=!0}}}}else{if(!s&&!sa(i)&&!sa(c))return!1;if(s&&sa(c))continue;s=!1,i=c|1&i}}return sa(i)||s}function sa(n){return 0==(1&n)}function sY(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!sa(s)&&(t+=XP(o,r),r=""),i=s,o=o||!sa(i);e++}return""!==r&&(t+=XP(o,r)),t}const Ut={};function x(n){YP(Tn(),we(),Io()+n,!1)}function YP(n,t,e,i){if(!i)if(3==(3&t[Yt])){const o=n.preOrderCheckHooks;null!==o&&ab(t,o,e)}else{const o=n.preOrderHooks;null!==o&&cb(t,o,0,e)}Nd(e)}function tO(n,t=null,e=null,i){const r=nO(n,t,e,i);return r.resolveInjectorInitializers(),r}function nO(n,t=null,e=null,i,r=new Set){const o=[e||On,IX(n)];return i=i||("object"==typeof n?void 0:si(n)),new HP(o,t||Ab(),i||null,r)}let Ni=(()=>{class n{static create(e,i){if(Array.isArray(e))return tO({name:""},i,e,"");{const r=e.name??"";return tO({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=Zm,n.NULL=new NP,n.\u0275prov=ke({token:n,providedIn:"any",factory:()=>Q(PP)}),n.__NG_ELEMENT_ID__=-1,n})();function y(n,t=It.Default){const e=we();return null===e?Q(n,t):RF(Lr(),e,At(n),t)}function Fa(){throw new Error("invalid")}function lO(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;ifi&&YP(n,t,fi,!1),Is(s?2:0,r),e(i,r)}finally{Nd(o),Is(s?3:1,r)}}function fk(n,t,e){if(oC(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,yp(n,e,r.hostVars,Ut),r)}function Pa(n,t,e,i,r,o){const s=ss(n,t);!function vk(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?Bt(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[nn],s,o,n.value,e,i,r)}function ZY(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let c=0;c0&&yk(e)}}function yk(n){for(let i=OC(n);null!==i;i=NC(i))for(let r=Do;r0&&yk(o)}const e=n[rt].components;if(null!==e)for(let i=0;i0&&yk(r)}}function iZ(n,t){const e=jo(t,n),i=e[rt];(function rZ(n,t){for(let e=t.length;e-1&&(VC(t,i),mb(e,i))}this._attachedToViewContainer=!1}cP(this._lView[rt],this._lView)}onDestroy(t){hO(this._lView[rt],this._lView,null,t)}markForCheck(){Pb(this._cdRefInjectingView||this._lView)}detach(){this._lView[Yt]&=-65}reattach(){this._lView[Yt]|=64}detectChanges(){Ob(this._lView[rt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function zK(n,t){gp(n,t,t[nn],2,null,null)}(this._lView[rt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=t}}class oZ extends xp{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Ob(t[rt],t,t[Oi],!1)}checkNoChanges(){}get context(){return null}}class wO extends bl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Vn(t);return new wp(e,this.ngModule)}}function CO(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class aZ{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=X0(i);const r=this.injector.get(t,rk,i);return r!==rk||e===rk?r:this.parentInjector.get(t,e,i)}}class wp extends jP{get inputs(){return CO(this.componentDef.inputs)}get outputs(){return CO(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function hY(n){return n.map(uY).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Ra?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new aZ(t,o):t,a=s.get(vp,null);if(null===a)throw new pe(407,!1);const c=s.get(GX,null),l=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",u=i?function NY(n,t,e){return n.selectRootElement(t,e===na.ShadowDom)}(l,i,this.componentDef.encapsulation):BC(l,d,function sZ(n){const t=n.toLowerCase();return"svg"===t?sF:"math"===t?"math":null}(d)),h=this.componentDef.onPush?288:272,f=gk(0,null,null,1,0,null,null,null,null,null),m=Mb(null,f,null,h,null,null,a,l,c,s,null);let g,p;fC(m);try{const b=this.componentDef;let k,w=null;b.findHostDirectiveDefs?(k=[],w=new Map,b.findHostDirectiveDefs(b,k,w),k.push(b)):k=[b];const D=function lZ(n,t){const e=n[rt],i=fi;return n[i]=t,Uh(e,i,2,"#host",null)}(m,u),j=function dZ(n,t,e,i,r,o,s,a){const c=r[rt];!function uZ(n,t,e,i){for(const r of n)t.mergedAttrs=cp(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Nb(t,t.mergedAttrs,!0),null!==e&&yP(i,e,t))}(i,n,t,s);const l=o.createRenderer(t,e),d=Mb(r,uO(e),null,e.onPush?32:16,r[n.index],n,o,l,a||null,null,null);return c.firstCreatePass&&bk(c,n,i.length-1),Fb(r,d),r[n.index]=d}(D,u,b,k,m,a,l);p=cF(f,fi),u&&function fZ(n,t,e,i){if(i)_C(n,e,["ng-version",WX.full]);else{const{attrs:r,classes:o}=function fY(n){const t=[],e=[];let i=1,r=2;for(;i0&&vP(n,e,o.join(" "))}}(l,b,u,i),void 0!==e&&function mZ(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=cp(r.hostAttrs,e=cp(e,r.hostAttrs))}}(i)}function Ck(n){return n===gc?{}:n===On?[]:n}function _Z(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function bZ(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function vZ(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}function Bb(n){return!!kk(n)&&(Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n)}function kk(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Oa(n,t,e){return n[t]=e}function to(n,t,e){return!Object.is(n[t],e)&&(n[t]=e,!0)}function Gd(n,t,e,i){const r=to(n,t,e);return to(n,t+1,i)||r}function vt(n,t,e,i){const r=we();return to(r,kh(),t)&&(Tn(),Pa(ki(),r,n,t,e,i)),vt}function zh(n,t,e,i){return to(n,kh(),e)?t+Bt(e)+i:Ut}function $h(n,t,e,i,r,o,s,a){const l=function Vb(n,t,e,i,r){const o=Gd(n,t,e,i);return to(n,t+2,r)||o}(n,vc(),e,r,s);return yc(3),l?t+Bt(e)+i+Bt(r)+o+Bt(s)+a:Ut}function A(n,t,e,i,r,o,s,a){const c=we(),l=Tn(),d=n+fi,u=l.firstCreatePass?function AZ(n,t,e,i,r,o,s,a,c){const l=t.consts,d=Uh(t,n,4,s||null,_l(l,a));_k(t,e,d,_l(l,c)),sb(t,d);const u=d.tView=gk(2,d,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,l);return null!==t.queries&&(t.queries.template(t,d),u.queries=t.queries.embeddedTView(d)),d}(d,l,c,t,e,i,r,o,s):l.data[d];Da(u,!1);const h=c[nn].createComment("");yb(l,c,h,u),eo(h,c),Fb(c,c[d]=_O(h,c,h,u)),ib(u)&&mk(l,c,u),null!=s&&pk(c,u,a)}function Pt(n){return Ch(function RQ(){return Vt.lFrame.contextLView}(),fi+n)}function E(n,t,e){const i=we();return to(i,kh(),t)&&ls(Tn(),ki(),i,n,t,i[nn],e,!1),E}function Ek(n,t,e,i,r){const s=r?"class":"style";wk(n,e,t.inputs[s],s,i)}function _(n,t,e,i){const r=we(),o=Tn(),s=fi+n,a=r[nn],c=o.firstCreatePass?function MZ(n,t,e,i,r,o){const s=t.consts,c=Uh(t,n,2,i,_l(s,r));return _k(t,e,c,_l(s,o)),null!==c.attrs&&Nb(c,c.attrs,!1),null!==c.mergedAttrs&&Nb(c,c.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,c),c}(s,o,r,t,e,i):o.data[s],l=r[s]=BC(a,t,function HQ(){return Vt.lFrame.currentNamespace}()),d=ib(c);return Da(c,!0),yP(a,l,c),32!=(32&c.flags)&&yb(o,r,l,c),0===function SQ(){return Vt.lFrame.elementDepthCount}()&&eo(l,r),function DQ(){Vt.lFrame.elementDepthCount++}(),d&&(mk(o,r,c),fk(o,c,r)),null!==i&&pk(r,c),_}function v(){let n=Lr();cC()?lC():(n=n.parent,Da(n,!1));const t=n;!function AQ(){Vt.lFrame.elementDepthCount--}();const e=Tn();return e.firstCreatePass&&(sb(e,n),oC(n)&&e.queries.elementEnd(n)),null!=t.classesWithoutHost&&function GQ(n){return 0!=(8&n.flags)}(t)&&Ek(e,t,we(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function WQ(n){return 0!=(16&n.flags)}(t)&&Ek(e,t,we(),t.stylesWithoutHost,!1),v}function _e(n,t,e,i){return _(n,t,e,i),v(),_e}function zt(n,t,e){const i=we(),r=Tn(),o=n+fi,s=r.firstCreatePass?function RZ(n,t,e,i,r){const o=t.consts,s=_l(o,i),a=Uh(t,n,8,"ng-container",s);return null!==s&&Nb(a,s,!0),_k(t,e,a,_l(o,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(o,r,i,t,e):r.data[o];Da(s,!0);const a=i[o]=i[nn].createComment("");return yb(r,i,a,s),eo(a,i),ib(s)&&(mk(r,i,s),fk(r,s,i)),null!=e&&pk(i,s),zt}function jt(){let n=Lr();const t=Tn();return cC()?lC():(n=n.parent,Da(n,!1)),t.firstCreatePass&&(sb(t,n),oC(n)&&t.queries.elementEnd(n)),jt}function ds(n,t,e){return zt(n,t,e),jt(),ds}function Le(){return we()}function kp(n){return!!n&&"function"==typeof n.then}function LO(n){return!!n&&"function"==typeof n.subscribe}const Tk=LO;function z(n,t,e,i){const r=we(),o=Tn(),s=Lr();return BO(o,r,r[nn],s,n,t,i),z}function Ub(n,t){const e=Lr(),i=we(),r=Tn();return BO(r,i,yO(uC(r.data),e,i),e,n,t),Ub}function BO(n,t,e,i,r,o,s){const a=ib(i),l=n.firstCreatePass&&vO(n),d=t[Oi],u=bO(t);let h=!0;if(3&i.type||s){const g=ss(i,t),p=s?s(g):g,b=u.length,k=s?D=>s(Nr(D[i.index])):i.index;let w=null;if(!s&&a&&(w=function FZ(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;oc?a[c]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=UO(i,t,d,o,!1);const D=e.listen(p,r,o);u.push(o,D),l&&l.push(r,k,b,b+1)}}else o=UO(i,t,d,o,!1);const f=i.outputs;let m;if(h&&null!==f&&(m=f[r])){const g=m.length;if(g)for(let p=0;p-1?jo(n.index,t):t);let c=VO(t,e,i,s),l=o.__ngNextListenerFn__;for(;l;)c=VO(t,e,l,s)&&c,l=l.__ngNextListenerFn__;return r&&!1===c&&(s.preventDefault(),s.returnValue=!1),c}}function O(n=1){return function LQ(n){return(Vt.lFrame.contextLView=function BQ(n,t){for(;n>0;)t=t[yh],n--;return t}(n,Vt.lFrame.contextLView))[Oi]}(n)}function PZ(n,t){let e=null;const i=function aY(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function Sk(n){return 2|n}function Wd(n){return(131068&n)>>2}function Dk(n,t){return-131069&n|t<<2}function Ak(n){return 1|n}function KO(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?vl(o):Wd(o),c=!1;for(;0!==a&&(!1===c||s);){const d=n[a+1];UZ(n[a],t)&&(c=!0,n[a+1]=i?Ak(d):Sk(d)),a=i?vl(d):Wd(d)}c&&(n[e+1]=i?Sk(o):Ak(o))}function UZ(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&Rh(n,t)>=0}const mr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function XO(n){return n.substring(mr.key,mr.keyEnd)}function YO(n,t){const e=mr.textEnd;return e===t?-1:(t=mr.keyEnd=function $Z(n,t,e){for(;t32;)t++;return t}(n,mr.key=t,e),Yh(n,t,e))}function Yh(n,t,e){for(;t=0;e=YO(t,e))as(n,XO(t),!0)}function aa(n,t,e,i){const r=we(),o=Tn(),s=yc(2);o.firstUpdatePass&&o4(o,n,s,i),t!==Ut&&to(r,s,t)&&a4(o,o.data[Io()],r,r[nn],n,r[s+1]=function tJ(n,t){return null==n||""===n||("string"==typeof t?n+=t:"object"==typeof n&&(n=si(cs(n)))),n}(t,e),i,s)}function ca(n,t,e,i){const r=Tn(),o=yc(2);r.firstUpdatePass&&o4(r,null,o,i);const s=we();if(e!==Ut&&to(s,o,e)){const a=r.data[Io()];if(l4(a,i)&&!r4(r,o)){let c=i?a.classesWithoutHost:a.stylesWithoutHost;null!==c&&(e=Qw(c,e||"")),Ek(r,a,s,e,i)}else!function eJ(n,t,e,i,r,o,s,a){r===Ut&&(r=On);let c=0,l=0,d=0=n.expandoStartIndex}function o4(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[Io()],s=r4(n,e);l4(o,i)&&null===t&&!s&&(t=!1),t=function QZ(n,t,e,i){const r=uC(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Ep(e=Ik(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=Ik(r,n,t,e,i),null===o){let c=function KZ(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Wd(i))return n[vl(i)]}(n,t,i);void 0!==c&&Array.isArray(c)&&(c=Ik(null,n,t,c[1],i),c=Ep(c,t.attrs,i),function XZ(n,t,e,i){n[vl(e?t.classBindings:t.styleBindings)]=i}(n,t,i,c))}else o=function YZ(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(l=!0)):d=e,r)if(0!==c){const h=vl(n[a+1]);n[i+1]=zb(h,a),0!==h&&(n[h+1]=Dk(n[h+1],i)),n[a+1]=function NZ(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=zb(a,0),0!==a&&(n[a+1]=Dk(n[a+1],i)),a=i;else n[i+1]=zb(c,0),0===a?a=i:n[c+1]=Dk(n[c+1],i),c=i;l&&(n[i+1]=Sk(n[i+1])),KO(n,d,i,!0),KO(n,d,i,!1),function VZ(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&Rh(o,t)>=0&&(e[i+1]=Ak(e[i+1]))}(t,d,n,i,o),s=zb(a,c),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function Ik(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const c=n[r],l=Array.isArray(c),d=l?c[1]:c,u=null===d;let h=e[r+1];h===Ut&&(h=u?On:void 0);let f=u?EC(h,i):d===i?h:void 0;if(l&&!jb(f)&&(f=EC(c,i)),jb(f)&&(a=f,s))return a;const m=n[r+1];r=s?vl(m):Wd(m)}if(null!==t){let c=o?t.residualClasses:t.residualStyles;null!=c&&(a=EC(c,i))}return a}function jb(n){return void 0!==n}function l4(n,t){return 0!=(n.flags&(t?8:16))}function C(n,t=""){const e=we(),i=Tn(),r=n+fi,o=i.firstCreatePass?Uh(i,r,1,t,null):i.data[r],s=e[r]=function LC(n,t){return n.createText(t)}(e[nn],t);yb(i,e,s,o),Da(o,!1)}function Je(n){return Qe("",n,""),Je}function Qe(n,t,e){const i=we(),r=zh(i,n,t,e);return r!==Ut&&Tc(i,Io(),r),Qe}function qd(n,t,e,i,r){const o=we(),s=function jh(n,t,e,i,r,o){const a=Gd(n,vc(),e,r);return yc(2),a?t+Bt(e)+i+Bt(r)+o:Ut}(o,n,t,e,i,r);return s!==Ut&&Tc(o,Io(),s),qd}function Tp(n,t,e,i,r,o,s){const a=we(),c=$h(a,n,t,e,i,r,o,s);return c!==Ut&&Tc(a,Io(),c),Tp}function Ba(n,t,e){const i=we();return to(i,kh(),t)&&ls(Tn(),ki(),i,n,t,i[nn],e,!0),Ba}function $b(n,t,e){const i=we();if(to(i,kh(),t)){const o=Tn(),s=ki();ls(o,s,i,n,t,yO(uC(o.data),s,i),e,!0)}return $b}const Qd=void 0;var yJ=["en",[["a","p"],["AM","PM"],Qd],[["AM","PM"],Qd,Qd],[["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"]],Qd,[["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"]],Qd,[["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}",Qd,"{1} 'at' {0}",Qd],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function vJ(n){const e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let Zh={};function Mo(n){const t=function xJ(n){return n.toLowerCase().replace(/_/g,"-")}(n);let e=S4(t);if(e)return e;const i=t.split("-")[0];if(e=S4(i),e)return e;if("en"===i)return yJ;throw new pe(701,!1)}function S4(n){return n in Zh||(Zh[n]=hi.ng&&hi.ng.common&&hi.ng.common.locales&&hi.ng.common.locales[n]),Zh[n]}var tt=(()=>((tt=tt||{})[tt.LocaleId=0]="LocaleId",tt[tt.DayPeriodsFormat=1]="DayPeriodsFormat",tt[tt.DayPeriodsStandalone=2]="DayPeriodsStandalone",tt[tt.DaysFormat=3]="DaysFormat",tt[tt.DaysStandalone=4]="DaysStandalone",tt[tt.MonthsFormat=5]="MonthsFormat",tt[tt.MonthsStandalone=6]="MonthsStandalone",tt[tt.Eras=7]="Eras",tt[tt.FirstDayOfWeek=8]="FirstDayOfWeek",tt[tt.WeekendRange=9]="WeekendRange",tt[tt.DateFormat=10]="DateFormat",tt[tt.TimeFormat=11]="TimeFormat",tt[tt.DateTimeFormat=12]="DateTimeFormat",tt[tt.NumberSymbols=13]="NumberSymbols",tt[tt.NumberFormats=14]="NumberFormats",tt[tt.CurrencyCode=15]="CurrencyCode",tt[tt.CurrencySymbol=16]="CurrencySymbol",tt[tt.CurrencyName=17]="CurrencyName",tt[tt.Currencies=18]="Currencies",tt[tt.Directionality=19]="Directionality",tt[tt.PluralCase=20]="PluralCase",tt[tt.ExtraData=21]="ExtraData",tt))();const Jh="en-US";let D4=Jh;function Fk(n,t,e,i,r){if(n=At(n),Array.isArray(n))for(let o=0;o>20;if(jd(n)||!n.multi){const f=new ap(c,r,y),m=Ok(a,t,r?d:d+h,u);-1===m?(xC(hb(l,s),o,a),Pk(o,n,t.length),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),e.push(f),s.push(f)):(e[m]=f,s[m]=f)}else{const f=Ok(a,t,d+h,u),m=Ok(a,t,d,d+h),p=m>=0&&e[m];if(r&&!p||!r&&!(f>=0&&e[f])){xC(hb(l,s),o,a);const b=function bee(n,t,e,i,r){const o=new ap(n,e,y);return o.multi=[],o.index=t,o.componentProviders=0,J4(o,r,i&&!e),o}(r?_ee:gee,e.length,r,i,c);!r&&p&&(e[m].providerFactory=b),Pk(o,n,t.length,0),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),e.push(b),s.push(b)}else Pk(o,n,f>-1?f:m,J4(e[r?m:f],c,!r&&i));!r&&i&&p&&e[m].componentProviders++}}}function Pk(n,t,e,i){const r=jd(t),o=function RX(n){return!!n.useClass}(t);if(r||o){const c=(o?At(t.useClass):t).prototype.ngOnDestroy;if(c){const l=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const d=l.indexOf(e);-1===d?l.push(e,[i,c]):l[d+1].push(i,c)}else l.push(e,c)}}}function J4(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Ok(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function pee(n,t,e){const i=Tn();if(i.firstCreatePass){const r=oa(n);Fk(e,i.data,i.blueprint,r,!0),Fk(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class ef{}class eN{}class tN extends ef{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new wO(this);const i=rs(t);this._bootstrapComponents=Ec(i.bootstrap),this._r3Injector=nO(t,e,[{provide:ef,useValue:this},{provide:bl,useValue:this.componentFactoryResolver}],si(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Lk extends eN{constructor(t){super(),this.moduleType=t}create(t){return new tN(this.moduleType,t)}}class yee extends ef{constructor(t,e,i){super(),this.componentFactoryResolver=new wO(this),this.instance=null;const r=new HP([...t,{provide:ef,useValue:this},{provide:bl,useValue:this.componentFactoryResolver}],e||Ab(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Kb(n,t,e=null){return new yee(n,t,e).injector}let xee=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=LP(0,e.type),r=i.length>0?Kb([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=ke({token:n,providedIn:"environment",factory:()=>new n(Q(Ra))}),n})();function Bk(n){n.getStandaloneInjector=t=>t.get(xee).getOrCreateStandaloneInjector(n)}function us(n,t,e){const i=Ao()+n,r=we();return r[i]===Ut?Oa(r,i,e?t.call(e):t()):function Cp(n,t){return n[t]}(r,i)}function la(n,t,e,i){return cN(we(),Ao(),n,t,e,i)}function Uk(n,t,e,i,r){return lN(we(),Ao(),n,t,e,i,r)}function Rp(n,t){const e=n[t];return e===Ut?void 0:e}function cN(n,t,e,i,r,o){const s=t+e;return to(n,s,r)?Oa(n,s+1,o?i.call(o,r):i(r)):Rp(n,s+1)}function lN(n,t,e,i,r,o,s){const a=t+e;return Gd(n,a,r,o)?Oa(n,a+2,s?i.call(s,r,o):i(r,o)):Rp(n,a+2)}function no(n,t){const e=Tn();let i;const r=n+fi;e.firstCreatePass?(i=function Lee(n,t){if(t)for(let e=t.length-1;e>=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Od(i.type)),s=As(y);try{const a=ub(!1),c=o();return ub(a),function IZ(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,we(),r,c),c}finally{As(s)}}function Va(n,t,e){const i=n+fi,r=we(),o=Ch(r,i);return Fp(r,i)?cN(r,Ao(),t,o.transform,e,o):o.transform(e)}function Kd(n,t,e,i){const r=n+fi,o=we(),s=Ch(o,r);return Fp(o,r)?lN(o,Ao(),t,s.transform,e,i,s):s.transform(e,i)}function Fp(n,t){return n[rt].data[t].pure}function Hk(n){return t=>{setTimeout(n,void 0,t)}}const De=class Hee extends Me{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const c=t;r=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=Hk(o),r&&(r=Hk(r)),s&&(s=Hk(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof lt&&t.add(a),a}};function zee(){return this._results[Symbol.iterator]()}class yl{get changes(){return this._changes||(this._changes=new De)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=yl.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=zee)}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){const i=this;i.dirty=!1;const r=function Rs(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function nK(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=Gee,n})();const jee=Un,$ee=class extends jee{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tView,r=Mb(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[ip]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Sa];return null!==s&&(r[Sa]=s.createEmbeddedView(i)),hk(i,r,t),new xp(r)}};function Gee(){return Xb(Lr(),we())}function Xb(n,t){return 4&n.type?new $ee(t,n,Lh(n,t)):null}let ii=(()=>{class n{}return n.__NG_ELEMENT_ID__=Wee,n})();function Wee(){return pN(Lr(),we())}const qee=ii,fN=class extends qee{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return Lh(this._hostTNode,this._hostLView)}get injector(){return new Sh(this._hostTNode,this._hostLView)}get parentInjector(){const t=yC(this._hostTNode,this._hostLView);if(TF(t)){const e=db(t,this._hostLView),i=lb(t);return new Sh(e[rt].data[i+8],e)}return new Sh(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=mN(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Do}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function dp(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const u=e||{};a=u.index,i=u.injector,r=u.projectableNodes,o=u.environmentInjector||u.ngModuleRef}const c=s?t:new wp(Vn(t)),l=i||this.parentInjector;if(!o&&null==c.ngModule){const h=(s?l:this.parentInjector).get(Ra,null);h&&(o=h)}const d=c.create(l,r,void 0,o);return this.insert(d.hostView,a),d}insert(t,e){const i=t._lView,r=i[rt];if(function TQ(n){return ra(n[Di])}(i)){const d=this.indexOf(t);if(-1!==d)this.detach(d);else{const u=i[Di],h=new fN(u,u[Zr],u[Di]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function $K(n,t,e,i){const r=Do+i,o=e.length;i>0&&(e[r-1][ia]=t),i0)i.push(s[a/2]);else{const l=o[a+1],d=t[-c];for(let u=Do;u{class n{constructor(e){this.appInits=e,this.resolve=Zb,this.reject=Zb,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:c})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(Q(Jb,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const rf=new ae("AppId",{providedIn:"root",factory:function BN(){return`${Jk()}${Jk()}${Jk()}`}});function Jk(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const VN=new ae("Platform Initializer"),tv=new ae("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Jn=new ae("AnimationModuleType");let vte=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ua=new ae("LocaleId",{providedIn:"root",factory:()=>Et(Ua,It.Optional|It.SkipSelf)||function yte(){return typeof $localize<"u"&&$localize.locale||Jh}()});class wte{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let UN=(()=>{class n{compileModuleSync(e){return new Lk(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ec(rs(e).declarations).reduce((s,a)=>{const c=Vn(a);return c&&s.push(new wp(c)),s},[]);return new wte(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ete=(()=>Promise.resolve(0))();function eE(n){typeof Zone>"u"?Ete.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Ye{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new De(!1),this.onMicrotaskEmpty=new De(!1),this.onStable=new De(!1),this.onError=new De(!1),typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Tte(){let n=hi.requestAnimationFrame,t=hi.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function Ate(n){const t=()=>{!function Dte(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(hi,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,nE(n),n.isCheckStableRunning=!0,tE(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),nE(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return jN(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),$N(n)}},onInvoke:(e,i,r,o,s,a,c)=>{try{return jN(n),e.invoke(r,o,s,a,c)}finally{n.shouldCoalesceRunChangeDetection&&t(),$N(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,nE(n),tE(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ye.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(Ye.isInAngularZone())throw new pe(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,Ste,Zb,Zb);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)}}const Ste={};function tE(n){if(0==n._nesting&&!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 nE(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function jN(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function $N(n){n._nesting--,tE(n)}class Ite{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new De,this.onMicrotaskEmpty=new De,this.onStable=new De,this.onError=new De}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)}}const GN=new ae(""),nv=new ae("");let oE,iE=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,oE||(function Mte(n){oE=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ye.assertNotInAngularZone(),eE(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())eE(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(Q(Ye),Q(rE),Q(nv))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),rE=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return oE?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Sc=!1;let xl=null;const WN=new ae("AllowMultipleToken"),sE=new ae("PlatformDestroyListeners"),qN=new ae("appBootstrapListener");class QN{constructor(t,e){this.name=t,this.token=e}}function XN(n,t,e=[]){const i=`Platform: ${t}`,r=new ae(i);return(o=[])=>{let s=aE();if(!s||s.injector.get(WN,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function Pte(n){if(xl&&!xl.get(WN,!1))throw new pe(400,!1);xl=n;const t=n.get(ZN);(function KN(n){const t=n.get(VN,null);t&&t.forEach(e=>e())})(n)}(function YN(n=[],t){return Ni.create({name:t,providers:[{provide:ek,useValue:"platform"},{provide:sE,useValue:new Set([()=>xl=null])},...n]})}(a,i))}return function Nte(n){const t=aE();if(!t)throw new pe(401,!1);return t}()}}function aE(){return xl?.get(ZN)??null}let ZN=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function eL(n,t){let e;return e="noop"===n?new Ite:("zone.js"===n?void 0:n)||new Ye(t),e}(i?.ngZone,function JN(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Ye,useValue:r}];return r.run(()=>{const s=Ni.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),c=a.injector.get(kc,null);if(!c)throw new pe(402,!1);return r.runOutsideAngular(()=>{const l=r.onError.subscribe({next:d=>{c.handleError(d)}});a.onDestroy(()=>{iv(this._modules,a),l.unsubscribe()})}),function tL(n,t,e){try{const i=e();return kp(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(c,r,()=>{const l=a.injector.get(ev);return l.runInitializers(),l.donePromise.then(()=>(function A4(n){Ds(n,"Expected localeId to be defined"),"string"==typeof n&&(D4=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ua,Jh)||Jh),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=nL({},i);return function Rte(n,t,e){const i=new Lk(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(sf);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new pe(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new pe(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(sE,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(Q(Ni))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function nL(n,t){return Array.isArray(t)?t.reduce(nL,n):{...n,...t}}let sf=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Dn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new Dn(a=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{Ye.assertNotInAngularZone(),eE(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const l=this._zone.onUnstable.subscribe(()=>{Ye.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{c.unsubscribe(),l.unsubscribe()}});this.isStable=oi(o,s.pipe(HR()))}bootstrap(e,i){const r=e instanceof jP;if(!this._injector.get(ev).done){!r&&function bh(n){const t=Vn(n)||Yr(n)||zo(n);return null!==t&&t.standalone}(e);throw new pe(405,Sc)}let s;s=r?e:this._injector.get(bl).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function Fte(n){return n.isBoundToModule}(s)?void 0:this._injector.get(ef),l=s.create(Ni.NULL,[],i||s.selector,a),d=l.location.nativeElement,u=l.injector.get(GN,null);return u?.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),iv(this.components,l),u?.unregisterApplication(d)}),this._loadComponent(l),l}tick(){if(this._runningTick)throw new pe(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;iv(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(qN,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>iv(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(Q(Ye),Q(Ra),Q(kc))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function iv(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let an=(()=>{class n{}return n.__NG_ELEMENT_ID__=Bte,n})();function Bte(n){return function Vte(n,t,e){if(op(n)&&!e){const i=jo(n.index,t);return new xp(i,i)}return 47&n.type?new xp(t[Jr],t):null}(Lr(),we(),16==(16&n))}class aL{constructor(){}supports(t){return Bb(t)}create(t){return new Gte(t)}}const $te=(n,t)=>t;class Gte{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||$te}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;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 null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new Wte(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?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._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new cL),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new cL),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(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._nextIdentityChange=t,t}}class Wte{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class qte{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(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;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class cL{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new qte,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function lL(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Kte(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class Kte{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function uL(){return new Dc([new aL])}let Dc=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||uL()),deps:[[n,new Vd,new Ia]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new pe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:uL}),n})();function hL(){return new Op([new dL])}let Op=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||hL()),deps:[[n,new Vd,new Ia]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new pe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:hL}),n})();const Zte=XN(null,"core",[]);let Jte=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(Q(sf))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();function af(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}let hE=null;function Ac(){return hE}class nne{}const gt=new ae("DocumentToken");let fE=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return function ine(){return Q(fL)}()},providedIn:"platform"}),n})();const rne=new ae("Location Initialized");let fL=(()=>{class n extends fE{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ac().getBaseHref(this._doc)}onPopState(e){const i=Ac().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Ac().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){mL()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){mL()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:function(){return function one(){return new fL(Q(gt))}()},providedIn:"platform"}),n})();function mL(){return!!window.history.pushState}function mE(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function pL(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function Ic(n){return n&&"?"!==n[0]?"?"+n:n}let Zd=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(_L)},providedIn:"root"}),n})();const gL=new ae("appBaseHref");let _L=(()=>{class n extends Zd{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Et(gt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return mE(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ic(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ic(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ic(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(fE),Q(gL,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sne=(()=>{class n extends Zd{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=mE(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ic(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ic(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(fE),Q(gL,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Np=(()=>{class n{constructor(e){this._subject=new De,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function lne(n){if(new RegExp("^(https?:)?//").test(n)){const[,e]=n.split(/\/\/[^\/]+/);return e}return n}(pL(bL(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ic(i))}normalize(e){return n.stripTrailingSlash(function cne(n,t){if(!n||!t.startsWith(n))return t;const e=t.substring(n.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,bL(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ic(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ic(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=Ic,n.joinWithSlash=mE,n.stripTrailingSlash=pL,n.\u0275fac=function(e){return new(e||n)(Q(Zd))},n.\u0275prov=ke({token:n,factory:function(){return function ane(){return new Np(Q(Zd))}()},providedIn:"root"}),n})();function bL(n){return n.replace(/\/index.html$/,"")}var Li=(()=>((Li=Li||{})[Li.Format=0]="Format",Li[Li.Standalone=1]="Standalone",Li))(),fn=(()=>((fn=fn||{})[fn.Narrow=0]="Narrow",fn[fn.Abbreviated=1]="Abbreviated",fn[fn.Wide=2]="Wide",fn[fn.Short=3]="Short",fn))(),Ei=(()=>((Ei=Ei||{})[Ei.Short=0]="Short",Ei[Ei.Medium=1]="Medium",Ei[Ei.Long=2]="Long",Ei[Ei.Full=3]="Full",Ei))(),Tt=(()=>((Tt=Tt||{})[Tt.Decimal=0]="Decimal",Tt[Tt.Group=1]="Group",Tt[Tt.List=2]="List",Tt[Tt.PercentSign=3]="PercentSign",Tt[Tt.PlusSign=4]="PlusSign",Tt[Tt.MinusSign=5]="MinusSign",Tt[Tt.Exponential=6]="Exponential",Tt[Tt.SuperscriptingExponent=7]="SuperscriptingExponent",Tt[Tt.PerMille=8]="PerMille",Tt[Tt.Infinity=9]="Infinity",Tt[Tt.NaN=10]="NaN",Tt[Tt.TimeSeparator=11]="TimeSeparator",Tt[Tt.CurrencyDecimal=12]="CurrencyDecimal",Tt[Tt.CurrencyGroup=13]="CurrencyGroup",Tt))();function sv(n,t){return Os(Mo(n)[tt.DateFormat],t)}function av(n,t){return Os(Mo(n)[tt.TimeFormat],t)}function cv(n,t){return Os(Mo(n)[tt.DateTimeFormat],t)}function Ps(n,t){const e=Mo(n),i=e[tt.NumberSymbols][t];if(typeof i>"u"){if(t===Tt.CurrencyDecimal)return e[tt.NumberSymbols][Tt.Decimal];if(t===Tt.CurrencyGroup)return e[tt.NumberSymbols][Tt.Group]}return i}function yL(n){if(!n[tt.ExtraData])throw new Error(`Missing extra locale data for the locale "${n[tt.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Os(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new Error("Locale data API: locale data undefined")}function gE(n){const[t,e]=n.split(":");return{hours:+t,minutes:+e}}const wne=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Lp={},Cne=/((?:[^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]*)/;var pr=(()=>((pr=pr||{})[pr.Short=0]="Short",pr[pr.ShortGMT=1]="ShortGMT",pr[pr.Long=2]="Long",pr[pr.Extended=3]="Extended",pr))(),Mt=(()=>((Mt=Mt||{})[Mt.FullYear=0]="FullYear",Mt[Mt.Month=1]="Month",Mt[Mt.Date=2]="Date",Mt[Mt.Hours=3]="Hours",Mt[Mt.Minutes=4]="Minutes",Mt[Mt.Seconds=5]="Seconds",Mt[Mt.FractionalSeconds=6]="FractionalSeconds",Mt[Mt.Day=7]="Day",Mt))(),Zt=(()=>((Zt=Zt||{})[Zt.DayPeriods=0]="DayPeriods",Zt[Zt.Days=1]="Days",Zt[Zt.Months=2]="Months",Zt[Zt.Eras=3]="Eras",Zt))();function kne(n,t,e,i){let r=function Fne(n){if(CL(n))return n;if("number"==typeof n&&!isNaN(n))return new Date(n);if("string"==typeof n){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){const[r,o=1,s=1]=n.split("-").map(a=>+a);return lv(r,o-1,s)}const e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(wne))return function Pne(n){const t=new Date(0);let e=0,i=0;const 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]));const s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,c=Number(n[6]||0),l=Math.floor(1e3*parseFloat("0."+(n[7]||0)));return o.call(t,s,a,c,l),t}(i)}const t=new Date(n);if(!CL(t))throw new Error(`Unable to convert "${n}" into a date`);return t}(n);t=Mc(e,t)||t;let a,s=[];for(;t;){if(a=Cne.exec(t),!a){s.push(t);break}{s=s.concat(a.slice(1));const d=s.pop();if(!d)break;t=d}}let c=r.getTimezoneOffset();i&&(c=wL(i,c),r=function Rne(n,t,e){const i=e?-1:1,r=n.getTimezoneOffset();return function Mne(n,t){return(n=new Date(n.getTime())).setMinutes(n.getMinutes()+t),n}(n,i*(wL(t,r)-r))}(r,i,!0));let l="";return s.forEach(d=>{const u=function Ine(n){if(bE[n])return bE[n];let t;switch(n){case"G":case"GG":case"GGG":t=ai(Zt.Eras,fn.Abbreviated);break;case"GGGG":t=ai(Zt.Eras,fn.Wide);break;case"GGGGG":t=ai(Zt.Eras,fn.Narrow);break;case"y":t=Zi(Mt.FullYear,1,0,!1,!0);break;case"yy":t=Zi(Mt.FullYear,2,0,!0,!0);break;case"yyy":t=Zi(Mt.FullYear,3,0,!1,!0);break;case"yyyy":t=Zi(Mt.FullYear,4,0,!1,!0);break;case"Y":t=fv(1);break;case"YY":t=fv(2,!0);break;case"YYY":t=fv(3);break;case"YYYY":t=fv(4);break;case"M":case"L":t=Zi(Mt.Month,1,1);break;case"MM":case"LL":t=Zi(Mt.Month,2,1);break;case"MMM":t=ai(Zt.Months,fn.Abbreviated);break;case"MMMM":t=ai(Zt.Months,fn.Wide);break;case"MMMMM":t=ai(Zt.Months,fn.Narrow);break;case"LLL":t=ai(Zt.Months,fn.Abbreviated,Li.Standalone);break;case"LLLL":t=ai(Zt.Months,fn.Wide,Li.Standalone);break;case"LLLLL":t=ai(Zt.Months,fn.Narrow,Li.Standalone);break;case"w":t=_E(1);break;case"ww":t=_E(2);break;case"W":t=_E(1,!0);break;case"d":t=Zi(Mt.Date,1);break;case"dd":t=Zi(Mt.Date,2);break;case"c":case"cc":t=Zi(Mt.Day,1);break;case"ccc":t=ai(Zt.Days,fn.Abbreviated,Li.Standalone);break;case"cccc":t=ai(Zt.Days,fn.Wide,Li.Standalone);break;case"ccccc":t=ai(Zt.Days,fn.Narrow,Li.Standalone);break;case"cccccc":t=ai(Zt.Days,fn.Short,Li.Standalone);break;case"E":case"EE":case"EEE":t=ai(Zt.Days,fn.Abbreviated);break;case"EEEE":t=ai(Zt.Days,fn.Wide);break;case"EEEEE":t=ai(Zt.Days,fn.Narrow);break;case"EEEEEE":t=ai(Zt.Days,fn.Short);break;case"a":case"aa":case"aaa":t=ai(Zt.DayPeriods,fn.Abbreviated);break;case"aaaa":t=ai(Zt.DayPeriods,fn.Wide);break;case"aaaaa":t=ai(Zt.DayPeriods,fn.Narrow);break;case"b":case"bb":case"bbb":t=ai(Zt.DayPeriods,fn.Abbreviated,Li.Standalone,!0);break;case"bbbb":t=ai(Zt.DayPeriods,fn.Wide,Li.Standalone,!0);break;case"bbbbb":t=ai(Zt.DayPeriods,fn.Narrow,Li.Standalone,!0);break;case"B":case"BB":case"BBB":t=ai(Zt.DayPeriods,fn.Abbreviated,Li.Format,!0);break;case"BBBB":t=ai(Zt.DayPeriods,fn.Wide,Li.Format,!0);break;case"BBBBB":t=ai(Zt.DayPeriods,fn.Narrow,Li.Format,!0);break;case"h":t=Zi(Mt.Hours,1,-12);break;case"hh":t=Zi(Mt.Hours,2,-12);break;case"H":t=Zi(Mt.Hours,1);break;case"HH":t=Zi(Mt.Hours,2);break;case"m":t=Zi(Mt.Minutes,1);break;case"mm":t=Zi(Mt.Minutes,2);break;case"s":t=Zi(Mt.Seconds,1);break;case"ss":t=Zi(Mt.Seconds,2);break;case"S":t=Zi(Mt.FractionalSeconds,1);break;case"SS":t=Zi(Mt.FractionalSeconds,2);break;case"SSS":t=Zi(Mt.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=uv(pr.Short);break;case"ZZZZZ":t=uv(pr.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=uv(pr.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=uv(pr.Long);break;default:return null}return bE[n]=t,t}(d);l+=u?u(r,e,c):"''"===d?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function lv(n,t,e){const i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function Mc(n,t){const e=function dne(n){return Mo(n)[tt.LocaleId]}(n);if(Lp[e]=Lp[e]||{},Lp[e][t])return Lp[e][t];let i="";switch(t){case"shortDate":i=sv(n,Ei.Short);break;case"mediumDate":i=sv(n,Ei.Medium);break;case"longDate":i=sv(n,Ei.Long);break;case"fullDate":i=sv(n,Ei.Full);break;case"shortTime":i=av(n,Ei.Short);break;case"mediumTime":i=av(n,Ei.Medium);break;case"longTime":i=av(n,Ei.Long);break;case"fullTime":i=av(n,Ei.Full);break;case"short":const r=Mc(n,"shortTime"),o=Mc(n,"shortDate");i=dv(cv(n,Ei.Short),[r,o]);break;case"medium":const s=Mc(n,"mediumTime"),a=Mc(n,"mediumDate");i=dv(cv(n,Ei.Medium),[s,a]);break;case"long":const c=Mc(n,"longTime"),l=Mc(n,"longDate");i=dv(cv(n,Ei.Long),[c,l]);break;case"full":const d=Mc(n,"fullTime"),u=Mc(n,"fullDate");i=dv(cv(n,Ei.Full),[d,u])}return i&&(Lp[e][t]=i),i}function dv(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return null!=t&&i in t?t[i]:e})),n}function ua(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=1-n:(n=-n,o=e));let s=String(n);for(;s.length0||a>-e)&&(a+=e),n===Mt.Hours)0===a&&-12===e&&(a=12);else if(n===Mt.FractionalSeconds)return function Ene(n,t){return ua(n,3).substring(0,t)}(a,t);const c=Ps(s,Tt.MinusSign);return ua(a,t,c,i,r)}}function ai(n,t,e=Li.Format,i=!1){return function(r,o){return function Sne(n,t,e,i,r,o){switch(e){case Zt.Months:return function fne(n,t,e){const i=Mo(n),o=Os([i[tt.MonthsFormat],i[tt.MonthsStandalone]],t);return Os(o,e)}(t,r,i)[n.getMonth()];case Zt.Days:return function hne(n,t,e){const i=Mo(n),o=Os([i[tt.DaysFormat],i[tt.DaysStandalone]],t);return Os(o,e)}(t,r,i)[n.getDay()];case Zt.DayPeriods:const s=n.getHours(),a=n.getMinutes();if(o){const l=function _ne(n){const t=Mo(n);return yL(t),(t[tt.ExtraData][2]||[]).map(i=>"string"==typeof i?gE(i):[gE(i[0]),gE(i[1])])}(t),d=function bne(n,t,e){const i=Mo(n);yL(i);const o=Os([i[tt.ExtraData][0],i[tt.ExtraData][1]],t)||[];return Os(o,e)||[]}(t,r,i),u=l.findIndex(h=>{if(Array.isArray(h)){const[f,m]=h,g=s>=f.hours&&a>=f.minutes,p=s0?Math.floor(r/60):Math.ceil(r/60);switch(n){case pr.Short:return(r>=0?"+":"")+ua(s,2,o)+ua(Math.abs(r%60),2,o);case pr.ShortGMT:return"GMT"+(r>=0?"+":"")+ua(s,1,o);case pr.Long:return"GMT"+(r>=0?"+":"")+ua(s,2,o)+":"+ua(Math.abs(r%60),2,o);case pr.Extended:return 0===i?"Z":(r>=0?"+":"")+ua(s,2,o)+":"+ua(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${n}"`)}}}const Dne=0,hv=4;function xL(n){return lv(n.getFullYear(),n.getMonth(),n.getDate()+(hv-n.getDay()))}function _E(n,t=!1){return function(e,i){let r;if(t){const o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{const o=xL(e),s=function Ane(n){const t=lv(n,Dne,1).getDay();return lv(n,0,1+(t<=hv?hv:hv+7)-t)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return ua(r,n,Ps(i,Tt.MinusSign))}}function fv(n,t=!1){return function(e,i){return ua(xL(e).getFullYear(),n,Ps(i,Tt.MinusSign),t)}}const bE={};function wL(n,t){n=n.replace(/:/g,"");const e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function CL(n){return n instanceof Date&&!isNaN(n.valueOf())}function SL(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const kE=/\s+/,DL=[];let ha=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=DL,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(kE):DL}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(kE):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(kE).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(y(Dc),y(Op),y(Ne),y(Cc))},n.\u0275dir=X({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class qne{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let io=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new qne(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),ML(a,r)}});for(let r=0,o=i.length;r{ML(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un),y(Dc))},n.\u0275dir=X({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function ML(n,t){n.context.$implicit=t.item}let ri=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new Kne,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){RL("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){RL("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un))},n.\u0275dir=X({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class Kne{constructor(){this.$implicit=null,this.ngIf=null}}function RL(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${si(t)}'.`)}class EE{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Vp=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),TE=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new EE(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un),y(Vp,9))},n.\u0275dir=X({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),FL=(()=>{class n{constructor(e,i,r){r._addDefault(new EE(e,i))}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Un),y(Vp,9))},n.\u0275dir=X({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),pv=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(y(ii))},n.\u0275dir=X({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[jn]}),n})();function fa(n,t){return new pe(2100,!1)}class Zne{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class Jne{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const eie=new Jne,tie=new Zne;let SE=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(kp(e))return eie;if(LO(e))return tie;throw fa()}_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._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(y(an,16))},n.\u0275pipe=Xr({name:"async",type:n,pure:!1,standalone:!0}),n})(),DE=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fa();return e.toUpperCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=Xr({name:"uppercase",type:n,pure:!0,standalone:!0}),n})();const sie=new ae("DATE_PIPE_DEFAULT_TIMEZONE"),aie=new ae("DATE_PIPE_DEFAULT_OPTIONS");let Jd=(()=>{class n{constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(null==e||""===e||e!=e)return null;try{return kne(e,i??this.defaultOptions?.dateFormat??"mediumDate",o||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(s){throw fa()}}}return n.\u0275fac=function(e){return new(e||n)(y(Ua,16),y(sie,24),y(aie,24))},n.\u0275pipe=Xr({name:"date",type:n,pure:!0,standalone:!0}),n})(),Br=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const NL="browser";let xie=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>new wie(Q(gt),window)}),n})();class wie{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function Cie(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=LL(this.window.history)||LL(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function LL(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class BL{}class Xie extends nne{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class FE extends Xie{static makeCurrent(){!function tne(n){hE||(hE=n)}(new FE)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).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"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function Yie(){return Hp=Hp||document.querySelector("base"),Hp?Hp.getAttribute("href"):null}();return null==e?null:function Zie(n){bv=bv||document.createElement("a"),bv.setAttribute("href",n);const t=bv.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Hp=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return SL(document.cookie,t)}}let bv,Hp=null;const jL=new ae("TRANSITION_ID"),ere=[{provide:Jb,useFactory:function Jie(n,t,e){return()=>{e.get(ev).donePromise.then(()=>{const i=Ac(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const vv=new ae("EventManagerPlugins");let yv=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),zp=(()=>{class n extends GL{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const PE={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/MathML/"},OE=/%COMP%/g,QL=new ae("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function KL(n,t){return t.flat(100).map(e=>e.replace(OE,n))}function XL(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let xv=(()=>{class n{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new NE(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof JL?r.applyToHost(e):r instanceof LE&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,c=this.removeStylesOnCompDestory;switch(i.encapsulation){case na.Emulated:o=new JL(s,a,i,this.appId,c);break;case na.ShadowDom:return new lre(s,a,e,i);default:o=new LE(s,a,i,c)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(Q(yv),Q(zp),Q(rf),Q(QL))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class NE{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(PE[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(ZL(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(ZL(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);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;const o=PE[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=PE[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&($o.DashCase|$o.Important)?t.style.setProperty(e,i,r&$o.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&$o.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,XL(i)):this.eventManager.addEventListener(t,e,XL(i))}}function ZL(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class lre extends NE{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=KL(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}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(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class LE extends NE{constructor(t,e,i,r,o=i.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=KL(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class JL extends LE{constructor(t,e,i,r,o){const s=r+"-"+i.id;super(t,e,i,o,s),this.contentAttr=function sre(n){return"_ngcontent-%COMP%".replace(OE,n)}(s),this.hostAttr=function are(n){return"_nghost-%COMP%".replace(OE,n)}(s)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}let dre=(()=>{class n extends $L{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const e3=["alt","control","meta","shift"],ure={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hre={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let fre=(()=>{class n extends $L{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ac().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),e3.forEach(l=>{const d=i.indexOf(l);d>-1&&(i.splice(d,1),s+=l+".")}),s+=o,0!=i.length||0===o.length)return null;const c={};return c.domEventName=r,c.fullKey=s,c}static matchEventFullKeyCode(e,i){let r=ure[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),e3.forEach(s=>{s!==r&&(0,hre[s])(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"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const n3=[{provide:tv,useValue:NL},{provide:VN,useValue:function mre(){FE.makeCurrent()},multi:!0},{provide:gt,useFactory:function gre(){return function iX(n){WC=n}(document),document},deps:[]}],_re=XN(Zte,"browser",n3),r3=new ae(""),o3=[{provide:nv,useClass:class tre{addToWindow(t){hi.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},hi.getAllAngularTestabilities=()=>t.getAllTestabilities(),hi.getAllAngularRootElements=()=>t.getAllRootElements(),hi.frameworkStabilizers||(hi.frameworkStabilizers=[]),hi.frameworkStabilizers.push(i=>{const r=hi.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(c){s=s||c,o--,0==o&&i(s)};r.forEach(function(c){c.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Ac().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:GN,useClass:iE,deps:[Ye,rE,nv]},{provide:iE,useClass:iE,deps:[Ye,rE,nv]}],s3=[{provide:ek,useValue:"root"},{provide:kc,useFactory:function pre(){return new kc},deps:[]},{provide:vv,useClass:dre,multi:!0,deps:[gt,Ye,tv]},{provide:vv,useClass:fre,multi:!0,deps:[gt]},{provide:xv,useClass:xv,deps:[yv,zp,rf,QL]},{provide:vp,useExisting:xv},{provide:GL,useExisting:zp},{provide:zp,useClass:zp,deps:[gt]},{provide:yv,useClass:yv,deps:[vv,Ye]},{provide:BL,useClass:nre,deps:[]},[]];let a3=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:rf,useValue:e.appId},{provide:jL,useExisting:rf},ere]}}}return n.\u0275fac=function(e){return new(e||n)(Q(r3,12))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[...s3,...o3],imports:[Br,Jte]}),n})(),c3=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:function(e){let i=null;return i=e?new e:function vre(){return new c3(Q(gt))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let UE=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(e){let i=null;return i=e?new(e||n):Q(u3),i},providedIn:"root"}),n})(),u3=(()=>{class n extends UE{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Nn.NONE:return i;case Nn.HTML:return Ma(i,"HTML")?cs(i):MP(this._doc,String(i)).toString();case Nn.STYLE:return Ma(i,"Style")?cs(i):i;case Nn.SCRIPT:if(Ma(i,"Script"))return cs(i);throw new Error("unsafe value used in a script context");case Nn.URL:return Ma(i,"URL")?cs(i):kb(String(i));case Nn.RESOURCE_URL:if(Ma(i,"ResourceURL"))return cs(i);throw new Error(`unsafe value used in a resource URL context (see ${$0})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${$0})`)}}bypassSecurityTrustHtml(e){return function dX(n){return new rX(n)}(e)}bypassSecurityTrustStyle(e){return function uX(n){return new oX(n)}(e)}bypassSecurityTrustScript(e){return function hX(n){return new sX(n)}(e)}bypassSecurityTrustUrl(e){return function fX(n){return new aX(n)}(e)}bypassSecurityTrustResourceUrl(e){return function mX(n){return new cX(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:function(e){let i=null;return i=e?new e:function kre(n){return new u3(n.get(gt))}(Q(Ni)),i},providedIn:"root"}),n})();function it(...n){return Pi(n,Ym(n))}class Ti extends Me{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){const{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}const cf=hc(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:Ere}=Array,{getPrototypeOf:Tre,prototype:Sre,keys:Dre}=Object;function h3(n){if(1===n.length){const t=n[0];if(Ere(t))return{args:t,keys:null};if(function Are(n){return n&&"object"==typeof n&&Tre(n)===Sre}(t)){const e=Dre(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}const{isArray:Ire}=Array;function HE(n){return ct(t=>function Mre(n,t){return Ire(t)?n(...t):n(t)}(n,t))}function f3(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Cl(...n){const t=Ym(n),e=LR(n),{args:i,keys:r}=h3(n);if(0===i.length)return Pi([],t);const o=new Dn(function Rre(n,t,e=pl){return i=>{m3(t,()=>{const{length:r}=n,o=new Array(r);let s=r,a=r;for(let c=0;c{const l=Pi(n[c],t);let d=!1;l.subscribe(ui(i,u=>{o[c]=u,d||(d=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}(i,t,r?s=>f3(r,s):pl));return e?o.pipe(HE(e)):o}function m3(n,t,e){n?mc(e,n,t):t()}function jp(...n){return function Fre(){return gh(1)}()(Pi(n,Ym(n)))}function lf(n){return new Dn(t=>{Kr(n()).subscribe(t)})}function eu(n,t){const e=sn(n)?n:()=>n,i=r=>r.error(e());return new Dn(t?r=>t.schedule(i,0,r):i)}function zE(){return Ci((n,t)=>{let e=null;n._refCount++;const i=ui(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(e=null);const r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}class jE extends Dn{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,CR(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new lt;const e=this.getSubject();t.add(this.source.subscribe(ui(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=lt.EMPTY)}return t}refCount(){return zE()(this)}}function Ji(n,t){return Ci((e,i)=>{let r=null,o=0,s=!1;const a=()=>s&&!r&&i.complete();e.subscribe(ui(i,c=>{r?.unsubscribe();let l=0;const d=o++;Kr(n(c,d)).subscribe(r=ui(i,u=>i.next(t?t(c,u,d,l++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function An(n){return n<=0?()=>ns:Ci((t,e)=>{let i=0;t.subscribe(ui(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function er(...n){const t=Ym(n);return Ci((e,i)=>{(t?jp(n,e,t):jp(n,e)).subscribe(i)})}function mn(n,t){return Ci((e,i)=>{let r=0;e.subscribe(ui(i,o=>n.call(t,o,r++)&&i.next(o)))})}function wv(n){return Ci((t,e)=>{let i=!1;t.subscribe(ui(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}function p3(n=Pre){return Ci((t,e)=>{let i=!1;t.subscribe(ui(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function Pre(){return new cf}function Ns(n,t){const e=arguments.length>=2;return i=>i.pipe(n?mn((r,o)=>n(r,o,i)):pl,An(1),e?wv(t):p3(()=>new cf))}function kl(n,t){return sn(t)?hr(n,t,1):hr(n,1)}function gi(n,t,e){const i=sn(n)||t||e?{next:n,error:t,complete:e}:n;return i?Ci((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(ui(o,c=>{var l;null===(l=i.next)||void 0===l||l.call(i,c),o.next(c)},()=>{var c;a=!1,null===(c=i.complete)||void 0===c||c.call(i),o.complete()},c=>{var l;a=!1,null===(l=i.error)||void 0===l||l.call(i,c),o.error(c)},()=>{var c,l;a&&(null===(c=i.unsubscribe)||void 0===c||c.call(i)),null===(l=i.finalize)||void 0===l||l.call(i)}))}):pl}function Vi(n){return Ci((t,e)=>{let o,i=null,r=!1;i=t.subscribe(ui(e,void 0,void 0,s=>{o=Kr(n(s,Vi(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function g3(n,t){return Ci(function Ore(n,t,e,i,r){return(o,s)=>{let a=e,c=t,l=0;o.subscribe(ui(s,d=>{const u=l++;c=a?n(c,d,u):(a=!0,d),i&&s.next(c)},r&&(()=>{a&&s.next(c),s.complete()})))}}(n,t,arguments.length>=2,!0))}function $E(n){return n<=0?()=>ns:Ci((t,e)=>{let i=[];t.subscribe(ui(e,r=>{i.push(r),n{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function _3(n,t){const e=arguments.length>=2;return i=>i.pipe(n?mn((r,o)=>n(r,o,i)):pl,$E(1),e?wv(t):p3(()=>new cf))}function GE(n,t=!1){return Ci((e,i)=>{let r=0;e.subscribe(ui(i,o=>{const s=n(o,r++);(s||t)&&i.next(o),!s&&i.complete()}))})}function Cv(n){return ct(()=>n)}function kv(n){return Ci((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}const $t="primary",$p=Symbol("RouteTitle");class Nre{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function df(n){return new Nre(n)}function Lre(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return n===t}function v3(n){return Array.prototype.concat.apply([],n)}function y3(n){return n.length>0?n[n.length-1]:null}function Vr(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function El(n){return Tk(n)?n:kp(n)?Pi(Promise.resolve(n)):it(n)}const Ev=!1,Vre={exact:function C3(n,t,e){if(!tu(n.segments,t.segments)||!Tv(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!C3(n.children[i],t.children[i],e))return!1;return!0},subset:k3},x3={exact:function Ure(n,t){return Ha(n,t)},subset:function Hre(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>b3(n[e],t[e]))},ignored:()=>!0};function w3(n,t,e){return Vre[e.paths](n.root,t.root,e.matrixParams)&&x3[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function k3(n,t,e){return E3(n,t,t.segments,e)}function E3(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!tu(r,e)||t.hasChildren()||!Tv(r,e,i))}if(n.segments.length===e.length){if(!tu(n.segments,e)||!Tv(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!k3(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!!(tu(n.segments,r)&&Tv(n.segments,r,i)&&n.children[$t])&&E3(n.children[$t],t,o,i)}}function Tv(n,t,e){return t.every((i,r)=>x3[e](n[r].parameters,i.parameters))}class Tl{constructor(t=new cn([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=df(this.queryParams)),this._queryParamMap}toString(){return $re.serialize(this)}}class cn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Vr(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Sv(this)}}class Gp{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=df(this.parameters)),this._parameterMap}toString(){return D3(this)}}function tu(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}let Wp=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return new WE},providedIn:"root"}),n})();class WE{parse(t){const e=new Jre(t);return new Tl(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${qp(t.root,!0)}`,i=function qre(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${Dv(e)}=${Dv(r)}`).join("&"):`${Dv(e)}=${Dv(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${i}${"string"==typeof t.fragment?`#${function Gre(n){return encodeURI(n)}(t.fragment)}`:""}`}}const $re=new WE;function Sv(n){return n.segments.map(t=>D3(t)).join("/")}function qp(n,t){if(!n.hasChildren())return Sv(n);if(t){const e=n.children[$t]?qp(n.children[$t],!1):"",i=[];return Vr(n.children,(r,o)=>{o!==$t&&i.push(`${o}:${qp(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function jre(n,t){let e=[];return Vr(n.children,(i,r)=>{r===$t&&(e=e.concat(t(i,r)))}),Vr(n.children,(i,r)=>{r!==$t&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===$t?[qp(n.children[$t],!1)]:[`${r}:${qp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[$t]?`${Sv(n)}/${e[0]}`:`${Sv(n)}/(${e.join("//")})`}}function T3(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Dv(n){return T3(n).replace(/%3B/gi,";")}function qE(n){return T3(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Av(n){return decodeURIComponent(n)}function S3(n){return Av(n.replace(/\+/g,"%20"))}function D3(n){return`${qE(n.path)}${function Wre(n){return Object.keys(n).map(t=>`;${qE(t)}=${qE(n[t])}`).join("")}(n.parameters)}`}const Qre=/^[^\/()?;=#]+/;function Iv(n){const t=n.match(Qre);return t?t[0]:""}const Kre=/^[^=?&#]+/,Yre=/^[^&#]+/;class Jre{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new cn([],{}):new cn([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[$t]=new cn(t,e)),i}parseSegment(){const t=Iv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new pe(4009,Ev);return this.capture(t),new Gp(Av(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Iv(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Iv(this.remaining);r&&(i=r,this.capture(i))}t[Av(e)]=Av(i)}parseQueryParam(t){const e=function Xre(n){const t=n.match(Kre);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function Zre(n){const t=n.match(Yre);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=S3(e),o=S3(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Iv(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new pe(4010,Ev);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=$t);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[$t]:new cn([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new pe(4011,Ev)}}function QE(n){return n.segments.length>0?new cn([],{[$t]:n}):n}function Mv(n){const t={};for(const i of Object.keys(n.children)){const o=Mv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function eoe(n){if(1===n.numberOfChildren&&n.children[$t]){const t=n.children[$t];return new cn(n.segments.concat(t.segments),t.children)}return n}(new cn(n.segments,t))}function nu(n){return n instanceof Tl}const KE=!1;function toe(n,t,e,i,r){if(0===e.length)return uf(t.root,t.root,t.root,i,r);const o=function F3(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new R3(!0,0,n);let t=0,e=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Vr(o.outlets,(c,l)=>{a[l]="string"==typeof c?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,c)=>{0==c&&"."===a||(0==c&&""===a?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new R3(e,t,i)}(e);return o.toRoot()?uf(t.root,t.root,new cn([],{}),i,r):function s(c){const l=function ioe(n,t,e,i){if(n.isAbsolute)return new hf(t.root,!0,0);if(-1===i)return new hf(e,e===t.root,0);return function P3(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new pe(4005,KE&&"Invalid number of '../'");r=i.segments.length}return new hf(i,!1,r-o)}(e,i+(Qp(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,t,n.snapshot?._urlSegment,c),d=l.processChildren?ff(l.segmentGroup,l.index,o.commands):XE(l.segmentGroup,l.index,o.commands);return uf(t.root,l.segmentGroup,d,i,r)}(n.snapshot?._lastPathIndex)}function Qp(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Kp(n){return"object"==typeof n&&null!=n&&n.outlets}function uf(n,t,e,i,r){let s,o={};i&&Vr(i,(c,l)=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`}),s=n===t?e:M3(n,t,e);const a=QE(Mv(s));return new Tl(a,o,r)}function M3(n,t,e){const i={};return Vr(n.children,(r,o)=>{i[o]=r===t?e:M3(r,t,e)}),new cn(n.segments,i)}class R3{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Qp(i[0]))throw new pe(4003,KE&&"Root segment cannot have matrix parameters");const r=i.find(Kp);if(r&&r!==y3(i))throw new pe(4004,KE&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class hf{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function XE(n,t,e){if(n||(n=new cn([],{})),0===n.segments.length&&n.hasChildren())return ff(n,t,e);const i=function ooe(n,t,e){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=n.segments[r],a=e[i];if(Kp(a))break;const c=`${a}`,l=i0&&void 0===c)break;if(c&&l&&"object"==typeof l&&void 0===l.outlets){if(!N3(c,l,s))return o;i+=2}else{if(!N3(c,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=XE(n.children[s],t,o))}),Vr(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new cn(n.segments,r)}}function YE(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=YE(new cn([],{}),0,e))}),t}function O3(n){const t={};return Vr(n,(e,i)=>t[i]=`${e}`),t}function N3(n,t,e){return n==e.path&&Ha(t,e.parameters)}const Xp="imperative";class za{constructor(t,e){this.id=t,this.url=e}}class ZE extends za{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Sl extends za{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Rv extends za{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Fv extends za{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=16}}class JE extends za{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class aoe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class coe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class loe extends za{constructor(t,e,i,r,o){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class doe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class uoe extends za{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class hoe{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class foe{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class moe{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class poe{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class goe{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class _oe{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class L3{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let yoe=(()=>{class n{createUrlTree(e,i,r,o,s,a){return toe(e||i.root,r,o,s,a)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),woe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(t){return yoe.\u0275fac(t)},providedIn:"root"}),n})();class B3{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=eT(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=eT(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=tT(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return tT(t,this._root).map(e=>e.value)}}function eT(n,t){if(n===t.value)return t;for(const e of t.children){const i=eT(n,e);if(i)return i}return null}function tT(n,t){if(n===t.value)return[t];for(const e of t.children){const i=tT(n,e);if(i.length)return i.unshift(t),i}return[]}class Rc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function mf(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class V3 extends B3{constructor(t,e){super(t),this.snapshot=e,nT(this,t)}toString(){return this.snapshot.toString()}}function U3(n,t){const e=function Coe(n,t){const s=new Pv([],{},{},"",{},$t,t,null,n.root,-1,{});return new z3("",new Rc(s,[]))}(n,t),i=new Ti([new Gp("",{})]),r=new Ti({}),o=new Ti({}),s=new Ti({}),a=new Ti(""),c=new Dl(i,r,s,a,o,$t,t,e.root);return c.snapshot=e.root,new V3(new Rc(c,[]),e)}class Dl{constructor(t,e,i,r,o,s,a,c){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(ct(l=>l[$p]))??it(void 0),this._futureSnapshot=c}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(ct(t=>df(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(ct(t=>df(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function H3(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function koe(n){return n.reduce((t,e)=>({params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Pv{get title(){return this.data?.[$p]}constructor(t,e,i,r,o,s,a,c,l,d,u){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._urlSegment=l,this._lastPathIndex=d,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=df(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=df(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class z3 extends B3{constructor(t,e){super(e),this.url=t,nT(this,e)}toString(){return j3(this._root)}}function nT(n,t){t.value._routerState=n,t.children.forEach(e=>nT(n,e))}function j3(n){const t=n.children.length>0?` { ${n.children.map(j3).join(", ")} } `:"";return`${n.value}${t}`}function iT(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Ha(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Ha(t.params,e.params)||n.params.next(e.params),function Bre(n,t){if(n.length!==t.length)return!1;for(let e=0;eHa(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||rT(n.parent,t.parent))}function Yp(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function Toe(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Yp(n,i,r);return Yp(n,i)})}(n,t,e);return new Rc(i,r)}{if(n.shouldAttach(t.value)){const o=n.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Yp(n,a)),s}}const i=function Soe(n){return new Dl(new Ti(n.url),new Ti(n.params),new Ti(n.queryParams),new Ti(n.fragment),new Ti(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(o=>Yp(n,o));return new Rc(i,r)}}const oT="ngNavigationCancelingError";function $3(n,t){const{redirectTo:e,navigationBehaviorOptions:i}=nu(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=G3(!1,0,t);return r.url=e,r.navigationBehaviorOptions=i,r}function G3(n,t,e){const i=new Error("NavigationCancelingError: "+(n||""));return i[oT]=!0,i.cancellationCode=t,e&&(i.url=e),i}function W3(n){return q3(n)&&nu(n.url)}function q3(n){return n&&n[oT]}class Doe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Zp,this.attachRef=null}}let Zp=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Doe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ov=!1;let sT=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=$t,this.activateEvents=new De,this.deactivateEvents=new De,this.attachEvents=new De,this.detachEvents=new De,this.parentContexts=Et(Zp),this.location=Et(ii),this.changeDetector=Et(an),this.environmentInjector=Et(Ra)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new pe(4012,Ov);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new pe(4012,Ov);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new pe(4012,Ov);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new pe(4013,Ov);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Aoe(e,a,r.injector);if(i&&function Ioe(n){return!!n.resolveComponentFactory}(i)){const l=i.resolveComponentFactory(s);this.activated=r.createComponent(l,r.length,c)}else this.activated=r.createComponent(s,{index:r.length,injector:c,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[jn]}),n})();class Aoe{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===Dl?this.route:t===Zp?this.childContexts:this.parent.get(t,e)}}let aT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Ve({type:n,selectors:[["ng-component"]],standalone:!0,features:[Bk],decls:1,vars:0,template:function(e,i){1&e&&_e(0,"router-outlet")},dependencies:[sT],encapsulation:2}),n})();function Q3(n,t){return n.providers&&!n._injector&&(n._injector=Kb(n.providers,t,`Route: ${n.path}`)),n._injector??t}function lT(n){const t=n.children&&n.children.map(lT),e=t?{...n,children:t}:{...n};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==$t&&(e.component=aT),e}function Ls(n){return n.outlet||$t}function K3(n,t){const e=n.filter(i=>Ls(i)===t);return e.push(...n.filter(i=>Ls(i)!==t)),e}function Jp(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class Ooe{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),iT(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=mf(e);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Vr(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=mf(t);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=mf(t);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(t,e,i){const r=mf(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new _oe(o.value.snapshot))}),t.children.length&&this.forwardEvent(new poe(t.value.snapshot))}activateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(iT(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),iT(a.route.value),this.activateChildRoutes(t,null,s.children)}else{const a=Jp(r.snapshot),c=a?.get(bl)??null;s.attachRef=null,s.route=r,s.resolver=c,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,i)}}class X3{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Nv{constructor(t,e){this.component=t,this.route=e}}function Noe(n,t,e){const i=n._root;return eg(i,t?t._root:null,e,[i.value])}function pf(n,t){const e=Symbol(),i=t.get(n,e);return i===e?"function"!=typeof n||function Jq(n){return null!==q0(n)}(n)?t.get(n):n:i}function eg(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=mf(t);return n.children.forEach(s=>{(function Boe(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const c=function Voe(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!tu(n.url,t.url);case"pathParamsOrQueryParamsChange":return!tu(n.url,t.url)||!Ha(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!rT(n,t)||!Ha(n.queryParams,t.queryParams);default:return!rT(n,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new X3(i)):(o.data=s.data,o._resolvedData=s._resolvedData),eg(n,t,o.component?a?a.children:null:e,i,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Nv(a.outlet.component,s))}else s&&tg(t,a,r),r.canActivateChecks.push(new X3(i)),eg(n,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Vr(o,(s,a)=>tg(s,e.getContext(a),r)),r}function tg(n,t,e){const i=mf(n),r=n.value;Vr(i,(o,s)=>{tg(o,r.component?t?t.children.getContext(s):null:t,e)}),e.canDeactivateChecks.push(new Nv(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function ng(n){return"function"==typeof n}function dT(n){return n instanceof cf||"EmptyError"===n?.name}const Lv=Symbol("INITIAL_VALUE");function gf(){return Ji(n=>Cl(n.map(t=>t.pipe(An(1),er(Lv)))).pipe(ct(t=>{for(const e of t)if(!0!==e){if(e===Lv)return Lv;if(!1===e||e instanceof Tl)return e}return!0}),mn(t=>t!==Lv),An(1)))}function Y3(n){return function xq(...n){return yR(n)}(gi(t=>{if(nu(t))throw $3(0,t)}),ct(t=>!0===t))}const uT={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Z3(n,t,e,i,r){const o=hT(n,t,e);return o.matched?function nse(n,t,e,i){const r=t.canMatch;return r&&0!==r.length?it(r.map(s=>{const a=pf(s,n);return El(function Goe(n){return n&&ng(n.canMatch)}(a)?a.canMatch(t,e):n.runInContext(()=>a(t,e)))})).pipe(gf(),Y3()):it(!0)}(i=Q3(t,i),t,e).pipe(ct(s=>!0===s?o:{...uT})):it(o)}function hT(n,t,e){if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?{...uT}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||Lre)(e,n,t);if(!r)return{...uT};const o={};Vr(r.posParams,(a,c)=>{o[c]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Bv(n,t,e,i){if(e.length>0&&function ose(n,t,e){return e.some(i=>Vv(n,t,i)&&Ls(i)!==$t)}(n,e,i)){const o=new cn(t,function rse(n,t,e,i){const r={};r[$t]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const o of e)if(""===o.path&&Ls(o)!==$t){const s=new cn([],{});s._sourceSegment=n,s._segmentIndexShift=t.length,r[Ls(o)]=s}return r}(n,t,i,new cn(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function sse(n,t,e){return e.some(i=>Vv(n,t,i))}(n,e,i)){const o=new cn(n.segments,function ise(n,t,e,i,r){const o={};for(const s of i)if(Vv(n,e,s)&&!r[Ls(s)]){const a=new cn([],{});a._sourceSegment=n,a._segmentIndexShift=t.length,o[Ls(s)]=a}return{...r,...o}}(n,t,e,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const r=new cn(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function Vv(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function J3(n,t,e,i){return!!(Ls(n)===i||i!==$t&&Vv(t,e,n))&&("**"===n.path||hT(t,n,e).matched)}function eB(n,t,e){return 0===t.length&&!n.children[e]}const Uv=!1;class Hv{constructor(t){this.segmentGroup=t||null}}class tB{constructor(t){this.urlTree=t}}function ig(n){return eu(new Hv(n))}function nB(n){return eu(new tB(n))}class dse{constructor(t,e,i,r,o){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const t=Bv(this.urlTree.root,[],[],this.config).segmentGroup,e=new cn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,$t).pipe(ct(o=>this.createUrlTree(Mv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Vi(o=>{if(o instanceof tB)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Hv?this.noMatchError(o):o}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,$t).pipe(ct(r=>this.createUrlTree(Mv(r),t.queryParams,t.fragment))).pipe(Vi(r=>{throw r instanceof Hv?this.noMatchError(r):r}))}noMatchError(t){return new pe(4002,Uv)}createUrlTree(t,e,i){const r=QE(t);return new Tl(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(ct(o=>new cn([],o))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return Pi(r).pipe(kl(o=>{const s=i.children[o],a=K3(e,o);return this.expandSegmentGroup(t,a,s,o).pipe(ct(c=>({segment:c,outlet:o})))}),g3((o,s)=>(o[s.outlet]=s.segment,o),{}),_3())}expandSegment(t,e,i,r,o,s){return Pi(i).pipe(kl(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,o,s).pipe(Vi(l=>{if(l instanceof Hv)return it(null);throw l}))),Ns(a=>!!a),Vi((a,c)=>{if(dT(a))return eB(e,r,o)?it(new cn([],{})):ig(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,o,s,a){return J3(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s):ig(e):ig(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?nB(o):this.lineralizeSegments(i,o).pipe(hr(s=>{const a=new cn(s,{});return this.expandSegment(t,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){const{matched:a,consumedSegments:c,remainingSegments:l,positionalParamSegments:d}=hT(e,r,o);if(!a)return ig(e);const u=this.applyRedirectCommands(c,r.redirectTo,d);return r.redirectTo.startsWith("/")?nB(u):this.lineralizeSegments(r,u).pipe(hr(h=>this.expandSegment(t,e,i,h.concat(l),s,!1)))}matchSegmentAgainstRoute(t,e,i,r,o){return"**"===i.path?(t=Q3(i,t),i.loadChildren?(i._loadedRoutes?it({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(ct(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new cn(r,{})))):it(new cn(r,{}))):Z3(e,i,r,t).pipe(Ji(({matched:s,consumedSegments:a,remainingSegments:c})=>s?this.getChildConfig(t=i._injector??t,i,r).pipe(hr(d=>{const u=d.injector??t,h=d.routes,{segmentGroup:f,slicedSegments:m}=Bv(e,a,c,h),g=new cn(f.segments,f.children);if(0===m.length&&g.hasChildren())return this.expandChildren(u,h,g).pipe(ct(w=>new cn(a,w)));if(0===h.length&&0===m.length)return it(new cn(a,{}));const p=Ls(i)===o;return this.expandSegment(u,g,h,m,p?$t:o,!0).pipe(ct(k=>new cn(a.concat(k.segments),k.children)))})):ig(e)))}getChildConfig(t,e,i){return e.children?it({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?it({routes:e._loadedRoutes,injector:e._loadedInjector}):function tse(n,t,e,i){const r=t.canLoad;return void 0===r||0===r.length?it(!0):it(r.map(s=>{const a=pf(s,n);return El(function Hoe(n){return n&&ng(n.canLoad)}(a)?a.canLoad(t,e):n.runInContext(()=>a(t,e)))})).pipe(gf(),Y3())}(t,e,i).pipe(hr(r=>r?this.configLoader.loadChildren(t,e).pipe(gi(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function cse(n){return eu(G3(Uv,3))}())):it({routes:[],injector:t})}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return it(i);if(r.numberOfChildren>1||!r.children[$t])return t.redirectTo,eu(new pe(4e3,Uv));r=r.children[$t]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreateUrlTree(t,e,i,r){const o=this.createSegmentGroup(t,e.root,i,r);return new Tl(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Vr(t,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(t,e,i,r){const o=this.createSegments(t,e.segments,i,r);let s={};return Vr(e.children,(a,c)=>{s[c]=this.createSegmentGroup(t,a,i,r)}),new cn(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new pe(4001,Uv);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}class hse{}class pse{constructor(t,e,i,r,o,s,a){this.injector=t,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const t=Bv(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,$t).pipe(ct(e=>{if(null===e)return null;const i=new Pv([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},$t,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Rc(i,e),o=new z3(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(t){const e=t.value,i=H3(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,e,i):this.processSegment(t,e,i,i.segments,r)}processChildren(t,e,i){return Pi(Object.keys(i.children)).pipe(kl(r=>{const o=i.children[r],s=K3(e,r);return this.processSegmentGroup(t,s,o,r)}),g3((r,o)=>r&&o?(r.push(...o),r):null),GE(r=>null!==r),wv(null),_3(),ct(r=>{if(null===r)return null;const o=rB(r);return function gse(n){n.sort((t,e)=>t.value.outlet===$t?-1:e.value.outlet===$t?1:t.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(t,e,i,r,o){return Pi(e).pipe(kl(s=>this.processSegmentAgainstRoute(s._injector??t,s,i,r,o)),Ns(s=>!!s),Vi(s=>{if(dT(s))return eB(i,r,o)?it([]):it(null);throw s}))}processSegmentAgainstRoute(t,e,i,r,o){if(e.redirectTo||!J3(e,i,r,o))return it(null);let s;if("**"===e.path){const a=r.length>0?y3(r).parameters:{},c=sB(i)+r.length;s=it({snapshot:new Pv(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,aB(e),Ls(e),e.component??e._loadedComponent??null,e,oB(i),c,cB(e)),consumedSegments:[],remainingSegments:[]})}else s=Z3(i,e,r,t).pipe(ct(({matched:a,consumedSegments:c,remainingSegments:l,parameters:d})=>{if(!a)return null;const u=sB(i)+c.length;return{snapshot:new Pv(c,d,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,aB(e),Ls(e),e.component??e._loadedComponent??null,e,oB(i),u,cB(e)),consumedSegments:c,remainingSegments:l}}));return s.pipe(Ji(a=>{if(null===a)return it(null);const{snapshot:c,consumedSegments:l,remainingSegments:d}=a;t=e._injector??t;const u=e._loadedInjector??t,h=function _se(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:m}=Bv(i,l,d,h.filter(p=>void 0===p.redirectTo));if(0===m.length&&f.hasChildren())return this.processChildren(u,h,f).pipe(ct(p=>null===p?null:[new Rc(c,p)]));if(0===h.length&&0===m.length)return it([new Rc(c,[])]);const g=Ls(e)===o;return this.processSegment(u,h,f,m,g?$t:o).pipe(ct(p=>null===p?null:[new Rc(c,p)]))}))}}function bse(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function rB(n){const t=[],e=new Set;for(const i of n){if(!bse(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=rB(i.children);t.push(new Rc(i.value,r))}return t.filter(i=>!e.has(i))}function oB(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function sB(n){let t=n,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function aB(n){return n.data||{}}function cB(n){return n.resolve||{}}function lB(n){return"string"==typeof n.title||null===n.title}function fT(n){return Ji(t=>{const e=n(t);return e?Pi(e).pipe(ct(()=>t)):it(t)})}const _f=new ae("ROUTES");let mT=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Et(UN)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return it(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=El(e.loadComponent()).pipe(ct(uB),gi(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),kv(()=>{this.componentLoaders.delete(e)})),r=new jE(i,()=>new Me).pipe(zE());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return it({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(ct(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let c,l,d=!1;Array.isArray(a)?l=a:(c=a.create(e).injector,l=v3(c.get(_f,[],It.Self|It.Optional)));return{routes:l.map(lT),injector:c}}),kv(()=>{this.childrenLoaders.delete(i)})),s=new jE(o,()=>new Me).pipe(zE());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return El(e()).pipe(ct(uB),hr(i=>i instanceof eN||Array.isArray(i)?it(i):Pi(this.compiler.compileModuleAsync(i))))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function uB(n){return function Tse(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let jv=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Me,this.configLoader=Et(mT),this.environmentInjector=Et(Ra),this.urlSerializer=Et(Wp),this.rootContexts=Et(Zp),this.navigationId=0,this.afterPreactivation=()=>it(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new foe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new hoe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Ti({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Xp,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(mn(i=>0!==i.id),ct(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),Ji(i=>{let r=!1,o=!1;return it(i).pipe(gi(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),Ji(s=>{const a=e.browserUrlTree.toString(),c=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!c&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const d="";return this.events.next(new Fv(s.id,e.serializeUrl(i.rawUrl),d,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),ns}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return hB(s.source)&&(e.browserUrlTree=s.extractedUrl),it(s).pipe(Ji(d=>{const u=this.transitions?.getValue();return this.events.next(new ZE(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),u!==this.transitions?.getValue()?ns:Promise.resolve(d)}),function use(n,t,e,i){return Ji(r=>function lse(n,t,e,i,r){return new dse(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(ct(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),gi(d=>{this.currentNavigation={...this.currentNavigation,finalUrl:d.urlAfterRedirects},i.urlAfterRedirects=d.urlAfterRedirects}),function yse(n,t,e,i,r){return hr(o=>function mse(n,t,e,i,r,o,s="emptyOnly"){return new pse(n,t,e,i,r,s,o).recognize().pipe(Ji(a=>null===a?function fse(n){return new Dn(t=>t.error(n))}(new hse):it(a)))}(n,t,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(ct(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),gi(d=>{if(i.targetSnapshot=d.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!d.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);e.setBrowserUrl(h,d)}e.browserUrlTree=d.urlAfterRedirects}const u=new aoe(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}));if(c&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:d,extractedUrl:u,source:h,restoredState:f,extras:m}=s,g=new ZE(d,this.urlSerializer.serialize(u),h,f);this.events.next(g);const p=U3(u,this.rootComponentType).snapshot;return it(i={...s,targetSnapshot:p,urlAfterRedirects:u,extras:{...m,skipLocationChange:!1,replaceUrl:!1}})}{const d="";return this.events.next(new Fv(s.id,e.serializeUrl(i.extractedUrl),d,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),ns}}),gi(s=>{const a=new coe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),ct(s=>i={...s,guards:Noe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function qoe(n,t){return hr(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?it({...e,guardsResult:!0}):function Qoe(n,t,e,i){return Pi(n).pipe(hr(r=>function ese(n,t,e,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?it(o.map(a=>{const c=Jp(t)??r,l=pf(a,c);return El(function $oe(n){return n&&ng(n.canDeactivate)}(l)?l.canDeactivate(n,t,e,i):c.runInContext(()=>l(n,t,e,i))).pipe(Ns())})).pipe(gf()):it(!0)}(r.component,r.route,e,t,i)),Ns(r=>!0!==r,!0))}(s,i,r,n).pipe(hr(a=>a&&function Uoe(n){return"boolean"==typeof n}(a)?function Koe(n,t,e,i){return Pi(t).pipe(kl(r=>jp(function Yoe(n,t){return null!==n&&t&&t(new moe(n)),it(!0)}(r.route.parent,i),function Xoe(n,t){return null!==n&&t&&t(new goe(n)),it(!0)}(r.route,i),function Joe(n,t,e){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function Loe(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(s)).filter(s=>null!==s).map(s=>lf(()=>it(s.guards.map(c=>{const l=Jp(s.node)??e,d=pf(c,l);return El(function joe(n){return n&&ng(n.canActivateChild)}(d)?d.canActivateChild(i,n):l.runInContext(()=>d(i,n))).pipe(Ns())})).pipe(gf())));return it(o).pipe(gf())}(n,r.path,e),function Zoe(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return it(!0);const r=i.map(o=>lf(()=>{const s=Jp(t)??e,a=pf(o,s);return El(function zoe(n){return n&&ng(n.canActivate)}(a)?a.canActivate(t,n):s.runInContext(()=>a(t,n))).pipe(Ns())}));return it(r).pipe(gf())}(n,r.route,e))),Ns(r=>!0!==r,!0))}(i,o,n,t):it(a)),ct(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),gi(s=>{if(i.guardsResult=s.guardsResult,nu(s.guardsResult))throw $3(0,s.guardsResult);const a=new loe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),mn(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),fT(s=>{if(s.guards.canActivateChecks.length)return it(s).pipe(gi(a=>{const c=new doe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}),Ji(a=>{let c=!1;return it(a).pipe(function xse(n,t){return hr(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return it(e);let o=0;return Pi(r).pipe(kl(s=>function wse(n,t,e,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!lB(r)&&(o[$p]=r.title),function Cse(n,t,e,i){const r=function kse(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return it({});const o={};return Pi(r).pipe(hr(s=>function Ese(n,t,e,i){const r=Jp(t)??i,o=pf(n,r);return El(o.resolve?o.resolve(t,e):r.runInContext(()=>o(t,e)))}(n[s],t,e,i).pipe(Ns(),gi(a=>{o[s]=a}))),$E(1),Cv(o),Vi(s=>dT(s)?ns:eu(s)))}(o,n,t,i).pipe(ct(s=>(n._resolvedData=s,n.data=H3(n,e).resolve,r&&lB(r)&&(n.data[$p]=r.title),null)))}(s.route,i,n,t)),gi(()=>o++),$E(1),hr(s=>o===r.length?it(e):ns))})}(e.paramsInheritanceStrategy,this.environmentInjector),gi({next:()=>c=!0,complete:()=>{c||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),gi(a=>{const c=new uoe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}))}),fT(s=>{const a=c=>{const l=[];c.routeConfig?.loadComponent&&!c.routeConfig._loadedComponent&&l.push(this.configLoader.loadComponent(c.routeConfig).pipe(gi(d=>{c.component=d}),ct(()=>{})));for(const d of c.children)l.push(...a(d));return l};return Cl(a(s.targetSnapshot.root)).pipe(wv(),An(1))}),fT(()=>this.afterPreactivation()),ct(s=>{const a=function Eoe(n,t,e){const i=Yp(n,t._root,e?e._root:void 0);return new V3(i,t)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),gi(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((n,t,e)=>ct(i=>(new Ooe(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),An(1),gi({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Sl(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),kv(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Vi(s=>{if(o=!0,q3(s)){W3(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new Rv(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),W3(s)){const c=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),l={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||hB(i.source)};e.scheduleNavigation(c,Xp,null,l,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new JE(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(c){i.reject(c)}}return ns}))}))}cancelNavigationTransition(e,i,r){const o=new Rv(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function hB(n){return n!==Xp}let fB=(()=>{class n{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===$t);return i}getResolvedTitleForRoute(e){return e.data[$p]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(Sse)},providedIn:"root"}),n})(),Sse=(()=>{class n extends fB{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(Q(c3))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Dse=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(Ise)},providedIn:"root"}),n})();class Ase{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let Ise=(()=>{class n extends Ase{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const $v=new ae("",{providedIn:"root",factory:()=>({})});let Rse=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:function(){return Et(Fse)},providedIn:"root"}),n})(),Fse=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Pse(n){throw n}function Ose(n,t,e){return t.parse("/")}const Nse={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Lse={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let ro=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Et(vte),this.isNgZoneEnabled=!1,this.options=Et($v,{optional:!0})||{},this.errorHandler=this.options.errorHandler||Pse,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Ose,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Et(Rse),this.routeReuseStrategy=Et(Dse),this.urlCreationStrategy=Et(woe),this.titleStrategy=Et(fB),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=v3(Et(_f,{optional:!0})??[]),this.navigationTransitions=Et(jv),this.urlSerializer=Et(Wp),this.location=Et(Np),this.isNgZoneEnabled=Et(Ye)instanceof Ye&&Ye.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Tl,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=U3(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId??0},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Xp,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const c={...r};delete c.navigationId,delete c.\u0275routerPageId,0!==Object.keys(c).length&&(o.state=c)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(lT),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=i,l=c?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d={...this.currentUrlTree.queryParams,...o};break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,d,l??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=nu(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Xp,null,i)}navigate(e,i={skipLocationChange:!1}){return function Bse(n){for(let t=0;t{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,l,d;return s?(a=s.resolve,c=s.reject,l=s.promise):l=new Promise((u,h)=>{a=u,c=h}),d="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:d,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(u=>Promise.reject(u))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",o)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-(this.browserPageId??this.currentPageId);0!==o?this.location.historyGo(o):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class mB{}let Hse=(()=>{class n{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(mn(e=>e instanceof Sl),kl(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Kb(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return Pi(r).pipe(gh())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):it(null);const o=r.pipe(hr(s=>null===s?it(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?Pi([o,this.loader.loadComponent(i)]).pipe(gh()):o})}}return n.\u0275fac=function(e){return new(e||n)(Q(ro),Q(UN),Q(Ra),Q(mB),Q(mT))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const _T=new ae("");let pB=(()=>{class n{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ZE?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Sl&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof L3&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new L3(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(e){Fa()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();var hs=(()=>((hs=hs||{})[hs.COMPLETE=0]="COMPLETE",hs[hs.FAILED=1]="FAILED",hs[hs.REDIRECTING=2]="REDIRECTING",hs))();const bf=!1;function Al(n,t){return{\u0275kind:n,\u0275providers:t}}const bT=new ae("",{providedIn:"root",factory:()=>!1});function _B(){const n=Et(Ni);return t=>{const e=n.get(sf);if(t!==e.components[0])return;const i=n.get(ro),r=n.get(bB);1===n.get(vT)&&i.initialNavigation(),n.get(vB,null,It.Optional)?.setUpPreloading(),n.get(_T,null,It.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const bB=new ae(bf?"bootstrap done indicator":"",{factory:()=>new Me}),vT=new ae(bf?"initial navigation":"",{providedIn:"root",factory:()=>1});function Wse(){let n=[];return n=bf?[{provide:Sb,multi:!0,useFactory:()=>{const t=Et(ro);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function boe(n){if(!("type"in n))return`Unknown Router Event: ${n.constructor.name}`;switch(n.type){case 14:return`ActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state}, shouldActivate: ${n.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 2:return`NavigationCancel(id: ${n.id}, url: '${n.url}')`;case 16:return`NavigationSkipped(id: ${n.id}, url: '${n.url}')`;case 1:return`NavigationEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${n.id}, url: '${n.url}', error: ${n.error})`;case 0:return`NavigationStart(id: ${n.id}, url: '${n.url}')`;case 6:return`ResolveEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 5:return`ResolveStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 10:return`RouteConfigLoadEnd(path: ${n.route.path})`;case 9:return`RouteConfigLoadStart(path: ${n.route.path})`;case 4:return`RoutesRecognized(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 15:return`Scroll(anchor: '${n.anchor}', position: '${n.position?`${n.position[0]}, ${n.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Al(1,n)}const vB=new ae(bf?"router preloader":"");function qse(n){return Al(0,[{provide:vB,useExisting:Hse},{provide:mB,useExisting:n}])}const rg=!1,yB=new ae(rg?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),Qse=[Np,{provide:Wp,useClass:WE},ro,Zp,{provide:Dl,useFactory:function gB(n){return n.routerState.root},deps:[ro]},mT,rg?{provide:bT,useValue:!0}:[]];function Kse(){return new QN("Router",ro)}let xB=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[Qse,rg&&i?.enableTracing?Wse().\u0275providers:[],{provide:_f,multi:!0,useValue:e},{provide:yB,useFactory:Jse,deps:[[ro,new Ia,new Vd]]},{provide:$v,useValue:i||{}},i?.useHash?{provide:Zd,useClass:sne}:{provide:Zd,useClass:_L},{provide:_T,useFactory:()=>{const n=Et(xie),t=Et(Ye),e=Et($v),i=Et(jv),r=Et(Wp);return e.scrollOffset&&n.setOffset(e.scrollOffset),new pB(r,i,n,t,e)}},i?.preloadingStrategy?qse(i.preloadingStrategy).\u0275providers:[],{provide:QN,multi:!0,useFactory:Kse},i?.initialNavigation?eae(i):[],[{provide:wB,useFactory:_B},{provide:qN,multi:!0,useExisting:wB}]]}}static forChild(e){return{ngModule:n,providers:[{provide:_f,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(Q(yB,8))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[aT]}),n})();function Jse(n){if(rg&&n)throw new pe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function eae(n){return["disabled"===n.initialNavigation?Al(3,[{provide:Jb,multi:!0,useFactory:()=>{const t=Et(ro);return()=>{t.setUpLocationChangeListener()}}},{provide:vT,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?Al(2,[{provide:vT,useValue:0},{provide:Jb,multi:!0,deps:[Ni],useFactory:t=>{const e=t.get(rne,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=t.get(ro),o=t.get(bB);(function zse(n,t){n.events.pipe(mn(e=>e instanceof Sl||e instanceof Rv||e instanceof JE||e instanceof Fv),ct(e=>e instanceof Sl||e instanceof Fv?hs.COMPLETE:e instanceof Rv&&(0===e.code||1===e.code)?hs.REDIRECTING:hs.FAILED),mn(e=>e!==hs.REDIRECTING),An(1)).subscribe(()=>{t()})})(r,()=>{i(!0)}),t.get(jv).afterPreactivation=()=>(i(!0),o.closed?it(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const wB=new ae(rg?"Router Initializer":"");function CB(n,t,e,i,r,o,s){try{var a=n[o](s),c=a.value}catch(l){return void e(l)}a.done?t(c):Promise.resolve(c).then(i,r)}function xe(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(c){CB(o,i,r,s,a,"next",c)}function a(c){CB(o,i,r,s,a,"throw",c)}s(void 0)})}}class yT{}function xT(n){return n&&"function"==typeof n.connect&&!(n instanceof jE)}class kB{applyChanges(t,e,i,r,o){t.forEachOperation((s,a,c)=>{let l,d;if(null==s.previousIndex){const u=i(s,a,c);l=e.createEmbeddedView(u.templateRef,u.context,u.index),d=1}else null==c?(e.remove(a),d=3):(l=e.get(a),e.move(l,c),d=2);o&&o({context:l?.context,operation:d,record:s})})}detach(){}}class wT{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(t=!1,e,i=!0,r){this._multiple=t,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Me,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(i=>this._markSelected(i));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(i=>this._unmarkSelected(i));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);const e=this.selected,i=new Set(t);t.forEach(o=>this._markSelected(o)),e.filter(o=>!i.has(o)).forEach(o=>this._unmarkSelected(o));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();const e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(t){if(this.compareWith){for(let e of this._selection)if(this.compareWith(t,e))return e;return t}return t}}let CT=(()=>{class n{constructor(){this._listeners=[]}notify(e,i){for(let r of this._listeners)r(e,i)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(i=>e!==i)}}ngOnDestroy(){this._listeners=[]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const og=new ae("_ViewRepeater");function oo(n,t){const e="object"==typeof t;return new Promise((i,r)=>{let s,o=!1;n.subscribe({next:a=>{s=a,o=!0},error:r,complete:()=>{o?i(s):e?i(t.defaultValue):r(new cf)}})})}const kT={now:()=>(kT.delegate||Date).now(),delegate:void 0};class TB extends Me{constructor(t=1/0,e=1/0,i=kT){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){const{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();const e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){const o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const 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 ma?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(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new ma;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof ma?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class nae{encodeKey(t){return SB(t)}encodeValue(t){return SB(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const rae=/%(\d[a-f0-9])/gi,oae={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function SB(n){return encodeURIComponent(n).replace(rae,(t,e)=>oae[e]??t)}function Wv(n){return`${n}`}class Il{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new nae,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function iae(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],c=e.get(s)||[];c.push(a),e.set(s,c)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(Wv):[Wv(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const 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){const e=[];return Object.keys(t).forEach(i=>{const 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=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Il({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(Wv(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(Wv(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class sae{constructor(){this.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 DB(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function AB(n){return typeof Blob<"u"&&n instanceof Blob}function IB(n){return typeof FormData<"u"&&n instanceof FormData}class sg{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function aae(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new ma),this.context||(this.context=new sae),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":au.set(h,t.setHeaders[h]),c)),t.setParams&&(l=Object.keys(t.setParams).reduce((u,h)=>u.set(h,t.setParams[h]),l)),new sg(e,i,o,{params:l,headers:c,context:d,reportProgress:a,responseType:r,withCredentials:s})}}var tr=(()=>((tr=tr||{})[tr.Sent=0]="Sent",tr[tr.UploadProgress=1]="UploadProgress",tr[tr.ResponseHeader=2]="ResponseHeader",tr[tr.DownloadProgress=3]="DownloadProgress",tr[tr.Response=4]="Response",tr[tr.User=5]="User",tr))();class TT{constructor(t,e=200,i="OK"){this.headers=t.headers||new ma,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class ST extends TT{constructor(t={}){super(t),this.type=tr.ResponseHeader}clone(t={}){return new ST({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class qv extends TT{constructor(t={}){super(t),this.type=tr.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new qv({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class MB extends TT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function DT(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}}let Ml=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof sg)o=e;else{let c,l;c=r.headers instanceof ma?r.headers:new ma(r.headers),r.params&&(l=r.params instanceof Il?r.params:new Il({fromObject:r.params})),o=new sg(e,i,void 0!==r.body?r.body:null,{headers:c,context:r.context,params:l,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=it(o).pipe(kl(c=>this.handler.handle(c)));if(e instanceof sg||"events"===r.observe)return s;const a=s.pipe(mn(c=>c instanceof qv));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ct(c=>{if(null!==c.body&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return a.pipe(ct(c=>{if(null!==c.body&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return a.pipe(ct(c=>{if(null!==c.body&&"string"!=typeof c.body)throw new Error("Response is not a string.");return c.body}));default:return a.pipe(ct(c=>c.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}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 Il).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,DT(r,i))}post(e,i,r={}){return this.request("POST",e,DT(r,i))}put(e,i,r={}){return this.request("PUT",e,DT(r,i))}}return n.\u0275fac=function(e){return new(e||n)(Q(Gv))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function RB(n,t){return t(n)}function lae(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const uae=new ae("HTTP_INTERCEPTORS"),ag=new ae("HTTP_INTERCEPTOR_FNS");function hae(){let n=null;return(t,e)=>(null===n&&(n=(Et(uae,{optional:!0})??[]).reduceRight(lae,RB)),n(t,e))}let FB=(()=>{class n extends Gv{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ag)));this.chain=i.reduceRight((r,o)=>function dae(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),RB)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(Q(ET),Q(Ra))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const gae=/^\)\]\}',?\n/;let OB=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Dn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,m)=>r.setRequestHeader(f,m.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",m=new ma(r.getAllResponseHeaders()),g=function _ae(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new ST({headers:m,status:r.status,statusText:f,url:g}),s},c=()=>{let{headers:f,status:m,statusText:g,url:p}=a(),b=null;204!==m&&(b=typeof r.response>"u"?r.responseText:r.response),0===m&&(m=b?200:0);let k=m>=200&&m<300;if("json"===e.responseType&&"string"==typeof b){const w=b;b=b.replace(gae,"");try{b=""!==b?JSON.parse(b):null}catch(D){b=w,k&&(k=!1,b={error:D,text:b})}}k?(i.next(new qv({body:b,headers:f,status:m,statusText:g,url:p||void 0})),i.complete()):i.error(new MB({error:b,headers:f,status:m,statusText:g,url:p||void 0}))},l=f=>{const{url:m}=a(),g=new MB({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:m||void 0});i.error(g)};let d=!1;const u=f=>{d||(i.next(a()),d=!0);let m={type:tr.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(m.total=f.total),"text"===e.responseType&&r.responseText&&(m.partialText=r.responseText),i.next(m)},h=f=>{let m={type:tr.UploadProgress,loaded:f.loaded};f.lengthComputable&&(m.total=f.total),i.next(m)};return r.addEventListener("load",c),r.addEventListener("error",l),r.addEventListener("timeout",l),r.addEventListener("abort",l),e.reportProgress&&(r.addEventListener("progress",u),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:tr.Sent}),()=>{r.removeEventListener("error",l),r.removeEventListener("abort",l),r.removeEventListener("load",c),r.removeEventListener("timeout",l),e.reportProgress&&(r.removeEventListener("progress",u),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(Q(BL))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const AT=new ae("XSRF_ENABLED"),NB=new ae("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),LB=new ae("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class BB{}let yae=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=SL(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(tv),Q(NB))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function xae(n,t){const e=n.url.toLowerCase();if(!Et(AT)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=Et(BB).getToken(),r=Et(LB);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var Ui=(()=>((Ui=Ui||{})[Ui.Interceptors=0]="Interceptors",Ui[Ui.LegacyInterceptors=1]="LegacyInterceptors",Ui[Ui.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Ui[Ui.NoXsrfProtection=3]="NoXsrfProtection",Ui[Ui.JsonpSupport=4]="JsonpSupport",Ui[Ui.RequestsMadeViaParent=5]="RequestsMadeViaParent",Ui))();function vf(n,t){return{\u0275kind:n,\u0275providers:t}}function wae(...n){const t=[Ml,OB,FB,{provide:Gv,useExisting:FB},{provide:ET,useExisting:OB},{provide:ag,useValue:xae,multi:!0},{provide:AT,useValue:!0},{provide:BB,useClass:yae}];for(const e of n)t.push(...e.\u0275providers);return function AX(n){return{\u0275providers:n}}(t)}const VB=new ae("LEGACY_INTERCEPTOR_FN");let IT,kae=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[wae(vf(Ui.LegacyInterceptors,[{provide:VB,useFactory:hae},{provide:ag,useExisting:VB,multi:!0}]))]}),n})();try{IT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{IT=!1}let yf,Hn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function yie(n){return n===NL}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!IT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(Q(tv))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const UB=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function HB(){if(yf)return yf;if("object"!=typeof document||!document)return yf=new Set(UB),yf;let n=document.createElement("input");return yf=new Set(UB.filter(t=>(n.setAttribute("type",t),n.type===t))),yf}let cg,Qv,iu,MT;function pa(n){return function Eae(){if(null==cg&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>cg=!0}))}finally{cg=cg||!1}return cg}()?n:!!n.capture}function zB(){if(null==iu){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return iu=!1,iu;if("scrollBehavior"in document.documentElement.style)iu=!0;else{const n=Element.prototype.scrollTo;iu=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return iu}function lg(){if("object"!=typeof document||!document)return 0;if(null==Qv){const 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";const e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),Qv=0,0===n.scrollLeft&&(n.scrollLeft=1,Qv=0===n.scrollLeft?1:2),n.remove()}return Qv}function RT(n){if(function Tae(){if(null==MT){const n=typeof document<"u"?document.head:null;MT=!(!n||!n.createShadowRoot&&!n.attachShadow)}return MT}()){const t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Kv(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){const t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function fs(n){return n.composedPath?n.composedPath()[0]:n.target}function FT(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function so(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}class Vae extends lt{constructor(t,e){super()}schedule(t,e=0){return this}}const Zv={setInterval(n,t,...e){const{delegate:i}=Zv;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){const{delegate:t}=Zv;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};class OT extends Vae{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;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return Zv.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;null!=e&&Zv.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;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){const{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,ea(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}class ug{constructor(t,e=ug.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}ug.now=kT.now;class NT extends ug{constructor(t,e=ug.now){super(t,e),this.actions=[],this._active=!1}flush(t){const{actions:e}=this;if(this._active)return void e.push(t);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}}}const hg=new NT(OT),Uae=hg;function Pc(n,t=hg){return Ci((e,i)=>{let r=null,o=null,s=null;const a=()=>{if(r){r.unsubscribe(),r=null;const l=o;o=null,i.next(l)}};function c(){const l=s+n,d=t.now();if(d{o=l,s=t.now(),r||(r=t.schedule(c,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function LT(n){return mn((t,e)=>n<=e)}function ja(n,t=pl){return n=n??Hae,Ci((e,i)=>{let r,o=!0;e.subscribe(ui(i,s=>{const a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function Hae(n,t){return n===t}function St(n){return Ci((t,e)=>{Kr(n).subscribe(ui(e,()=>e.complete(),To)),!e.closed&&t.subscribe(e)})}function Ke(n){return null!=n&&"false"!=`${n}`}function gr(n,t=0){return $B(n)?Number(n):t}function $B(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function fg(n){return Array.isArray(n)?n:[n]}function nr(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Mi(n){return n instanceof Ne?n.nativeElement:n}let GB=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),jae=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){const i=Mi(e);return new Dn(r=>{const s=this._observeElement(i).subscribe(r);return()=>{s.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const i=new Me,r=this._mutationObserverFactory.create(o=>i.next(o));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){const{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return n.\u0275fac=function(e){return new(e||n)(Q(GB))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),BT=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=gr(e),this._subscribe()}constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new De,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(Pc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(jae),y(Ne),y(Ye))},n.\u0275dir=X({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),Jv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[GB]}),n})();const WB=new Set;let wf,$ae=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Wae}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function Gae(n){if(!WB.has(n))try{wf||(wf=document.createElement("style"),wf.setAttribute("type","text/css"),document.head.appendChild(wf)),wf.sheet&&(wf.sheet.insertRule(`@media ${n} {body{ }}`,0),WB.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Wae(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let VT=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new Me}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return qB(fg(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let o=Cl(qB(fg(e)).map(s=>this._registerQuery(s).observable));return o=jp(o.pipe(An(1)),o.pipe(LT(1),Pc(0))),o.pipe(ct(s=>{const a={matches:!1,breakpoints:{}};return s.forEach(({matches:c,query:l})=>{a.matches=a.matches||c,a.breakpoints[l]=c}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const i=this._mediaMatcher.matchMedia(e),o={observable:new Dn(s=>{const a=c=>this._zone.run(()=>s.next(c));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(er(i),ct(({matches:s})=>({query:e,matches:s})),St(this._destroySubject)),mql:i};return this._queries.set(e,o),o}}return n.\u0275fac=function(e){return new(e||n)(Q($ae),Q(Ye))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function qB(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function ey(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}const KB="cdk-describedby-message",ty="cdk-describedby-host";let UT=0,XB=(()=>{class n{constructor(e,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+UT++,this._document=e,this._id=Et(rf)+"-"+UT++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;const o=HT(i,r);"string"!=typeof i?(YB(i,this._id),this._messageRegistry.set(o,{messageElement:i,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(i,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,i,r){if(!i||!this._isElementNode(e))return;const o=HT(i,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),"string"==typeof i){const s=this._messageRegistry.get(o);s&&0===s.referenceCount&&this._deleteMessageElement(o)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const e=this._document.querySelectorAll(`[${ty}="${this._id}"]`);for(let i=0;i0!=r.indexOf(KB));e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){const r=this._messageRegistry.get(i);(function Qae(n,t,e){const i=ey(n,t);i.some(r=>r.trim()==e.trim())||(i.push(e.trim()),n.setAttribute(t,i.join(" ")))})(e,"aria-describedby",r.messageElement.id),e.setAttribute(ty,this._id),r.referenceCount++}_removeMessageReference(e,i){const r=this._messageRegistry.get(i);r.referenceCount--,function Kae(n,t,e){const r=ey(n,t).filter(o=>o!=e.trim());r.length?n.setAttribute(t,r.join(" ")):n.removeAttribute(t)}(e,"aria-describedby",r.messageElement.id),e.removeAttribute(ty)}_isElementDescribedByMessage(e,i){const r=ey(e,"aria-describedby"),o=this._messageRegistry.get(i),s=o&&o.messageElement.id;return!!s&&-1!=r.indexOf(s)}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&"object"==typeof i)return!0;const r=null==i?"":`${i}`.trim(),o=e.getAttribute("aria-label");return!(!r||o&&o.trim()===r)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Hn))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function HT(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function YB(n,t){n.id||(n.id=`${KB}-${t}-${UT++}`)}class ZB{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Me,this._typeaheadSubscription=lt.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new Me,this.change=new Me,t instanceof yl&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(gi(e=>this._pressedLetters.push(e)),Pc(t),mn(()=>this._pressedLetters.length>0),ct(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof yl?this._items.toArray():this._items}}class JB extends ZB{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class zT extends ZB{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let mg=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function Yae(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;const i=function Xae(n){try{return n.frameElement}catch{return null}}(function oce(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(e));if(i&&(-1===t5(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=t5(e);return e.hasAttribute("contenteditable")?-1!==o:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function ice(n){let t=n.nodeName.toLowerCase(),e="input"===t&&n.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==o:"video"===r?-1!==o&&(null!==o||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function rce(n){return!function Jae(n){return function tce(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function Zae(n){let t=n.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(n)||function ece(n){return function nce(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||e5(n))}(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function e5(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function t5(n){if(!e5(n))return null;const t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class sce{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}constructor(t,e,i,r,o=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){const e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){const e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){const i=this._getFirstTabbableElement(e);return i?.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){const e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){const e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;const e=t.children;for(let i=0;i=0;i--){const r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(An(1)).subscribe(t)}}let ny=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new sce(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(Q(mg),Q(Ye),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function iy(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function ry(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}const ace=new ae("cdk-input-modality-detector-options"),cce={ignoreKeys:[18,17,224,91,16]},Cf=pa({passive:!0,capture:!0});let lce=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new Ti(null),this._lastTouchMs=0,this._onKeydown=s=>{this._options?.ignoreKeys?.some(a=>a===s.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=fs(s))},this._onMousedown=s=>{Date.now()-this._lastTouchMs<650||(this._modality.next(iy(s)?"keyboard":"mouse"),this._mostRecentTarget=fs(s))},this._onTouchstart=s=>{ry(s)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=fs(s))},this._options={...cce,...o},this.modalityDetected=this._modality.pipe(LT(1)),this.modalityChanged=this.modalityDetected.pipe(ja()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Cf),r.addEventListener("mousedown",this._onMousedown,Cf),r.addEventListener("touchstart",this._onTouchstart,Cf)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Cf),document.removeEventListener("mousedown",this._onMousedown,Cf),document.removeEventListener("touchstart",this._onTouchstart,Cf))}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(Ye),Q(gt),Q(ace,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const dce=new ae("liveAnnouncerElement",{providedIn:"root",factory:function uce(){return null}}),hce=new ae("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let fce=0,jT=(()=>{class n{constructor(e,i,r,o){this._ngZone=i,this._defaultOptions=o,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){const r=this._defaultOptions;let o,s;return 1===i.length&&"number"==typeof i[0]?s=i[0]:[o,s]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),null==s&&r&&(s=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof s&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class n{constructor(e,i,r,o,s){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Me,this._rootNodeFocusAndBlurListener=a=>{for(let l=fs(a);l;l=l.parentElement)"focus"===a.type?this._onFocus(a,l):this._onBlur(a,l)},this._document=o,this._detectionMode=s?.detectionMode||0}monitor(e,i=!1){const r=Mi(e);if(!this._platform.isBrowser||1!==r.nodeType)return it(null);const o=RT(r)||this._getDocument(),s=this._elementInfo.get(r);if(s)return i&&(s.checkChildren=!0),s.subject;const a={checkChildren:i,subject:new Me,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const i=Mi(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){const o=Mi(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([a,c])=>this._originChanged(a,i,c)):(this._setOrigin(i),"function"==typeof o.focus&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){const r=this._elementInfo.get(i),o=fs(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,oy),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,oy)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(St(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){const i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,oy),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,oy),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){const i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;const o=e.labels;if(o)for(let s=0;s{class n{constructor(e,i){this._elementRef=e,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new De}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){const e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(i=>{this._focusOrigin=i,this.cdkFocusChange.emit(i)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ms))},n.\u0275dir=X({type:n,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]}),n})();const r5="cdk-high-contrast-black-on-white",o5="cdk-high-contrast-white-on-black",$T="cdk-high-contrast-active";let s5=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=Et(VT).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove($T,r5,o5),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?e.add($T,r5):2===i&&e.add($T,o5)}}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),GT=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(Q(s5))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Jv]}),n})();const gce=new ae("cdk-dir-doc",{providedIn:"root",factory:function _ce(){return Et(gt)}}),bce=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Hi=(()=>{class n{constructor(e){this.value="ltr",this.change=new De,e&&(this.value=function vce(n){const t=n?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?bce.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(Q(gce,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),pg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const yce=["text"];function xce(n,t){if(1&n&&_e(0,"mat-pseudo-checkbox",6),2&n){const e=O();E("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function wce(n,t){1&n&&_e(0,"mat-pseudo-checkbox",7),2&n&&E("disabled",O().disabled)}function Cce(n,t){if(1&n&&(_(0,"span",8),C(1),v()),2&n){const e=O();x(1),Qe("(",e.group.label,")")}}const kce=[[["mat-icon"]],"*"],Ece=["mat-icon","*"];let Tce=(()=>{class n{}return n.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",n.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",n.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",n.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",n})(),Sce=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})();const Ace=new ae("mat-sanity-checks",{providedIn:"root",factory:function Dce(){return!0}});let Ft=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!FT()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(Q(s5),Q(Ace,8),Q(gt))},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[pg,pg]}),n})();function Oc(n){return class extends n{get disabled(){return this._disabled}set disabled(t){this._disabled=Ke(t)}constructor(...t){super(...t),this._disabled=!1}}}function Pl(n,t){return class extends n{get color(){return this._color}set color(e){const i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}constructor(...e){super(...e),this.defaultColor=t,this.color=t}}}function Ol(n){return class extends n{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Ke(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function gg(n,t=0){return class extends n{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?gr(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function l5(n){return class extends n{updateErrorState(){const t=this.errorState,o=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);o!==t&&(this.errorState=o,this.stateChanges.next())}constructor(...t){super(...t),this.errorState=!1}}}function Ice(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Dn(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}let d5=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class Rce{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const u5=pa({passive:!0,capture:!0});class Fce{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=fs(t);e&&this._events.get(t.type)?.forEach((i,r)=>{(r===e||r.contains(e))&&i.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,i,r){const o=this._events.get(e);if(o){const s=o.get(i);s?s.add(r):o.set(i,new Set([r]))}else this._events.set(e,new Map([[i,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,u5)})}removeHandler(t,e,i){const r=this._events.get(t);if(!r)return;const o=r.get(e);o&&(o.delete(i),0===o.size&&r.delete(e),0===r.size&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,u5)))}}const h5={enterDuration:225,exitDuration:150},f5=pa({passive:!0,capture:!0}),m5=["mousedown","touchstart"],p5=["mouseup","mouseleave","touchend","touchcancel"];class kf{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Mi(i))}fadeInRipple(t,e,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o={...h5,...i.animation};i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const s=i.radius||function Oce(n,t,e){const i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),a=t-r.left,c=e-r.top,l=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-s+"px",d.style.top=c-s+"px",d.style.height=2*s+"px",d.style.width=2*s+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(d);const u=window.getComputedStyle(d),f=u.transitionDuration,m="none"===u.transitionProperty||"0s"===f||"0s, 0s"===f||0===r.width&&0===r.height,g=new Rce(this,d,i,m);d.style.transform="scale3d(1, 1, 1)",g.state=0,i.persistent||(this._mostRecentTransientRipple=g);let p=null;return!m&&(l||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const b=()=>this._finishRippleTransition(g),k=()=>this._destroyRipple(g);d.addEventListener("transitionend",b),d.addEventListener("transitioncancel",k),p={onTransitionEnd:b,onTransitionCancel:k}}),this._activeRipples.set(g,p),(m||!l)&&this._finishRippleTransition(g),g}fadeOutRipple(t){if(2===t.state||3===t.state)return;const e=t.element,i={...h5,...t.config.animation};e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){const e=Mi(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,m5.forEach(i=>{kf._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{p5.forEach(e=>{this._triggerElement.addEventListener(e,this,f5)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){0===t.state?this._startFadeOutTransition(t):2===t.state&&this._destroyRipple(t)}_startFadeOutTransition(t){const e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=1,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){const e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=3,null!==e&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel)),t.element.remove()}_onMousedown(t){const e=iy(t),i=this._lastTouchStartEvent&&Date.now(){!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const t=this._triggerElement;t&&(m5.forEach(e=>kf._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&p5.forEach(e=>t.removeEventListener(e,this,f5)))}}kf._eventManager=new Fce;const WT=new ae("mat-ripple-global-options");let Bs=(()=>{class n{get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}constructor(e,i,r,o,s){this._elementRef=e,this._animationMode=s,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new kf(this,i,e,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...e})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Ye),y(Hn),y(WT,8),y(Jn,8))},n.\u0275dir=X({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),Nl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})(),Nce=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return n.\u0275fac=function(e){return new(e||n)(y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&ot("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal","minimal"===i.appearance)("mat-pseudo-checkbox-full","full"===i.appearance)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0}),n})(),g5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft]}),n})();const qT=new ae("MAT_OPTION_PARENT_COMPONENT"),QT=new ae("MatOptgroup");let Lce=0;class _5{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let Bce=(()=>{class n{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=Ke(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(e,i,r,o){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+Lce++,this.onSelectionChange=new De,this._stateChanges=new Me}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!so(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new _5(this,e))}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(yce,7),2&e){let r;Ae(r=Ie())&&(i._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),Ll=(()=>{class n extends Bce{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(qT,8),y(QT,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,i){1&e&&z("click",function(){return i._selectViaInteraction()})("keydown",function(o){return i._handleKeydown(o)}),2&e&&(Ba("id",i.id),vt("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),ot("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},exportAs:["matOption"],features:[ye],ngContentSelectors:Ece,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(Rn(kce),A(0,xce,1,2,"mat-pseudo-checkbox",0),dt(1),_(2,"span",1,2),dt(4,1),v(),A(5,wce,1,1,"mat-pseudo-checkbox",3),A(6,Cce,2,1,"span",4),_e(7,"div",5)),2&e&&(E("ngIf",i.multiple),x(5),E("ngIf",!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator),x(1),E("ngIf",i.group&&i.group._inert),x(1),E("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Bs,ri,Nce],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})();function b5(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),o=0;for(let s=0;se+i?Math.max(0,n-i+t):e}let sy=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Nl,Br,Ft,g5]}),n})();const y5=["mat-button",""],x5=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],w5=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],C5=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",Uce=["mat-icon-button",""],Hce=["*"],zce=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],jce=Pl(Oc(Ol(class{constructor(n){this._elementRef=n}})));let KT=(()=>{class n extends jce{constructor(e,i,r,o){super(e),this._platform=i,this._ngZone=r,this._animationMode=o,this._focusMonitor=Et(ms),this._isFab=!1;const s=e.nativeElement.classList;for(const a of zce)this._hasHostAttributes(a.selector)&&a.mdcClasses.forEach(c=>{s.add(c)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...e){return e.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(Bs,5),2&e){let r;Ae(r=Ie())&&(i.ripple=r.first)}},features:[ye]}),n})(),Gce=(()=>{class n extends KT{constructor(e,i,r,o){super(e,i,r,o),this._haltDisabledEvents=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,features:[ye]}),n})(),Fo=(()=>{class n extends KT{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Ye),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(vt("disabled",i.disabled||null),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ye],attrs:y5,ngContentSelectors:w5,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Rn(x5),_e(0,"span",0),dt(1),_(2,"span",1),dt(3,1),v(),dt(4,2),_e(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ot("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),x(6),E("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Bs],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n 100% + 4px\n );width:calc(\n 100% + 4px\n );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),Wce=(()=>{class n extends Gce{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Ye),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:9,hostBindings:function(e,i){2&e&&(vt("disabled",i.disabled||null)("tabindex",i.disabled?-1:i.tabIndex)("aria-disabled",i.disabled.toString()),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[ye],attrs:y5,ngContentSelectors:w5,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Rn(x5),_e(0,"span",0),dt(1),_(2,"span",1),dt(3,1),v(),dt(4,2),_e(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(ot("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),x(6),E("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Bs],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n 100% + 4px\n );width:calc(\n 100% + 4px\n );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',C5],encapsulation:2,changeDetection:0}),n})(),Vs=(()=>{class n extends KT{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Ye),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(vt("disabled",i.disabled||null),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ye],attrs:Uce,ngContentSelectors:Hce,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Rn(),_e(0,"span",0),dt(1),_e(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(x(3),E("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Bs],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',C5],encapsulation:2,changeDetection:0}),n})(),k5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Nl,Ft]}),n})();class E5{}class Qce{}const Nc="*";function $n(n,t){return{type:7,name:n,definitions:t,options:{}}}function Gt(n,t=null){return{type:4,styles:t,timings:n}}function XT(n,t=null){return{type:3,steps:n,options:t}}function T5(n,t=null){return{type:2,steps:n,options:t}}function ze(n){return{type:6,styles:n,offset:null}}function pn(n,t,e){return{type:0,name:n,styles:t,options:e}}function Ef(n){return{type:5,steps:n}}function Qt(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function ay(n=null){return{type:9,options:n}}function cy(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function S5(n){Promise.resolve().then(n)}class bg{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){S5(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class D5{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?S5(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const YT="!";class ZT{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class Tf extends ZT{constructor(t,e,i,r,o){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=o}}class Lc extends ZT{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class Kce extends ZT{constructor(t){super(),this.element=t instanceof Ne?t.nativeElement:t}}class ly{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Tf?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Lc?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof Kce?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Xce extends ly{constructor(t,e,i,r,o){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=s=>{const a=s.element,c=this._document.createComment("dom-portal");a.parentNode.insertBefore(c,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}attachComponentPortal(t){const i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let r;return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector,t.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||Ni.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let Yce=(()=>{class n extends Lc{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(ii))},n.\u0275dir=X({type:n,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[ye]}),n})(),Bc=(()=>{class n extends ly{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new De,this.attachDomPortal=o=>{const s=o.element,a=this._document.createComment("dom-portal");o.setAttachedHost(this),s.parentNode.insertBefore(a,s),this._getRootNode().appendChild(s),this._attachedPortal=o,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(s,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);const i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,o=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),s=i.createComponent(o,i.length,e.injector||i.injector,e.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(e){e.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return n.\u0275fac=function(e){return new(e||n)(y(bl),y(ii),y(gt))},n.\u0275dir=X({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ye]}),n})(),ru=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const Zce=["addListener","removeListener"],Jce=["addEventListener","removeEventListener"],ele=["on","off"];function ga(n,t,e,i){if(sn(e)&&(i=e,e=void 0),i)return ga(n,t,e).pipe(HE(i));const[r,o]=function ile(n){return sn(n.addEventListener)&&sn(n.removeEventListener)}(n)?Jce.map(s=>a=>n[s](t,a,e)):function tle(n){return sn(n.addListener)&&sn(n.removeListener)}(n)?Zce.map(A5(n,t)):function nle(n){return sn(n.on)&&sn(n.off)}(n)?ele.map(A5(n,t)):[];if(!r&&$w(n))return hr(s=>ga(s,t,e))(Kr(n));if(!r)throw new TypeError("Invalid event target");return new Dn(s=>{const a=(...c)=>s.next(1o(a)})}function A5(n,t){return e=>i=>n[e](t,i)}const vg={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=vg;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=t(o=>{e=void 0,n(o)});return new lt(()=>e?.(r))},requestAnimationFrame(...n){const{delegate:t}=vg;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:t}=vg;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},I5=new class ole extends NT{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let 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}}}(class rle extends OT{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=vg.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);const{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(vg.cancelAnimationFrame(e),t._scheduled=void 0)}});let JT,sle=1;const dy={};function M5(n){return n in dy&&(delete dy[n],!0)}const ale={setImmediate(n){const t=sle++;return dy[t]=!0,JT||(JT=Promise.resolve()),JT.then(()=>M5(t)&&n()),t},clearImmediate(n){M5(n)}},{setImmediate:cle,clearImmediate:lle}=ale,uy={setImmediate(...n){const{delegate:t}=uy;return(t?.setImmediate||cle)(...n)},clearImmediate(n){const{delegate:t}=uy;return(t?.clearImmediate||lle)(n)},delegate:void 0},eS=new class ule extends NT{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let 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}}}(class dle extends OT{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=uy.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);const{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(uy.clearImmediate(e),t._scheduled=void 0)}});function yg(n=0,t,e=Uae){let i=-1;return null!=t&&(NR(t)?e=t:i=t),new Dn(r=>{let o=function fle(n){return n instanceof Date&&!isNaN(n)}(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=hg){return function hle(n){return Ci((t,e)=>{let i=!1,r=null,o=null,s=!1;const a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;const l=r;r=null,e.next(l)}s&&e.complete()},c=()=>{o=null,s&&e.complete()};t.subscribe(ui(e,l=>{i=!0,r=l,o||Kr(n(l)).subscribe(o=ui(e,a,c))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>yg(n,t))}const mle=["contentWrapper"],ple=["*"],gle=new ae("VIRTUAL_SCROLL_STRATEGY");let ou=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new Me,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new Dn(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(tS(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):it()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){const r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(mn(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Mi(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>ga(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(Q(Ye),Q(Hn),Q(gt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),xg=(()=>{class n{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new Me,this._elementScrolled=new Dn(s=>this.ngZone.runOutsideAngular(()=>ga(this.elementRef.nativeElement,"scroll").pipe(St(this._destroyed)).subscribe(s)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=lg()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==lg()?e.left=e.right:1==lg()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const i=this.elementRef.nativeElement;zB()?i.scrollTo(e):(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left))}measureScrollOffset(e){const i="left",r="right",o=this.elementRef.nativeElement;if("top"==e)return o.scrollTop;if("bottom"==e)return o.scrollHeight-o.clientHeight-o.scrollTop;const s=this.dir&&"rtl"==this.dir.value;return"start"==e?e=s?r:i:"end"==e&&(e=s?i:r),s&&2==lg()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&1==lg()?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ou),y(Ye),y(Hi,8))},n.\u0275dir=X({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),n})(),_a=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new Me,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const 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};const e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(tS(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(Ye),Q(gt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const R5=new ae("VIRTUAL_SCROLLABLE");let vle=(()=>{class n extends xg{constructor(e,i,r,o){super(e,i,r,o)}measureViewportSize(e){const i=this.elementRef.nativeElement;return"horizontal"===e?i.clientWidth:i.clientHeight}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ou),y(Ye),y(Hi,8))},n.\u0275dir=X({type:n,features:[ye]}),n})();const xle=typeof requestAnimationFrame<"u"?I5:eS;let wle=(()=>{class n extends vle{get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=Ke(e)}constructor(e,i,r,o,s,a,c,l){super(e,a,r,s),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this.scrollable=l,this._platform=Et(Hn),this._detachedSubject=new Me,this._renderedRangeSubject=new Me,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Dn(d=>this._scrollStrategy.scrolledIndexChange.subscribe(u=>Promise.resolve().then(()=>this.ngZone.run(()=>d.next(u))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=lt.EMPTY,this._viewportChanges=c.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}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(er(null),tS(0,xle)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(St(this._detachedSubject)).subscribe(i=>{const 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){(function yle(n,t){return n.start==t.start&&n.end==t.end})(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&&"to-start"===i?0:e;const o="horizontal"==this.orientation,s=o?"X":"Y";let c=`translate${s}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i;const r="left",o="right",s="rtl"==this.dir?.value;i="start"==e?s?o:r:"end"==e?s?r:o:e||("horizontal"===this.orientation?"left":"top");const a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?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),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(Ye),y(gle,8),y(Hi,8),y(ou),y(_a),y(R5,8))},n.\u0275cmp=Ve({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&pt(mle,7),2&e){let r;Ae(r=Ie())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&ot("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[nt([{provide:xg,useFactory:(t,e)=>t||e,deps:[[new Ia,new gb(R5)],n]}]),ye,Bk],ngContentSelectors:ple,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(Rn(),_(0,"div",0,1),dt(2),v(),_e(3,"div",2)),2&e&&(x(3),Ai("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.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}"],encapsulation:2,changeDetection:0}),n})(),Vc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})(),nS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[pg,Vc,wle,pg,Vc]}),n})();const F5=zB();class Cle{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=nr(-this._previousScrollPosition.left),t.style.top=nr(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,i=t.style,r=this._document.body.style,o=i.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),F5&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),F5&&(i.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}class kle{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0).pipe(mn(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class P5{enable(){}disable(){}attach(){}}function iS(n,t){return t.some(e=>n.bottome.bottom||n.righte.right)}function O5(n,t){return t.some(e=>n.tope.bottom||n.lefte.right)}class Ele{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();iS(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let Tle=(()=>{class n{constructor(e,i,r,o){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new P5,this.close=s=>new kle(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new Cle(this._viewportRuler,this._document),this.reposition=s=>new Ele(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}}return n.\u0275fac=function(e){return new(e||n)(Q(ou),Q(_a),Q(Ye),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class Sf{constructor(t){if(this.scrollStrategy=new P5,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class Sle{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let N5=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){const i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Dle=(()=>{class n extends N5{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{const o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){const a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Ye,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ale=(()=>{class n extends N5{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=fs(o)},this._clickListener=o=>{const s=fs(o),a="click"===o.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;const c=this._attachedOverlays.slice();for(let l=c.length-1;l>-1;l--){const d=c[l];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(s)||d.overlayElement.contains(a))break;const u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(e){if(super.add(e),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Hn),Q(Ye,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),hy=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e="cdk-overlay-container";if(this._platform.isBrowser||FT()){const r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;othis._backdropClick.next(u),this._backdropTransitionendHandler=u=>{this._disposeBackdrop(u.target)},this._keydownEvents=new Me,this._outsidePointerEvents=new Me,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(An(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof e?.onDestroy&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config={...this._config,...t},this._updateElementSize()}setDirection(t){this._config={...this._config,direction:t},this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=nr(this._config.width),t.height=nr(this._config.height),t.minWidth=nr(this._config.minWidth),t.minHeight=nr(this._config.minHeight),t.maxWidth=nr(this._config.maxWidth),t.maxHeight=nr(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){const t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const t=this._backdropElement;if(t){if(this._animationsDisabled)return void this._disposeBackdrop(t);t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){const r=fg(e||[]).filter(o=>!!o);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(St(oi(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const L5="cdk-overlay-connected-position-bounding-box",Ile=/([A-Za-z%]+)$/;class Mle{get positions(){return this._preferredPositions}constructor(t,e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Me,this._resizeSubscription=lt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(L5),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[];let s;for(let a of this._preferredPositions){let c=this._getOriginPoint(t,r,a),l=this._getOverlayPoint(c,e,a),d=this._getOverlayFit(l,e,i,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,c);this._canFitWithFlexibleDimensions(d,l,i)?o.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)}):(!s||s.overlayFit.visibleAreac&&(c=d,a=l)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(s.position,s.originPoint);this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&su(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(L5),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r,o;if("center"==i.originX)r=t.left+t.width/2;else{const s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==i.originX?s:a}return e.left<0&&(r-=e.left),o="center"==i.originY?t.top+t.height/2:"top"==i.originY?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,i){let r,o;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,o="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,i,r){const o=V5(e);let{x:s,y:a}=t,c=this._getOffset(r,"x"),l=this._getOffset(r,"y");c&&(s+=c),l&&(a+=l);let h=0-a,f=a+o.height-i.height,m=this._subtractOverflows(o.width,0-s,s+o.width-i.width),g=this._subtractOverflows(o.height,h,f),p=m*g;return{visibleArea:p,isCompletelyWithinViewport:o.width*o.height===p,fitsInViewportVertically:g===o.height,fitsInViewportHorizontally:m==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const r=i.bottom-e.y,o=i.right-e.x,s=B5(this._overlayRef.getConfig().minHeight),a=B5(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=s&&s<=r)&&(t.fitsInViewportHorizontally||null!=a&&a<=o)}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const r=V5(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=Math.max(t.y+r.height-o.height,0),c=Math.max(o.top-i.top-t.y,0),l=Math.max(o.left-i.left-t.x,0);let d=0,u=0;return d=r.width<=o.width?l||-s:t.xm&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-m/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)h=i.width-t.x+this._viewportMargin,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)u=t.x,d=i.right-t.x;else{const f=Math.min(i.right-t.x+i.left,t.x),m=this._lastBoundingBoxSize.width;d=2*f,u=t.x-f,d>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-m/2)}return{top:s,left:u,bottom:a,right:h,width:d,height:o}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=nr(i.height),r.top=nr(i.top),r.bottom=nr(i.bottom),r.width=nr(i.width),r.left=nr(i.left),r.right=nr(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",o&&(r.maxHeight=nr(o)),s&&(r.maxWidth=nr(s))}this._lastBoundingBoxSize=i,su(this._boundingBox.style,r)}_resetBoundingBoxStyles(){su(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){su(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){const d=this._viewportRuler.getViewportScrollPosition();su(i,this._getExactOverlayY(e,t,d)),su(i,this._getExactOverlayX(e,t,d))}else i.position="static";let a="",c=this._getOffset(e,"x"),l=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),i.transform=a.trim(),s.maxHeight&&(r?i.maxHeight=nr(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(r?i.maxWidth=nr(s.maxWidth):o&&(i.maxWidth="")),su(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(o.y+this._overlayRect.height)+"px":r.top=nr(o.y),r}_getExactOverlayX(t,e,i){let s,r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),s=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===s?r.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":r.left=nr(o.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:O5(t,i),isOriginOutsideView:iS(t,i),isOverlayClipped:O5(e,i),isOverlayOutsideView:iS(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&fg(t).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof Ne)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function su(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function B5(n){if("number"!=typeof n&&null!=n){const[t,e]=n.split(Ile);return e&&"px"!==e?null:parseFloat(t)}return n||null}function V5(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const U5="cdk-global-overlay-wrapper";class Rle{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(U5),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=i,c=!("100%"!==r&&"100vw"!==r||s&&"100%"!==s&&"100vw"!==s),l=!("100%"!==o&&"100vh"!==o||a&&"100%"!==a&&"100vh"!==a),d=this._xPosition,u=this._xOffset,h="rtl"===this._overlayRef.getConfig().direction;let f="",m="",g="";c?g="flex-start":"center"===d?(g="center",h?m=u:f=u):h?"left"===d||"end"===d?(g="flex-end",f=u):("right"===d||"start"===d)&&(g="flex-start",m=u):"left"===d||"start"===d?(g="flex-start",f=u):("right"===d||"end"===d)&&(g="flex-end",m=u),t.position=this._cssPosition,t.marginLeft=c?"0":f,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=c?"0":m,e.justifyContent=g,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(U5),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let Fle=(()=>{class n{constructor(e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o}global(){return new Rle}flexibleConnectedTo(e){return new Mle(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(e){return new(e||n)(Q(_a),Q(gt),Q(Hn),Q(hy))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ple=0,ao=(()=>{class n{constructor(e,i,r,o,s,a,c,l,d,u,h,f){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=c,this._document=l,this._directionality=d,this._location=u,this._outsideClickDispatcher=h,this._animationsModuleType=f}create(e){const i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),s=new Sf(e);return s.direction=s.direction||this._directionality.value,new wg(o,i,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){const i=this._document.createElement("div");return i.id="cdk-overlay-"+Ple++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){const e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(sf)),new Xce(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(Q(Tle),Q(hy),Q(bl),Q(Fle),Q(Dle),Q(Ni),Q(Ye),Q(gt),Q(Hi),Q(Np),Q(Ale),Q(Jn,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ole=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],H5=new ae("cdk-connected-overlay-scroll-strategy");let rS=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(y(Ne))},n.\u0275dir=X({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),n})(),z5=(()=>{class n{get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Ke(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=Ke(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=Ke(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=Ke(e)}get push(){return this._push}set push(e){this._push=Ke(e)}constructor(e,i,r,o,s){this._overlay=e,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=lt.EMPTY,this._attachSubscription=lt.EMPTY,this._detachSubscription=lt.EMPTY,this._positionSubscription=lt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new De,this.positionChange=new De,this.attach=new De,this.detach=new De,this.overlayKeydown=new De,this.overlayOutsideClick=new De,this._templatePortal=new Lc(i,r),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Ole);const e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!so(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new Sf({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof rS?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(GE(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(ao),y(Un),y(ii),y(H5),y(Hi,8))},n.\u0275dir=X({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[jn]}),n})();const Lle={provide:H5,deps:[ao],useFactory:function Nle(n){return()=>n.scrollStrategies.reposition()}};let au=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[ao,Lle],imports:[pg,ru,nS,nS]}),n})();function Ble(n,t){if(1&n){const e=Le();_(0,"div",2)(1,"button",3),z("click",function(){return he(e),fe(O().action())}),C(2),v()()}if(2&n){const e=O();x(2),Qe(" ",e.data.action," ")}}const Vle=["label"];function Ule(n,t){}const Hle=Math.pow(2,31)-1;class fy{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Me,this._afterOpened=new Me,this._onAction=new Me,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,Hle))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const oS=new ae("MatSnackBarData");class my{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let zle=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),n})(),jle=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),n})(),$le=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),n})(),Gle=(()=>{class n{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(e){return new(e||n)(y(fy),y(oS))},n.\u0275cmp=Ve({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions","",4,"ngIf"],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(e,i){1&e&&(_(0,"div",0),C(1),v(),A(2,Ble,3,1,"div",1)),2&e&&(x(1),Qe(" ",i.data.message,"\n"),x(1),E("ngIf",i.hasAction))},dependencies:[ri,Fo,zle,jle,$le],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),n})();const Wle={snackBarState:$n("state",[pn("void, hidden",ze({transform:"scale(0.8)",opacity:0})),pn("visible",ze({transform:"scale(1)",opacity:1})),Qt("* => visible",Gt("150ms cubic-bezier(0, 0, 0.2, 1)")),Qt("* => void, * => hidden",Gt("75ms cubic-bezier(0.4, 0.0, 1, 1)",ze({opacity:0})))])};let qle=0,Qle=(()=>{class n extends ly{constructor(e,i,r,o,s){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=o,this.snackBarConfig=s,this._document=Et(gt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Me,this._onExit=new Me,this._onEnter=new Me,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+qle++,this.attachDomPortal=a=>{this._assertNotAttached();const c=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),c},this._live="assertive"!==s.politeness||s.announcementMessage?"off"===s.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){const{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(An(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i)),this._exposeToModals()}_exposeToModals(){const e=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const i=e.getAttribute("aria-owns");if(i){const r=i.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(e){return new(e||n)(y(Ye),y(Ne),y(an),y(Hn),y(my))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(Bc,7),2&e){let r;Ae(r=Ie())&&(i._portalOutlet=r.first)}},features:[ye]}),n})(),Kle=(()=>{class n extends Qle{_afterPortalAttached(){super._afterPortalAttached();const e=this._label.nativeElement,i="mdc-snackbar__label";e.classList.toggle(i,!e.querySelector(`.${i}`))}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,i){if(1&e&&pt(Vle,7),2&e){let r;Ae(r=Ie())&&(i._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,i){1&e&&Ub("@state.done",function(o){return i.onAnimationEnd(o)}),2&e&&$b("@state",i._animationState)},features:[ye],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1,2)(3,"div",3),A(4,Ule,0,0,"ng-template",4),v(),_e(5,"div"),v()()),2&e&&(x(5),vt("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[Bc],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss svg,.mat-mdc-snack-bar-container .mdc-snackbar__dismiss img{width:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px));height:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size, inherit);font-family:var(--mdc-snackbar-supporting-text-font, inherit);font-weight:var(--mdc-snackbar-supporting-text-weight, inherit);line-height:var(--mdc-snackbar-supporting-text-line-height, inherit)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-mdc-snack-bar-button-color, transparent);--mat-mdc-button-persistent-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{background-color:currentColor;opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[Wle.snackBarState]}}),n})(),j5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[au,ru,Br,k5,Ft,Ft]}),n})();const $5=new ae("mat-snack-bar-default-options",{providedIn:"root",factory:function Xle(){return new my}});let Yle=(()=>{class n{get _openedSnackBarRef(){const e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(e,i,r,o,s,a){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=o,this._parentSnackBar=s,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){const o={...this._defaultConfig,...r};return o.data={message:e,action:i},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){const o=Ni.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:my,useValue:i}]}),s=new Tf(this.snackBarContainerComponent,i.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){const r={...new my,...this._defaultConfig,...i},o=this._createOverlay(r),s=this._attachSnackBarContainer(o,r),a=new fy(s,o);if(e instanceof Un){const c=new Lc(e,null,{$implicit:r.data,snackBarRef:a});a.instance=s.attachTemplatePortal(c)}else{const c=this._createInjector(r,a),l=new Tf(e,void 0,c),d=s.attachComponentPortal(l);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(St(o.detachments())).subscribe(c=>{o.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),r.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){const i=new Sf;i.direction=e.direction;let r=this._overlay.position().global();const o="rtl"===e.direction,s="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!o||"end"===e.horizontalPosition&&o,a=!s&&"center"!==e.horizontalPosition;return s?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return Ni.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:fy,useValue:i},{provide:oS,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(jT),Q(Ni),Q(VT),Q(n,12),Q($5))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Df=(()=>{class n extends Yle{constructor(e,i,r,o,s,a){super(e,i,r,o,s,a),this.simpleSnackBarComponent=Gle,this.snackBarContainerComponent=Kle,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(jT),Q(Ni),Q(VT),Q(n,12),Q($5))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:j5}),n})(),Si=(()=>{class n{constructor(e,i){this.sbRef=e,this.data=i}static#e=this.\u0275fac=function(i){return new(i||n)(y(fy),y(oS))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["snack-alert"]],decls:2,vars:1,consts:[[1,"example-alert"]],template:function(i,r){1&i&&(_(0,"span",0),C(1),v()),2&i&&(x(1),Je(r.data))},styles:[".example-alert[_ngcontent-%COMP%]{color:#fff}"]})}return n})(),Ur=(()=>{class n{constructor(e,i){this.http=e,this._snackBar=i,this.snowstormFhirBase="https://snowstorm.ihtsdotools.org/fhir",this.defaultFhirUrlParam="http://snomed.info/sct",this.fhirUrlParam=this.defaultFhirUrlParam,this.lang="en",this.snowstormFhirBaseSubject=new Ti(this.snowstormFhirBase),this.fhirUrlParamSubject=new Ti(this.fhirUrlParam),this.langSubject=new Ti(this.lang),this.snowstormFhirBase$=this.snowstormFhirBaseSubject.asObservable(),this.fhirUrlParam$=this.fhirUrlParamSubject.asObservable(),this.lang$=this.langSubject.asObservable(),this.conceptCache=new Map}setSnowstormFhirBase(e){this.snowstormFhirBase=e,this.snowstormFhirBaseSubject.next(e)}setFhirUrlParam(e){this.fhirUrlParam=e,this.fhirUrlParamSubject.next(e)}setLang(e){this.lang=e,this.langSubject.next(e)}getSnowstormFhirBase(){return this.snowstormFhirBase}getFhirUrlParam(){return this.fhirUrlParam}getLang(){return this.lang}getCodeSystems(){return this.http.get(`${this.snowstormFhirBase}/CodeSystem`).pipe(Vi(this.handleError("getCodeSystems",{})))}getCodeSystem(e){return this.http.get(`${this.snowstormFhirBase}/CodeSystem?version=${e}`).pipe(Vi(this.handleError("getCodeSystem",{})))}getValueSetExpansionUrl(e,i,r,o){return r||(r=0),o||(o=20),"string"!=typeof i&&(i=""),`${this.snowstormFhirBase}/ValueSet/$expand?url=${this.fhirUrlParam}?fhir_vs=ecl/${encodeURIComponent(e)}&count=${o}&offset=${r}&filter=${i}&language=${this.lang}&displayLanguage=${this.lang}`}expandValueSet(e,i,r,o){let s=this.getValueSetExpansionUrl(e,i,r,o);return this.http.get(s).pipe(Vi(this.handleError("expandValueSet",{})))}translate(e,i,r){return r||(r=this.defaultFhirUrlParam),this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=${e}&code=${i}&system=${r}`).pipe(Vi(this.handleError("translate",{})))}expandValueSetFromServer(e,i,r,o,s,a){s||(s=0),a||(a=20),e||(e=this.snowstormFhirBase),i||(i=this.fhirUrlParam),"string"!=typeof o&&(o="");let c=`${e}/ValueSet/$expand?url=${i}?fhir_vs=ecl/${encodeURIComponent(r)}&count=${a}&offset=${s}&filter=${o}&language=${this.lang}&displayLanguage=${this.lang}`;return this.http.get(c).pipe(Vi(this.handleError("expandValueSet",{})))}handleError(e="operation",i){return r=>(console.error("There was an error!"),console.error(r),this._snackBar.openFromComponent(Si,{duration:5e3,data:r.message,panelClass:["red-snackbar"]}),it(i))}lookupConcept(e,i){i||(i=this.fhirUrlParam);const r=`${i}:${e}`,o=this.conceptCache.get(r);if(o)return it(o);let s=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=http://snomed.info/sct&code=${e}&property=normalForm`;"http://snomed.info/sct"!=i&&(s+=`&version=${i}`);const a={headers:new ma({"Accept-Language":"en"})};return this.http.get(s,a).pipe(gi(c=>{this.conceptCache.set(r,c)}),Vi(this.handleError("lookupConcept",{})))}getMRCMAttributes(e){let i=`${this.snowstormFhirBase.replace("fhir","snowstorm/snomed-ct")}mrcm/MAIN/domain-attributes?parentIds=${e}&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED`;return this.http.get(i).pipe(Vi(this.handleError("getMRCMAttributes",{})))}addPostcoordinatedExpression(e){let i=`${this.snowstormFhirBase}/CodeSystem/sct_11000003104_EXP`;const r={headers:new ma({"Content-Type":"application/fhir+json"})};return this.http.patch(i,{resourceType:"CodeSystem",concept:[{code:e}]},r).pipe(Vi(this.handleError("addPostcoordinatedExpression",{})))}runEclLegacy(e){let i=`https://browser.ihtsdotools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-ES/2022-10-31/concepts?offset=0&limit=100&termActive=true&ecl=${encodeURIComponent(e)}`;return this.http.get(i).pipe(Vi(this.handleError("expandValueSet",{})))}getIcd10MapTargets(e){return this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?code=${e}&system=http://snomed.info/sct&source=http://snomed.info/sct?fhir_vs&target=http://hl7.org/fhir/sid/icd-10&url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_cm=447562003`).pipe(Vi(this.handleError("translate",{})))}lookupOtherCodeSystems(e,i){return this.http.get(`${this.snowstormFhirBase}/CodeSystem/$lookup?system=${e}&code=${i}`).pipe(Vi(this.handleError("lookup",{})))}getNormalForm(e){if(e.parameter)for(let i of e.parameter){let r=!1;if("property"==i.name){for(let o of i.part)"code"==o.name&&"normalForm"==o.valueString&&(r=!0);if(r)for(let o of i.part)if("valueString"==o.name)return o.valueString}}return""}parseNormmalForm(e){const i=[];return e.split("} {").forEach(o=>{const s=o.match(/\d+\|[^\|]+\|\s*=\s*\d+\|[^\|]+\|/g);if(!s)return;const a=s.map(c=>{const[l,d]=c.split("=").map(g=>g.trim()),[u,h]=l.split("|").map(g=>g.trim()),[f,m]=d.split("|").map(g=>g.trim());return{type:{code:u,display:h.replace(/\(.*\)/,"").trim()},target:{code:f,display:m}}});i.push(a)}),{groups:i}}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ml),Q(Df))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function G5(...n){const t=LR(n),{args:e,keys:i}=h3(n),r=new Dn(o=>{const{length:s}=e;if(!s)return void o.complete();const a=new Array(s);let c=s,l=s;for(let d=0;d{u||(u=!0,l--),a[d]=h},()=>c--,void 0,()=>{(!c||!u)&&(l||o.next(i?f3(i,a):a),o.complete())}))}});return t?r.pipe(HE(t)):r}const Zle=["*"];let py;function Cg(n){return function Jle(){if(void 0===py&&(py=null,typeof window<"u")){const n=window;void 0!==n.trustedTypes&&(py=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return py}()?.createHTML(n)||n}function W5(n){return Error(`Unable to find icon with the name "${n}"`)}function q5(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function Q5(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class cu{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let gy=(()=>{class n{constructor(e,i,r,o){this._httpClient=e,this._sanitizer=i,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,o){return this._addSvgIconConfig(e,i,new cu(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,o){const s=this._sanitizer.sanitize(Nn.HTML,r);if(!s)throw Q5(r);const a=Cg(s);return this._addSvgIconConfig(e,i,new cu("",a,o))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new cu(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){const o=this._sanitizer.sanitize(Nn.HTML,i);if(!o)throw Q5(i);const s=Cg(o);return this._addSvgIconSetConfig(e,new cu("",s,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){const i=this._sanitizer.sanitize(Nn.RESOURCE_URL,e);if(!i)throw q5(e);const r=this._cachedIconsByUrl.get(i);return r?it(_y(r)):this._loadSvgIconFromConfig(new cu(e,null)).pipe(gi(o=>this._cachedIconsByUrl.set(i,o)),ct(o=>_y(o)))}getNamedSvgIcon(e,i=""){const r=K5(i,e);let o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(i,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);const s=this._iconSetConfigs.get(i);return s?this._getSvgFromIconSetConfigs(e,s):eu(W5(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?it(_y(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(ct(i=>_y(i)))}_getSvgFromIconSetConfigs(e,i){const r=this._extractIconWithNameFromAnySet(e,i);return r?it(r):G5(i.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(Vi(a=>{const l=`Loading icon set URL: ${this._sanitizer.sanitize(Nn.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(l)),it(null)})))).pipe(ct(()=>{const s=this._extractIconWithNameFromAnySet(e,i);if(!s)throw W5(e);return s}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){const s=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(s,e,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(gi(i=>e.svgText=i),ct(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?it(null):this._fetchIcon(e).pipe(gi(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){const o=e.querySelector(`[id="${i}"]`);if(!o)return null;const s=o.cloneNode(!0);if(s.removeAttribute("id"),"svg"===s.nodeName.toLowerCase())return this._setSvgAttributes(s,r);if("symbol"===s.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(s),r);const a=this._svgElementFromString(Cg(""));return a.appendChild(s),this._setSvgAttributes(a,r)}_svgElementFromString(e){const i=this._document.createElement("DIV");i.innerHTML=e;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){const i=this._svgElementFromString(Cg("")),r=e.attributes;for(let o=0;oCg(l)),kv(()=>this._inProgressUrlFetches.delete(s)),HR());return this._inProgressUrlFetches.set(s,c),c}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(K5(e,i),r),this}_addSvgIconSetConfig(e,i){const r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){const i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;rt?t.pathname+t.search:""}}}),X5=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ade=X5.map(n=>`[${n}]`).join(", "),cde=/^url\(['"]?#(.*?)['"]?\)$/;let co=(()=>{class n extends ide{get inline(){return this._inline}set inline(e){this._inline=Ke(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){const i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){const i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}constructor(e,i,r,o,s,a){super(e),this._iconRegistry=i,this._location=o,this._errorHandler=s,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=lt.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];const i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const e=this._elementsWithExternalReferences;if(e&&e.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){const e=this._elementRef.nativeElement;let i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){const i=this._elementsWithExternalReferences;i&&i.forEach((r,o)=>{r.forEach(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){const i=e.querySelectorAll(ade),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o{const a=i[o],c=a.getAttribute(s),l=c?c.match(cde):null;if(l){let d=r.get(a);d||(d=[],r.set(a,d)),d.push({name:s,value:l[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){const[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(An(1)).subscribe(o=>this._setSvgElement(o),o=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${o.message}`))})}}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(gy),Ms("aria-hidden"),y(ode),y(kc),y(rde,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,i){2&e&&(vt("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),ot("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[ye],ngContentSelectors:Zle,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),dt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),lde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})();function Y5(n,t){return t?e=>jp(t.pipe(An(1),function dde(){return Ci((n,t)=>{n.subscribe(ui(t,To))})}()),e.pipe(Y5(n))):hr((e,i)=>Kr(n(e,i)).pipe(An(1),Cv(e)))}function sS(n,t=hg){const e=yg(n,t);return Y5(()=>e)}const ude=["mat-menu-item",""];function hde(n,t){1&n&&(xc(),_(0,"svg",3),_e(1,"polygon",4),v())}const fde=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],mde=["mat-icon, [matMenuItemIcon]","*"];function pde(n,t){if(1&n){const e=Le();_(0,"div",0),z("keydown",function(r){return he(e),fe(O()._handleKeydown(r))})("click",function(){return he(e),fe(O().closed.emit("click"))})("@transformMenu.start",function(r){return he(e),fe(O()._onAnimationStart(r))})("@transformMenu.done",function(r){return he(e),fe(O()._onAnimationDone(r))}),_(1,"div",1),dt(2),v()()}if(2&n){const e=O();E("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),vt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const gde=["*"],aS=new ae("MAT_MENU_PANEL"),_de=Ol(Oc(class{}));let $a=(()=>{class n extends _de{constructor(e,i,r,o,s){super(),this._elementRef=e,this._document=i,this._focusMonitor=r,this._parentMenu=o,this._changeDetectorRef=s,this.role="menuitem",this._hovered=new Me,this._focused=new Me,this._highlighted=!1,this._triggersSubmenu=!1,o?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",Gt("120ms cubic-bezier(0, 0, 0.2, 1)",ze({opacity:1,transform:"scale(1)"}))),Qt("* => void",Gt("100ms 25ms linear",ze({opacity:0})))]),fadeInItems:$n("fadeInItems",[pn("showing",ze({opacity:1})),Qt("void => *",[ze({opacity:0}),Gt("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let vde=0;const Z5=new ae("mat-menu-default-options",{providedIn:"root",factory:function yde(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let kg=(()=>{class n{get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(e){this._overlapTrigger=Ke(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Ke(e)}set panelClass(e){const i=this._previousPanelClass;i&&i.length&&i.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(e){this.panelClass=e}constructor(e,i,r,o){this._elementRef=e,this._ngZone=i,this._defaultOptions=r,this._changeDetectorRef=o,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new yl,this._classList={},this._panelAnimationState="void",this._animationDone=new Me,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new De,this.close=this.closed,this.panelId="mat-menu-panel-"+vde++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new zT(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(er(this._directDescendantItems),Ji(e=>oi(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{const i=this._keyManager;if("enter"===this._panelAnimationState&&i.activeItem?._hasFocus()){const r=e.toArray(),o=Math.max(0,Math.min(r.length-1,i.activeItemIndex||0));r[o]&&!r[o].disabled?i.setActiveItem(o):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(er(this._directDescendantItems),Ji(i=>oi(...i.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const i=e.keyCode,r=this._keyManager;switch(i){case 27:so(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===i||40===i)&&r.setFocusOrigin("keyboard"),void r.onKeydown(e)}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(An(1)).subscribe(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&i&&i.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){const i=Math.min(this._baseElevation+e,24),r=`${this._elevationPrefix}${i}`,o=Object.keys(this._classList).find(s=>s.startsWith(this._elevationPrefix));(!o||o===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(e=this.xPosition,i=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===e,r["mat-menu-after"]="after"===e,r["mat-menu-above"]="above"===i,r["mat-menu-below"]="below"===i,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(e){this._animationDone.next(e),this._isAnimating=!1}_onAnimationStart(e){this._isAnimating=!0,"enter"===e.toState&&0===this._keyManager.activeItemIndex&&(e.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(er(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Ye),y(Z5),y(an))},n.\u0275dir=X({type:n,contentQueries:function(e,i,r){if(1&e&&(qt(r,bde,5),qt(r,$a,5),qt(r,$a,4)),2&e){let o;Ae(o=Ie())&&(i.lazyContent=o.first),Ae(o=Ie())&&(i._allItems=o),Ae(o=Ie())&&(i.items=o)}},viewQuery:function(e,i){if(1&e&&pt(Un,5),2&e){let r;Ae(r=Ie())&&(i.templateRef=r.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}}),n})(),lu=(()=>{class n extends kg{constructor(e,i,r,o){super(e,i,r,o),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Ye),y(Z5),y(an))},n.\u0275cmp=Ve({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,i){2&e&&vt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[nt([{provide:aS,useExisting:n}]),ye],ngContentSelectors:gde,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(e,i){1&e&&(Rn(),A(0,pde,3,6,"ng-template"))},dependencies:[ha],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[by.transformMenu,by.fadeInItems]},changeDetection:0}),n})();const J5=new ae("mat-menu-scroll-strategy"),wde={provide:J5,deps:[ao],useFactory:function xde(n){return()=>n.scrollStrategies.reposition()}},eV=pa({passive:!0});let Cde=(()=>{class n{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),("click"===i||"tab"===i)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(e,i,r,o,s,a,c,l,d){this._overlay=e,this._element=i,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=c,this._focusMonitor=l,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=lt.EMPTY,this._hoverSubscription=lt.EMPTY,this._menuCloseSubscription=lt.EMPTY,this._changeDetectorRef=Et(an),this._handleTouchStart=u=>{ry(u)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new De,this.onMenuOpen=this.menuOpened,this.menuClosed=new De,this.onMenuClose=this.menuClosed,this._scrollStrategy=o,this._parentMaterialMenu=s instanceof kg?s:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,eV)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,eV),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const e=this.menu;if(this._menuOpen||!e)return;const i=this._createOverlay(e),r=i.getConfig(),o=r.positionStrategy;this._setPosition(e,o),r.hasBackdrop=null==e.hasBackdrop?!this.triggersSubmenu():e.hasBackdrop,i.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof kg&&(e._startAnimation(),e._directDescendantItems.changes.pipe(St(e.close)).subscribe(()=>{o.withLockedPosition(!1).reapplyLastPosition(),o.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;const i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===e||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof kg?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(mn(r=>"void"===r.toState),An(1),St(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(e){e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,this._setMenuElevation(e),e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(e){if(e.setElevation){let i=0,r=e.parentMenu;for(;r;)i++,r=r.parentMenu;e.setElevation(i)}}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){const i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new Sf({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(r=>{const o="start"===r.connectionPair.overlayX?"after":"before",s="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(o,s)):e.setPositionClasses(o,s)})}_setPosition(e,i){let[r,o]="before"===e.xPosition?["end","start"]:["start","end"],[s,a]="above"===e.yPosition?["bottom","top"]:["top","bottom"],[c,l]=[s,a],[d,u]=[r,o],h=0;if(this.triggersSubmenu()){if(u=r="before"===e.xPosition?"start":"end",o=d="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}h="bottom"===s?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(c="top"===s?"bottom":"top",l="top"===a?"bottom":"top");i.withPositions([{originX:r,originY:c,overlayX:d,overlayY:s,offsetY:h},{originX:o,originY:c,overlayX:u,overlayY:s,offsetY:h},{originX:r,originY:l,overlayX:d,overlayY:a,offsetY:-h},{originX:o,originY:l,overlayX:u,overlayY:a,offsetY:-h}])}_menuClosingActions(){const e=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return oi(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:it(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(mn(s=>s!==this._menuItemInstance),mn(()=>this._menuOpen)):it(),i)}_handleMousedown(e){iy(e)||(this._openedBy=0===e.button?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){const i=e.keyCode;(13===i||32===i)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===i&&"ltr"===this.dir||37===i&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(mn(e=>e===this._menuItemInstance&&!e.disabled),sS(0,eS)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof kg&&this.menu._isAnimating?this.menu._animationDone.pipe(An(1),sS(0,eS),St(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Lc(e.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(e){return new(e||n)(y(ao),y(Ne),y(ii),y(J5),y(aS,8),y($a,10),y(Hi,8),y(ms),y(Ye))},n.\u0275dir=X({type:n,hostVars:3,hostBindings:function(e,i){1&e&&z("click",function(o){return i._handleClick(o)})("mousedown",function(o){return i._handleMousedown(o)})("keydown",function(o){return i._handleKeydown(o)}),2&e&&vt("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}}),n})(),du=(()=>{class n extends Cde{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[ye]}),n})(),kde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[wde],imports:[Br,Nl,Ft,au,Vc,Ft]}),n})();const Ede=["determinateSpinner"];function Tde(n,t){if(1&n&&(xc(),_(0,"svg",11),_e(1,"circle",12),v()),2&n){const e=O();vt("viewBox",e._viewBox()),x(1),Ai("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),vt("r",e._circleRadius())}}const Sde=Pl(class{constructor(n){this._elementRef=n}},"primary"),Dde=new ae("mat-progress-spinner-default-options",{providedIn:"root",factory:function Ade(){return{diameter:tV}}}),tV=100;let Bl=(()=>{class n extends Sde{constructor(e,i,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=tV,this._noopAnimations="NoopAnimations"===i&&!!r&&!r._forceAnimations,r&&(r.color&&(this.color=this.defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,gr(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=gr(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=gr(e)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const e=2*this._circleRadius()+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Jn,8),y(Dde))},n.\u0275cmp=Ve({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,i){if(1&e&&pt(Ede,5),2&e){let r;Ae(r=Ie())&&(i._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(e,i){2&e&&(vt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===i.mode?i.value:null)("mode",i.mode),Ai("width",i.diameter,"px")("height",i.diameter,"px"),ot("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===i.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[ye],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(e,i){if(1&e&&(A(0,Tde,2,8,"ng-template",null,0,Xd),_(2,"div",1,2),xc(),_(4,"svg",3),_e(5,"circle",4),v()(),Eh(),_(6,"div",5)(7,"div",6)(8,"div",7),ds(9,8),v(),_(10,"div",9),ds(11,8),v(),_(12,"div",10),ds(13,8),v()()()),2&e){const r=Pt(1);x(4),vt("viewBox",i._viewBox()),x(1),Ai("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),vt("r",i._circleRadius()),x(4),E("ngTemplateOutlet",r),x(2),E("ngTemplateOutlet",r),x(2),E("ngTemplateOutlet",r)}},dependencies:[pv],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, transparent)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),Mde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft]}),n})();const Rde=["*"],Lde=new ae("MAT_CARD_CONFIG");let cS=(()=>{class n{constructor(e){this.appearance=e?.appearance||"raised"}}return n.\u0275fac=function(e){return new(e||n)(y(Lde,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-mdc-card-outlined","outlined"===i.appearance)("mdc-card--outlined","outlined"===i.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Rde,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),dt(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mat-mdc-card{position:relative;border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px));background-color:var(--mdc-elevated-card-container-color, transparent);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color, transparent)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width, 1px);border-style:solid;border-color:var(--mdc-outlined-card-outline-color, transparent)}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0}),n})(),Yde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Br,Ft]}),n})();const Jde=[[["caption"]],[["colgroup"],["col"]]],eue=["caption","colgroup, col"];function lS(n){return class extends n{get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=Ke(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}}}const Af=new ae("CDK_TABLE");let If=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","cdkCellDef",""]]}),n})(),Mf=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","cdkHeaderCellDef",""]]}),n})(),vy=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","cdkFooterCellDef",""]]}),n})();class rue{}const oue=lS(rue);let Uc=(()=>{class n extends oue{get name(){return this._name}set name(e){this._setNameInput(e)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){const i=this._stickyEnd;this._stickyEnd=Ke(e),this._hasStickyChanged=i!==this._stickyEnd}constructor(e){super(),this._table=e,this._stickyEnd=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return n.\u0275fac=function(e){return new(e||n)(y(Af,8))},n.\u0275dir=X({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(e,i,r){if(1&e&&(qt(r,If,5),qt(r,Mf,5),qt(r,vy,5)),2&e){let o;Ae(o=Ie())&&(i.cell=o.first),Ae(o=Ie())&&(i.headerCell=o.first),Ae(o=Ie())&&(i.footerCell=o.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[nt([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ye]}),n})();class dS{constructor(t,e){e.nativeElement.classList.add(...t._columnCssClassName)}}let uS=(()=>{class n extends dS{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(y(Uc),y(Ne))},n.\u0275dir=X({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[ye]}),n})(),hS=(()=>{class n extends dS{constructor(e,i){if(super(e,i),1===e._table?._elementRef.nativeElement.nodeType){const r=e._table._elementRef.nativeElement.getAttribute("role");i.nativeElement.setAttribute("role","grid"===r||"treegrid"===r?"gridcell":"cell")}}}return n.\u0275fac=function(e){return new(e||n)(y(Uc),y(Ne))},n.\u0275dir=X({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[ye]}),n})();class iV{constructor(){this.tasks=[],this.endTasks=[]}}const fS=new ae("_COALESCED_STYLE_SCHEDULER");let rV=(()=>{class n{constructor(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new Me}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new iV,this._getScheduleObservable().pipe(St(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const e=this._currentSchedule;this._currentSchedule=new iV;for(const i of e.tasks)i();for(const i of e.endTasks)i()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Pi(Promise.resolve(void 0)):this._ngZone.onStable.pipe(An(1))}}return n.\u0275fac=function(e){return new(e||n)(Q(Ye))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),mS=(()=>{class n{constructor(e,i){this.template=e,this._differs=i}ngOnChanges(e){if(!this._columnsDiffer){const i=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(i).create(),this._columnsDiffer.diff(i)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Eg?e.headerCell.template:this instanceof Tg?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc))},n.\u0275dir=X({type:n,features:[jn]}),n})();class sue extends mS{}const aue=lS(sue);let Eg=(()=>{class n extends aue{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc),y(Af,8))},n.\u0275dir=X({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[ye,jn]}),n})();class cue extends mS{}const lue=lS(cue);let Tg=(()=>{class n extends lue{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc),y(Af,8))},n.\u0275dir=X({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[ye,jn]}),n})(),yy=(()=>{class n extends mS{constructor(e,i,r){super(e,i),this._table=r}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(Dc),y(Af,8))},n.\u0275dir=X({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[ye]}),n})(),Hc=(()=>{class n{constructor(e){this._viewContainer=e,n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}}return n.mostRecentCellOutlet=null,n.\u0275fac=function(e){return new(e||n)(y(ii))},n.\u0275dir=X({type:n,selectors:[["","cdkCellOutlet",""]]}),n})(),pS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Ve({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),_S=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Ve({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),xy=(()=>{class n{constructor(e){this.templateRef=e,this._contentClassName="cdk-no-data-row"}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["ng-template","cdkNoDataRow",""]]}),n})();const oV=["top","bottom","left","right"];class due{constructor(t,e,i,r,o=!0,s=!0,a){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=o,this._needsPositionStickyOnElement=s,this._positionListener=a,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(t,e){const i=[];for(const r of t)if(r.nodeType===r.ELEMENT_NODE){i.push(r);for(let o=0;o{for(const r of i)this._removeStickyStyle(r,e)})}updateStickyColumns(t,e,i,r=!0){if(!t.length||!this._isBrowser||!e.some(h=>h)&&!i.some(h=>h))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const o=t[0],s=o.children.length,a=this._getCellWidths(o,r),c=this._getStickyStartColumnPositions(a,e),l=this._getStickyEndColumnPositions(a,i),d=e.lastIndexOf(!0),u=i.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const h="rtl"===this.direction,f=h?"right":"left",m=h?"left":"right";for(const g of t)for(let p=0;pe[p]?g:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===u?[]:a.slice(u).map((g,p)=>i[p+u]?g:null).reverse()}))})}stickRows(t,e,i){if(!this._isBrowser)return;const r="bottom"===i?t.slice().reverse():t,o="bottom"===i?e.slice().reverse():e,s=[],a=[],c=[];for(let d=0,u=0;d{for(let d=0;d{e.some(r=>!r)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0,!1)})}_removeStickyStyle(t,e){for(const r of e)t.style[r]="",t.classList.remove(this._borderCellCss[r]);oV.some(r=>-1===e.indexOf(r)&&t.style[r])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,i,r){t.classList.add(this._stickCellCss),r&&t.classList.add(this._borderCellCss[e]),t.style[e]=`${i}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const r of oV)t.style[r]&&(i+=e[r]);return i?`${i}`:""}_getCellWidths(t,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const i=[],r=t.children;for(let o=0;o0;o--)e[o]&&(i[o]=r,r+=t[o]);return i}}const bS=new ae("CDK_SPL");let wy=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","rowOutlet",""]]}),n})(),Cy=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","headerRowOutlet",""]]}),n})(),ky=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","footerRowOutlet",""]]}),n})(),Ey=(()=>{class n{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(Ne))},n.\u0275dir=X({type:n,selectors:[["","noDataRowOutlet",""]]}),n})(),Ty=(()=>{class n{get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=Ke(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=Ke(e),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(e,i,r,o,s,a,c,l,d,u,h,f){this._differs=e,this._changeDetectorRef=i,this._elementRef=r,this._dir=s,this._platform=c,this._viewRepeater=l,this._coalescedStyleScheduler=d,this._viewportRuler=u,this._stickyPositioningListener=h,this._ngZone=f,this._onDestroy=new Me,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new De,this.viewChange=new Ti({start:0,end:Number.MAX_VALUE}),o||this._elementRef.nativeElement.setAttribute("role","table"),this._document=a,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((e,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i),this._viewportRuler.change().pipe(St(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const i=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||i,this._forceRecalculateCellWidths=i,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){[this._rowOutlet.viewContainer,this._headerRowOutlet.viewContainer,this._footerRowOutlet.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),xT(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const e=this._dataDiffer.diff(this._renderRows);if(!e)return this._updateNoDataRow(),void this.contentChanged.next();const i=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,i,(r,o,s)=>this._getEmbeddedViewArgs(r.item,s),r=>r.item.data,r=>{1===r.operation&&r.context&&this._renderCellTemplateForItem(r.record.item.rowDef,r.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(r=>{i.get(r.currentIndex).context.$implicit=r.item.data}),this._updateNoDataRow(),this._ngZone&&Ye.isInAngularZone()?this._ngZone.onStable.pipe(An(1),St(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){const e=this._getRenderedRows(this._headerRowOutlet),r=this._elementRef.nativeElement.querySelector("thead");r&&(r.style.display=e.length?"":"none");const o=this._headerRowDefs.map(s=>s.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,o,"top"),this._headerRowDefs.forEach(s=>s.resetStickyChanged())}updateStickyFooterRowStyles(){const e=this._getRenderedRows(this._footerRowOutlet),r=this._elementRef.nativeElement.querySelector("tfoot");r&&(r.style.display=e.length?"":"none");const o=this._footerRowDefs.map(s=>s.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,o,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,o),this._footerRowDefs.forEach(s=>s.resetStickyChanged())}updateStickyColumnStyles(){const e=this._getRenderedRows(this._headerRowOutlet),i=this._getRenderedRows(this._rowOutlet),r=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...i,...r],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((o,s)=>{this._addStickyColumnStyles([o],this._headerRowDefs[s])}),this._rowDefs.forEach(o=>{const s=[];for(let a=0;a{this._addStickyColumnStyles([o],this._footerRowDefs[s])}),Array.from(this._columnDefsByName.values()).forEach(o=>o.resetStickyChanged())}_getAllRenderRows(){const e=[],i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=0;r{const a=r&&r.has(s)?r.get(s):[];if(a.length){const c=a.shift();return c.dataIndex=i,c}return{data:e,rowDef:s,dataIndex:i}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Sy(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(i=>{this._columnDefsByName.has(i.name),this._columnDefsByName.set(i.name,i)})}_cacheRowDefs(){this._headerRowDefs=Sy(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Sy(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Sy(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const e=this._rowDefs.filter(i=>!i.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){const e=(s,a)=>s||!!a.getColumnsDiff(),i=this._rowDefs.reduce(e,!1);i&&this._forceRenderDataRows();const r=this._headerRowDefs.reduce(e,!1);r&&this._forceRenderHeaderRows();const o=this._footerRowDefs.reduce(e,!1);return o&&this._forceRenderFooterRows(),i||r||o}_switchDataSource(e){this._data=[],xT(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;xT(this.dataSource)?e=this.dataSource.connect(this):function Zde(n){return!!n&&(n instanceof Dn||sn(n.lift)&&sn(n.subscribe))}(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=it(this.dataSource)),this._renderChangeSubscription=e.pipe(St(this._onDestroy)).subscribe(i=>{this._data=i||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,i)=>this._renderRow(this._headerRowOutlet,e,i)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,i)=>this._renderRow(this._footerRowOutlet,e,i)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,i){const r=Array.from(i.columns||[]).map(a=>this._columnDefsByName.get(a)),o=r.map(a=>a.sticky),s=r.map(a=>a.stickyEnd);this._stickyStyler.updateStickyColumns(e,o,s,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){const i=[];for(let r=0;r!o.when||o.when(i,e));else{let o=this._rowDefs.find(s=>s.when&&s.when(i,e))||this._defaultRowDef;o&&r.push(o)}return r}_getEmbeddedViewArgs(e,i){return{templateRef:e.rowDef.template,context:{$implicit:e.data},index:i}}_renderRow(e,i,r,o={}){const s=e.viewContainer.createEmbeddedView(i.template,o,r);return this._renderCellTemplateForItem(i,o),s}_renderCellTemplateForItem(e,i){for(let r of this._getCellTemplates(e))Hc.mostRecentCellOutlet&&Hc.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,i);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const e=this._rowOutlet.viewContainer;for(let i=0,r=e.length;i{const r=this._columnDefsByName.get(i);return e.extractCellTemplate(r)}):[]}_applyNativeTableSections(){const e=this._document.createDocumentFragment(),i=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const r of i){const o=this._document.createElement(r.tag);o.setAttribute("role","rowgroup");for(const s of r.outlets)o.appendChild(s.elementRef.nativeElement);e.appendChild(o)}this._elementRef.nativeElement.appendChild(e)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const e=(i,r)=>i||r.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new due(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:it()).pipe(St(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(i=>!i._table||i._table===this)}_updateNoDataRow(){const e=this._customNoDataRow||this._noDataRow;if(!e)return;const i=0===this._rowOutlet.viewContainer.length;if(i===this._isShowingNoDataRow)return;const r=this._noDataRowOutlet.viewContainer;if(i){const o=r.createEmbeddedView(e.templateRef),s=o.rootNodes[0];1===o.rootNodes.length&&s?.nodeType===this._document.ELEMENT_NODE&&(s.setAttribute("role","row"),s.classList.add(e._contentClassName))}else r.clear();this._isShowingNoDataRow=i}}return n.\u0275fac=function(e){return new(e||n)(y(Dc),y(an),y(Ne),Ms("role"),y(Hi,8),y(gt),y(Hn),y(og),y(fS),y(_a),y(bS,12),y(Ye,8))},n.\u0275cmp=Ve({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(e,i,r){if(1&e&&(qt(r,xy,5),qt(r,Uc,5),qt(r,yy,5),qt(r,Eg,5),qt(r,Tg,5)),2&e){let o;Ae(o=Ie())&&(i._noDataRow=o.first),Ae(o=Ie())&&(i._contentColumnDefs=o),Ae(o=Ie())&&(i._contentRowDefs=o),Ae(o=Ie())&&(i._contentHeaderRowDefs=o),Ae(o=Ie())&&(i._contentFooterRowDefs=o)}},viewQuery:function(e,i){if(1&e&&(pt(wy,7),pt(Cy,7),pt(ky,7),pt(Ey,7)),2&e){let r;Ae(r=Ie())&&(i._rowOutlet=r.first),Ae(r=Ie())&&(i._headerRowOutlet=r.first),Ae(r=Ie())&&(i._footerRowOutlet=r.first),Ae(r=Ie())&&(i._noDataRowOutlet=r.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(e,i){2&e&&ot("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[nt([{provide:Af,useExisting:n},{provide:og,useClass:kB},{provide:fS,useClass:rV},{provide:bS,useValue:null}])],ngContentSelectors:eue,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,i){1&e&&(Rn(Jde),dt(0),dt(1,1),ds(2,0)(3,1)(4,2)(5,3))},dependencies:[wy,Cy,ky,Ey],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2}),n})();function Sy(n,t){return n.concat(Array.from(t))}let hue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[nS]}),n})();const fue=[[["caption"]],[["colgroup"],["col"]]],mue=["caption","colgroup, col"];let Vl=(()=>{class n extends Ty{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}ngOnInit(){super.ngOnInit(),this._isNativeHtmlTable&&this._elementRef.nativeElement.querySelector("tbody").classList.add("mdc-data-table__content")}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mdc-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[nt([{provide:Ty,useExisting:n},{provide:Af,useExisting:n},{provide:fS,useClass:rV},{provide:og,useClass:kB},{provide:bS,useValue:null}]),ye],ngContentSelectors:mue,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,i){1&e&&(Rn(fue),dt(0),dt(1,1),ds(2,0)(3,1)(4,2)(5,3))},dependencies:[wy,Cy,ky,Ey],styles:[".mdc-data-table{border-radius:var(--mdc-shape-medium, 4px);border-width:1px;border-style:solid}.mdc-data-table .mdc-data-table__header-cell:first-child{border-top-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:first-child,.mdc-data-table .mdc-data-table__header-cell:first-child[dir=rtl]{border-top-right-radius:var(--mdc-shape-medium, 4px);border-top-left-radius:0}.mdc-data-table .mdc-data-table__header-cell:last-child{border-top-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:last-child,.mdc-data-table .mdc-data-table__header-cell:last-child[dir=rtl]{border-top-left-radius:var(--mdc-shape-medium, 4px);border-top-right-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child{border-bottom-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child[dir=rtl]{border-bottom-right-radius:var(--mdc-shape-medium, 4px);border-bottom-left-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child{border-bottom-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child[dir=rtl]{border-bottom-left-radius:var(--mdc-shape-medium, 4px);border-bottom-right-radius:0}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-width:1px;border-bottom-style:solid}.mdc-data-table__pagination{border-top-width:1px;border-top-style:solid}.mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:none}.mdc-data-table__row{height:52px}.mdc-data-table__pagination{min-height:52px}.mdc-data-table__header-row{height:56px}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table--sticky-header .mdc-data-table__header-cell{position:sticky;top:0;z-index:1}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__pagination{box-sizing:border-box;display:flex;justify-content:flex-end}.mdc-data-table__pagination-trailing{margin-left:4px;margin-right:0;align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end}[dir=rtl] .mdc-data-table__pagination-trailing,.mdc-data-table__pagination-trailing[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__pagination-navigation{align-items:center;display:flex}.mdc-data-table__pagination-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__pagination-button .mdc-button__icon,.mdc-data-table__pagination-button .mdc-button__icon[dir=rtl]{transform:rotate(180deg)}[dir=rtl] .mdc-data-table__pagination-button,.mdc-data-table__pagination-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__pagination-total{margin-left:14px;margin-right:36px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-total,.mdc-data-table__pagination-total[dir=rtl]{margin-left:36px;margin-right:14px}.mdc-data-table__pagination-rows-per-page{margin-left:0;margin-right:22px;align-items:center;display:inline-flex}[dir=rtl] .mdc-data-table__pagination-rows-per-page,.mdc-data-table__pagination-rows-per-page[dir=rtl]{margin-left:22px;margin-right:0}.mdc-data-table__pagination-rows-per-page-label{margin-left:0;margin-right:12px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__pagination-rows-per-page-label[dir=rtl]{margin-left:12px;margin-right:0}.mdc-data-table__pagination-rows-per-page-select{min-width:var(--mdc-menu-min-width, 80px);margin:8px 0}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{width:100%;min-width:80px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{height:36px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__dropdown-icon{width:20px;height:20px}.mdc-data-table__pagination-rows-per-page-select.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 56px)}.mdc-data-table__pagination-rows-per-page-select .mdc-list-item.mdc-list-item--with-one-line{height:36px}.mdc-data-table__progress-indicator{display:none;position:absolute;width:100%}.mdc-data-table--in-progress .mdc-data-table__progress-indicator{display:block}.mdc-data-table__scrim{background-color:var(--mdc-theme-surface, #fff);height:100%;opacity:.32;position:absolute;top:0;width:100%}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table-sticky{position:sticky !important}.mat-mdc-table{table-layout:auto;white-space:normal}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table .mat-mdc-row:hover,.mat-mdc-table .mat-mdc-footer-row:hover{background-color:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2}),n})(),zc=(()=>{class n extends If{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matCellDef",""]],features:[nt([{provide:If,useExisting:n}]),ye]}),n})(),jc=(()=>{class n extends Mf{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matHeaderCellDef",""]],features:[nt([{provide:Mf,useExisting:n}]),ye]}),n})(),$c=(()=>{class n extends Uc{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[nt([{provide:Uc,useExisting:n},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:n}]),ye]}),n})(),Gc=(()=>{class n extends uS{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[ye]}),n})(),Wc=(()=>{class n extends hS{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[ye]}),n})(),Ul=(()=>{class n extends Eg{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[nt([{provide:Eg,useExisting:n}]),ye]}),n})(),Hl=(()=>{class n extends yy{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[nt([{provide:yy,useExisting:n}]),ye]}),n})(),zl=(()=>{class n extends pS{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[nt([{provide:pS,useExisting:n}]),ye],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),jl=(()=>{class n extends _S{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[nt([{provide:_S,useExisting:n}]),ye],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&ds(0,0)},dependencies:[Hc],encapsulation:2}),n})(),kue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,hue,Ft]}),n})();class Tue extends yT{get data(){return this._data.value}set data(t){t=Array.isArray(t)?t:[],this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}constructor(t=[]){super(),this._renderData=new Ti([]),this._filter=new Ti(""),this._internalPageChanges=new Me,this._renderChangesSubscription=null,this.sortingDataAccessor=(e,i)=>{const r=e[i];if($B(r)){const o=Number(r);return o<9007199254740991?o:r}return r},this.sortData=(e,i)=>{const r=i.active,o=i.direction;return r&&""!=o?e.sort((s,a)=>{let c=this.sortingDataAccessor(s,r),l=this.sortingDataAccessor(a,r);const d=typeof c,u=typeof l;d!==u&&("number"===d&&(c+=""),"number"===u&&(l+=""));let h=0;return null!=c&&null!=l?c>l?h=1:c{const r=Object.keys(e).reduce((s,a)=>s+e[a]+"\u25ec","").toLowerCase(),o=i.trim().toLowerCase();return-1!=r.indexOf(o)},this._data=new Ti(t),this._updateChangeSubscription()}_updateChangeSubscription(){const t=this._sort?oi(this._sort.sortChange,this._sort.initialized):it(null),e=this._paginator?oi(this._paginator.page,this._internalPageChanges,this._paginator.initialized):it(null),r=Cl([this._data,this._filter]).pipe(ct(([a])=>this._filterData(a))),o=Cl([r,t]).pipe(ct(([a])=>this._orderData(a))),s=Cl([o,e]).pipe(ct(([a])=>this._pageData(a)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(a=>this._renderData.next(a))}_filterData(t){return this.filteredData=null==this.filter||""===this.filter?t:t.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;const e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){const i=Math.ceil(e.length/e.pageSize)-1||0,r=Math.min(e.pageIndex,i);r!==e.pageIndex&&(e.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}class uu extends Tue{}let aV=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(y(Cc),y(Ne))},n.\u0275dir=X({type:n}),n})(),hu=(()=>{class n extends aV{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,features:[ye]}),n})();const Hr=new ae("NgValueAccessor"),Due={provide:Hr,useExisting:hn(()=>Us),multi:!0},Iue=new ae("CompositionEventMode");let Us=(()=>{class n extends aV{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Aue(){const n=Ac()?Ac().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Cc),y(Ne),y(Iue,8))},n.\u0275dir=X({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&z("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[nt([Due]),ye]}),n})();const Mue=!1;function $l(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function lV(n){return null!=n&&"number"==typeof n.length}const Sr=new ae("NgValidators"),Gl=new ae("NgAsyncValidators"),Rue=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[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])?)*$/;class Rf{static min(t){return function dV(n){return t=>{if($l(t.value)||$l(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if($l(t.value)||$l(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return hV(t)}static requiredTrue(t){return function fV(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function mV(n){return $l(n.value)||Rue.test(n.value)?null:{email:!0}}(t)}static minLength(t){return pV(t)}static maxLength(t){return function gV(n){return t=>lV(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return _V(t)}static nullValidator(t){return null}static compose(t){return CV(t)}static composeAsync(t){return kV(t)}}function hV(n){return $l(n.value)?{required:!0}:null}function pV(n){return t=>$l(t.value)||!lV(t.value)?null:t.value.length{if($l(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Dy(n){return null}function bV(n){return null!=n}function vV(n){const t=kp(n)?Pi(n):n;if(Mue&&!Tk(t)){let e="Expected async validator to return Promise or Observable.";throw"object"==typeof n&&(e+=" Are you using a synchronous validator where an async validator is expected?"),new pe(-1101,e)}return t}function yV(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function xV(n,t){return t.map(e=>e(n))}function wV(n){return n.map(t=>function Fue(n){return!n.validate}(t)?t:e=>t.validate(e))}function CV(n){if(!n)return null;const t=n.filter(bV);return 0==t.length?null:function(e){return yV(xV(e,t))}}function vS(n){return null!=n?CV(wV(n)):null}function kV(n){if(!n)return null;const t=n.filter(bV);return 0==t.length?null:function(e){return G5(xV(e,t).map(vV)).pipe(ct(yV))}}function yS(n){return null!=n?kV(wV(n)):null}function EV(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function TV(n){return n._rawValidators}function SV(n){return n._rawAsyncValidators}function xS(n){return n?Array.isArray(n)?n:[n]:[]}function Ay(n,t){return Array.isArray(n)?n.includes(t):n===t}function DV(n,t){const e=xS(t);return xS(n).forEach(r=>{Ay(e,r)||e.push(r)}),e}function AV(n,t){return xS(t).filter(e=>!Ay(n,e))}class IV{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=vS(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=yS(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Po extends IV{get formDirective(){return null}get path(){return null}}class Ga extends IV{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class MV{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let qo=(()=>{class n extends MV{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Ga,2))},n.\u0275dir=X({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&ot("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[ye]}),n})(),Sg=(()=>{class n extends MV{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Po,10))},n.\u0275dir=X({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&ot("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[ye]}),n})();function RV(n,t){return n?`with name: '${t}'`:`at index: ${t}`}const kS=!1,Dg="VALID",My="INVALID",Ff="PENDING",Ag="DISABLED";function ES(n){return(Ry(n)?n.validators:n)||null}function TS(n,t){return(Ry(t)?t.asyncValidators:n)||null}function Ry(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function FV(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new pe(1e3,kS?function Lue(n){return`\n There are no form controls registered with this ${n?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(t):"");if(!i[e])throw new pe(1001,kS?function Bue(n,t){return`Cannot find form control ${RV(n,t)}`}(t,e):"")}function PV(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new pe(1002,kS?function Vue(n,t){return`Must supply a value for form control ${RV(n,t)}`}(t,r):"")})}class Fy{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Dg}get invalid(){return this.status===My}get pending(){return this.status==Ff}get disabled(){return this.status===Ag}get enabled(){return this.status!==Ag}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(DV(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(DV(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(AV(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(AV(t,this._rawAsyncValidators))}hasValidator(t){return Ay(this._rawValidators,t)}hasAsyncValidator(t){return Ay(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Ff,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Ag,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Dg,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Dg||this.status===Ff)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ag:Dg}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Ff,this._hasOwnPendingAsyncValidator=!0;const e=vV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new De,this.statusChanges=new De}_calculateStatus(){return this._allControlsDisabled()?Ag:this.errors?My:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ff)?Ff:this._anyControlsHaveStatus(My)?My:Dg}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Ry(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function Uue(n){return Array.isArray(n)?vS(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Hue(n){return Array.isArray(n)?yS(n):n||null}(this._rawAsyncValidators)}}class Pf extends Fy{constructor(t,e,i){super(ES(e),TS(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){PV(this,!0,t),Object.keys(t).forEach(i=>{FV(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class OV extends Pf{}const fu=new ae("CallSetDisabledState",{providedIn:"root",factory:()=>Ig}),Ig="always";function Py(n,t){return[...t.path,n]}function Mg(n,t,e=Ig){SS(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function jue(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&NV(n,t)})}(n,t),function Gue(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function $ue(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&NV(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function zue(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Oy(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Ly(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Ny(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function SS(n,t){const e=TV(n);null!==t.validator?n.setValidators(EV(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=SV(n);null!==t.asyncValidator?n.setAsyncValidators(EV(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Ny(t._rawValidators,r),Ny(t._rawAsyncValidators,r)}function Ly(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=TV(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=SV(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return Ny(t._rawValidators,i),Ny(t._rawAsyncValidators,i),e}function NV(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function LV(n,t){SS(n,t)}function AS(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function BV(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function IS(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===Us?e=o:function Que(n){return Object.getPrototypeOf(n.constructor)===hu}(o)?i=o:r=o}),r||i||e||null}const Xue={provide:Po,useExisting:hn(()=>mu)},Rg=(()=>Promise.resolve())();let mu=(()=>{class n extends Po{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new De,this.form=new Pf({},vS(e),yS(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Rg.then(()=>{const i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),Mg(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Rg.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Rg.then(()=>{const i=this._findContainer(e.path),r=new Pf({});LV(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Rg.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Rg.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,BV(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(y(Sr,10),y(Gl,10),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&z("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[nt([Xue]),ye]}),n})();function VV(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function UV(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Qo=class extends Fy{constructor(t=null,e,i){super(ES(e),TS(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ry(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=UV(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){VV(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){VV(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){UV(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Yue=Qo,ehe={provide:Ga,useExisting:hn(()=>ps)},jV=(()=>Promise.resolve())();let ps=(()=>{class n extends Ga{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Qo,this._registered=!1,this.update=new De,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=IS(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),AS(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Mg(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){jV.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&af(i);jV.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Py(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(y(Po,9),y(Sr,10),y(Gl,10),y(Hr,10),y(an,8),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[nt([ehe]),ye,jn]}),n})(),Fg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})();const the={provide:Hr,useExisting:hn(()=>By),multi:!0};let By=(()=>{class n extends hu{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&z("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[nt([the]),ye]}),n})(),$V=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const MS=new ae("NgModelWithFormControlWarning"),ohe={provide:Ga,useExisting:hn(()=>Vy)};let Vy=(()=>{class n extends Ga{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=s,this.update=new De,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=IS(0,r)}ngOnChanges(e){if(this._isControlChanged(e)){const i=e.form.previousValue;i&&Oy(i,this,!1),Mg(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}AS(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Oy(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(y(Sr,10),y(Gl,10),y(Hr,10),y(MS,8),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[nt([ohe]),ye,jn]}),n})();const she={provide:Po,useExisting:hn(()=>Wl)};let Wl=(()=>{class n extends Po{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new De,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ly(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Mg(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Oy(e.control||null,e,!1),function Kue(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,BV(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Oy(i||null,e),(n=>n instanceof Qo)(r)&&(Mg(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);LV(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function Wue(n,t){return Ly(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){SS(this.form,this),this._oldForm&&Ly(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(y(Sr,10),y(Gl,10),y(fu,8))},n.\u0275dir=X({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&z("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[nt([she]),ye,jn]}),n})();const lhe={provide:Ga,useExisting:hn(()=>Pg)};let Pg=(()=>{class n extends Ga{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new De,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=IS(0,o)}ngOnChanges(e){this._added||this._setUpControl(),AS(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Py(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(y(Po,13),y(Sr,10),y(Gl,10),y(Hr,10),y(MS,8))},n.\u0275dir=X({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[nt([lhe]),ye,jn]}),n})();let pu=(()=>{class n{constructor(){this._validator=Dy}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Dy,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,features:[jn]}),n})();const bhe={provide:Sr,useExisting:hn(()=>Uy),multi:!0};let Uy=(()=>{class n extends pu{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=af,this.createValidator=e=>hV}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&vt("required",i._enabled?"":null)},inputs:{required:"required"},features:[nt([bhe]),ye]}),n})();const xhe={provide:Sr,useExisting:hn(()=>NS),multi:!0};let NS=(()=>{class n extends pu{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>function XV(n){return"number"==typeof n?n:parseInt(n,10)}(e),this.createValidator=e=>pV(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&vt("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[nt([xhe]),ye]}),n})();const Che={provide:Sr,useExisting:hn(()=>zy),multi:!0};let zy=(()=>{class n extends pu{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>_V(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&vt("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[nt([Che]),ye]}),n})(),n8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[$V]}),n})();class i8 extends Fy{constructor(t,e,i){super(ES(e),TS(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){PV(this,!1,t),t.forEach((i,r)=>{FV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function r8(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let o8=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return r8(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Pf(r,o)}record(e,i=null){const r=this._reduceControls(e);return new OV(r,i)}control(e,i,r){let o={};return this.useNonNullable?(r8(i)?o=i:(o.validators=i,o.asyncValidators=r),new Qo(e,{...o,nonNullable:!0})):new Qo(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new i8(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Qo||e instanceof Fy?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),LS=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:fu,useValue:e.callSetDisabledState??Ig}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[n8]}),n})(),khe=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:MS,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:fu,useValue:e.callSetDisabledState??Ig}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[n8]}),n})();const Ehe=["matFormFieldNotchedOutline",""],The=["*"],She=["textField"],Dhe=["iconPrefixContainer"],Ahe=["textPrefixContainer"];function Ihe(n,t){1&n&&_e(0,"span",19)}function Mhe(n,t){if(1&n){const e=Le();_(0,"label",17),z("cdkObserveContent",function(){return he(e),fe(O(2)._refreshOutlineNotchWidth())}),dt(1,1),A(2,Ihe,1,0,"span",18),v()}if(2&n){const e=O(2);E("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),vt("for",e._control.id)("aria-owns",e._control.id),x(2),E("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Rhe(n,t){1&n&&A(0,Mhe,3,6,"label",16),2&n&&E("ngIf",O()._hasFloatingLabel())}function Fhe(n,t){1&n&&_e(0,"div",20)}function Phe(n,t){}function Ohe(n,t){1&n&&A(0,Phe,0,0,"ng-template",22),2&n&&(O(2),E("ngTemplateOutlet",Pt(1)))}function Nhe(n,t){if(1&n&&(_(0,"div",21),A(1,Ohe,1,1,"ng-template",9),v()),2&n){const e=O();E("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),x(1),E("ngIf",!e._forceDisplayInfixLabel())}}function Lhe(n,t){1&n&&(_(0,"div",23,24),dt(2,2),v())}function Bhe(n,t){1&n&&(_(0,"div",25,26),dt(2,3),v())}function Vhe(n,t){}function Uhe(n,t){1&n&&A(0,Vhe,0,0,"ng-template",22),2&n&&(O(),E("ngTemplateOutlet",Pt(1)))}function Hhe(n,t){1&n&&(_(0,"div",27),dt(1,4),v())}function zhe(n,t){1&n&&(_(0,"div",28),dt(1,5),v())}function jhe(n,t){1&n&&_e(0,"div",29)}function $he(n,t){1&n&&(_(0,"div",30),dt(1,6),v()),2&n&&E("@transitionMessages",O()._subscriptAnimationState)}function Ghe(n,t){if(1&n&&(_(0,"mat-hint",34),C(1),v()),2&n){const e=O(2);E("id",e._hintLabelId),x(1),Je(e.hintLabel)}}function Whe(n,t){if(1&n&&(_(0,"div",31),A(1,Ghe,2,2,"mat-hint",32),dt(2,7),_e(3,"div",33),dt(4,8),v()),2&n){const e=O();E("@transitionMessages",e._subscriptAnimationState),x(1),E("ngIf",e.hintLabel)}}const qhe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Qhe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let gs=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-label"]]}),n})(),Khe=0;const s8=new ae("MatError");let a8=(()=>{class n{constructor(e,i){this.id="mat-mdc-error-"+Khe++,e||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(e){return new(e||n)(Ms("aria-live"),y(Ne))},n.\u0275dir=X({type:n,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(e,i){2&e&&Ba("id",i.id)},inputs:{id:"id"},features:[nt([{provide:s8,useExisting:n}])]}),n})(),Xhe=0,gu=(()=>{class n{constructor(){this.align="start",this.id="mat-mdc-hint-"+Xhe++}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(e,i){2&e&&(Ba("id",i.id),vt("align",null),ot("mat-mdc-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"}}),n})();const Yhe=new ae("MatPrefix"),c8=new ae("MatSuffix");let l8=(()=>{class n{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:["matTextSuffix","_isTextSelector"]},features:[nt([{provide:c8,useExisting:n}])]}),n})(),d8=(()=>{class n{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function Zhe(n){if(null!==n.offsetParent)return n.scrollWidth;const e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);const i=e.scrollWidth;return e.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return n.\u0275fac=function(e){return new(e||n)(y(Ne))},n.\u0275dir=X({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mdc-floating-label--float-above",i.floating)},inputs:{floating:"floating"}}),n})();const u8="mdc-line-ripple--active",jy="mdc-line-ripple--deactivating";let h8=(()=>{class n{constructor(e,i){this._elementRef=e,this._handleTransitionEnd=r=>{const o=this._elementRef.nativeElement.classList,s=o.contains(jy);"opacity"===r.propertyName&&s&&o.remove(u8,jy)},i.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(jy),e.add(u8)}deactivate(){this._elementRef.nativeElement.classList.add(jy)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Ye))},n.\u0275dir=X({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),n})(),f8=(()=>{class n{constructor(e,i){this._elementRef=e,this._ngZone=i,this.labelWidth=0,this.open=!1}ngAfterViewInit(){const e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Ye))},n.\u0275cmp=Ve({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mdc-notched-outline--notched",i.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:Ehe,ngContentSelectors:The,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(e,i){1&e&&(Rn(),_e(0,"div",0),_(1,"div",1),dt(2),v(),_e(3,"div",2)),2&e&&(x(1),Ai("width",i._getNotchWidth()))},encapsulation:2,changeDetection:0}),n})();const Jhe={transitionMessages:$n("transitionMessages",[pn("enter",ze({opacity:1,transform:"translateY(0%)"})),Qt("void => enter",[ze({opacity:0,transform:"translateY(-5px)"}),Gt("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let $y=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n}),n})();const Gy=new ae("MatFormField"),efe=new ae("MAT_FORM_FIELD_DEFAULT_OPTIONS");let m8=0,ba=(()=>{class n{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ke(e)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(e){const i=this._appearance;this._appearance=e||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}constructor(e,i,r,o,s,a,c,l){this._elementRef=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=o,this._platform=s,this._defaults=a,this._animationMode=c,this._document=l,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+m8++,this._hintLabelId="mat-mdc-hint-"+m8++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Me,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,a&&(a.appearance&&(this.appearance=a.appearance),this._hideRequiredMarker=Boolean(a?.hideRequiredMarker),a.color&&(this.color=a.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${e.controlType}`),e.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(St(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),oi(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(St(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(St(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(e){const i=this._control?this._control.ngControl:null;return i&&i[e]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(o=>"start"===o.align):null,r=this._hintChildren?this._hintChildren.find(o=>"end"===o.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const e=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(e.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,o=i?.getBoundingClientRect().width??0,s=r?.getBoundingClientRect().width??0;e.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${o+s}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const e=this._elementRef.nativeElement;if(e.getRootNode){const i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(Ye),y(Hi),y(Hn),y(efe,8),y(Jn,8),y(gt))},n.\u0275cmp=Ve({type:n,selectors:[["mat-form-field"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,gs,5),qt(r,gs,7),qt(r,$y,5),qt(r,Yhe,5),qt(r,c8,5),qt(r,s8,5),qt(r,gu,5)),2&e){let o;Ae(o=Ie())&&(i._labelChildNonStatic=o.first),Ae(o=Ie())&&(i._labelChildStatic=o.first),Ae(o=Ie())&&(i._formFieldControl=o.first),Ae(o=Ie())&&(i._prefixChildren=o),Ae(o=Ie())&&(i._suffixChildren=o),Ae(o=Ie())&&(i._errorChildren=o),Ae(o=Ie())&&(i._hintChildren=o)}},viewQuery:function(e,i){if(1&e&&(pt(She,5),pt(Dhe,5),pt(Ahe,5),pt(d8,5),pt(f8,5),pt(h8,5)),2&e){let r;Ae(r=Ie())&&(i._textField=r.first),Ae(r=Ie())&&(i._iconPrefixContainer=r.first),Ae(r=Ie())&&(i._textPrefixContainer=r.first),Ae(r=Ie())&&(i._floatingLabel=r.first),Ae(r=Ie())&&(i._notchedOutline=r.first),Ae(r=Ie())&&(i._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,i){2&e&&ot("mat-mdc-form-field-label-always-float",i._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",i._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",i._hasIconSuffix)("mat-form-field-invalid",i._control.errorState)("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===i._animationMode)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-hide-placeholder",i._hasFloatingLabel()&&!i._shouldLabelFloat())("mat-focused",i._control.focused)("mat-primary","accent"!==i.color&&"warn"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("ng-untouched",i._shouldForward("untouched"))("ng-touched",i._shouldForward("touched"))("ng-pristine",i._shouldForward("pristine"))("ng-dirty",i._shouldForward("dirty"))("ng-valid",i._shouldForward("valid"))("ng-invalid",i._shouldForward("invalid"))("ng-pending",i._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nt([{provide:Gy,useExisting:n}])],ngContentSelectors:Qhe,decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(e,i){1&e&&(Rn(qhe),A(0,Rhe,1,1,"ng-template",null,0,Xd),_(2,"div",1,2),z("click",function(o){return i._control.onContainerClick&&i._control.onContainerClick(o)}),A(4,Fhe,1,0,"div",3),_(5,"div",4),A(6,Nhe,2,3,"div",5),A(7,Lhe,3,0,"div",6),A(8,Bhe,3,0,"div",7),_(9,"div",8),A(10,Uhe,1,1,"ng-template",9),dt(11),v(),A(12,Hhe,2,0,"div",10),A(13,zhe,2,0,"div",11),v(),A(14,jhe,1,0,"div",12),v(),_(15,"div",13),A(16,$he,2,1,"div",14),A(17,Whe,5,2,"div",15),v()),2&e&&(x(2),ot("mdc-text-field--filled",!i._hasOutline())("mdc-text-field--outlined",i._hasOutline())("mdc-text-field--no-label",!i._hasFloatingLabel())("mdc-text-field--disabled",i._control.disabled)("mdc-text-field--invalid",i._control.errorState),x(2),E("ngIf",!i._hasOutline()&&!i._control.disabled),x(2),E("ngIf",i._hasOutline()),x(1),E("ngIf",i._hasIconPrefix),x(1),E("ngIf",i._hasTextPrefix),x(2),E("ngIf",!i._hasOutline()||i._forceDisplayInfixLabel()),x(2),E("ngIf",i._hasTextSuffix),x(1),E("ngIf",i._hasIconSuffix),x(1),E("ngIf",!i._hasOutline()),x(1),ot("mat-mdc-form-field-subscript-dynamic-size","dynamic"===i.subscriptSizing),E("ngSwitch",i._getDisplayedMessages()),x(1),E("ngSwitchCase","error"),x(1),E("ngSwitchCase","hint"))},dependencies:[ri,pv,Vp,TE,BT,gu,d8,f8,h8],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[Jhe.transitionMessages]},changeDetection:0}),n})(),Wy=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Br,Jv,Ft]}),n})();const ife=["panel"];function rfe(n,t){if(1&n&&(_(0,"div",0,1),dt(2),v()),2&n){const e=t.id,i=O();E("id",i.id)("ngClass",i._classList)("@panelAnimation",i.isOpen?"visible":"hidden"),vt("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}const ofe=["*"],sfe=$n("panelAnimation",[pn("void, hidden",ze({opacity:0,transform:"scaleY(0.8)"})),Qt(":enter, hidden => visible",[XT([Gt("0.03s linear",ze({opacity:1})),Gt("0.12s cubic-bezier(0, 0, 0.2, 1)",ze({transform:"scaleY(1)"}))])]),Qt(":leave, visible => hidden",[Gt("0.075s linear",ze({opacity:0}))])]);let afe=0;class cfe{constructor(t,e){this.source=t,this.option=e}}const lfe=Ol(class{}),_8=new ae("mat-autocomplete-default-options",{providedIn:"root",factory:function dfe(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1}}});let ufe=(()=>{class n extends lfe{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._setThemeClasses(this._classList)}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=Ke(e)}get autoSelectActiveOption(){return this._autoSelectActiveOption}set autoSelectActiveOption(e){this._autoSelectActiveOption=Ke(e)}set classList(e){this._classList=e&&e.length?function zae(n,t=/\s+/){const e=[];if(null!=n){const i=Array.isArray(n)?n:`${n}`.split(t);for(const r of i){const o=`${r}`.trim();o&&e.push(o)}}return e}(e).reduce((i,r)=>(i[r]=!0,i),{}):{},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}constructor(e,i,r,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._defaults=r,this._activeOptionChanges=lt.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this._autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this._autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.optionSelected=new De,this.opened=new De,this.closed=new De,this.optionActivated=new De,this._classList={},this.id="mat-autocomplete-"+afe++,this.inertGroups=o?.SAFARI||!1}ngAfterContentInit(){this._keyManager=new JB(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){const i=new cfe(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){return this.ariaLabel?null:this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}_setThemeClasses(e){e["mat-primary"]="primary"===this._color,e["mat-warn"]="warn"===this._color,e["mat-accent"]="accent"===this._color}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(Ne),y(_8),y(Hn))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&(pt(Un,7),pt(ife,5)),2&e){let r;Ae(r=Ie())&&(i.template=r.first),Ae(r=Ie())&&(i.panel=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",autoSelectActiveOption:"autoSelectActiveOption",panelWidth:"panelWidth",classList:["class","classList"]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[ye]}),n})(),hfe=(()=>{class n extends ufe{constructor(){super(...arguments),this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=Ke(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,QT,5),qt(r,Ll,5)),2&e){let o;Ae(o=Ie())&&(i.optionGroups=o),Ae(o=Ie())&&(i.options=o)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{disableRipple:"disableRipple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matAutocomplete"],features:[nt([{provide:qT,useExisting:n}]),ye],ngContentSelectors:ofe,decls:1,vars:0,consts:[["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"],["panel",""]],template:function(e,i){1&e&&(Rn(),A(0,rfe,3,5,"ng-template"))},dependencies:[ha],styles:[".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mdc-menu-surface.mat-mdc-autocomplete-panel{width:100%;max-height:256px;position:static;visibility:hidden;transform-origin:center top;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-autocomplete-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) .mdc-menu-surface.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above .mdc-menu-surface.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[sfe]},changeDetection:0}),n})();const ffe={provide:Hr,useExisting:hn(()=>v8),multi:!0},b8=new ae("mat-autocomplete-scroll-strategy"),pfe={provide:b8,deps:[ao],useFactory:function mfe(n){return()=>n.scrollStrategies.reposition()}};let gfe=(()=>{class n{get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=Ke(e)}constructor(e,i,r,o,s,a,c,l,d,u,h){this._element=e,this._overlay=i,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=s,this._dir=c,this._formField=l,this._document=d,this._viewportRuler=u,this._defaults=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=lt.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Me,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=lf(()=>{const f=this.autocomplete?this.autocomplete.options:null;return f?f.changes.pipe(er(f),Ji(()=>oi(...f.map(m=>m.onSelectionChange)))):this._zone.onStable.pipe(An(1),Ji(()=>this.optionSelections))}),this._scrollStrategy=a}ngAfterViewInit(){const e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return oi(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(mn(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(mn(()=>this._overlayAttached)):it()).pipe(ct(e=>e instanceof _5?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return oi(ga(this._document,"click"),ga(this._document,"auxclick"),ga(this._document,"touchend")).pipe(mn(e=>{const i=fs(e),r=this._formField?this._formField._elementRef.nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&i!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(i))&&(!o||!o.contains(i))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(i)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){const i=e.keyCode,r=so(e);if(27===i&&!r&&e.preventDefault(),this.activeOption&&13===i&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){const o=this.autocomplete._keyManager.activeItem,s=38===i||40===i;9===i||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this.openPanel(),(s||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._element.nativeElement.value),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,r=i.value;"number"===i.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r&&(this._previousValue=r,this._pendingAutoselectedOption=null,this._onChange(r),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this.openPanel()}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return oi(this._zone.onStable.pipe(An(1)),this.autocomplete.options.changes.pipe(gi(()=>this._positionStrategy.reapplyLastPosition()),sS(0))).pipe(Ji(()=>(this._zone.run(()=>{const r=this.panelOpen;this._resetActiveItem(),this.autocomplete._setVisibility(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this.autocomplete.opened.emit():this.autocomplete.closed.emit())}),this.panelClosingActions)),An(1)).subscribe(r=>this._setValueAndClose(r))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_assignOptionValue(e){const i=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e;this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){const i=e?e.source:this._pendingAutoselectedOption;i&&(this._clearPreviousSelectedOption(i),this._assignOptionValue(i.value),this._onChange(i.value),this.autocomplete._emitSelectEvent(i),this._element.nativeElement.focus()),this.closePanel()}_clearPreviousSelectedOption(e){this.autocomplete.options.forEach(i=>{i!==e&&i.selected&&i.deselect()})}_attachOverlay(){let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new Lc(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,this._handleOverlayEvents(e),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})})),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new Sf({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){const e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){const i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];let s;s="above"===this.position?o:"below"===this.position?i:[...i,...o],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const e=this.autocomplete;e.autoActiveFirstOption?e._keyManager.setFirstItemActive():e._keyManager.setActiveItem(-1)}_canOpen(){const e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(e){const i=this.autocomplete,r=b5(e,i.options,i.optionGroups);if(0===e&&1===r)i._setScrollTop(0);else if(i.panel){const o=i.options.toArray()[e];if(o){const s=o._getHostElement(),a=v5(s.offsetTop,s.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(a)}}}_handleOverlayEvents(e){e.keydownEvents().subscribe(i=>{(27===i.keyCode&&!so(i)||38===i.keyCode&&so(i,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),i.stopPropagation(),i.preventDefault())}),e.outsidePointerEvents().subscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ao),y(ii),y(Ye),y(an),y(b8),y(Hi,8),y(Gy,9),y(gt,8),y(_a),y(_8,8))},n.\u0275dir=X({type:n,inputs:{autocomplete:["matAutocomplete","autocomplete"],position:["matAutocompletePosition","position"],connectedTo:["matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"]},features:[jn]}),n})(),v8=(()=>{class n extends gfe{constructor(){super(...arguments),this._aboveClass="mat-mdc-autocomplete-panel-above"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(e,i){1&e&&z("focusin",function(){return i._handleFocus()})("blur",function(){return i._onTouched()})("input",function(o){return i._handleInput(o)})("keydown",function(o){return i._handleKeydown(o)})("click",function(){return i._handleClick()}),2&e&&vt("autocomplete",i.autocompleteAttribute)("role",i.autocompleteDisabled?null:"combobox")("aria-autocomplete",i.autocompleteDisabled?null:"list")("aria-activedescendant",i.panelOpen&&i.activeOption?i.activeOption.id:null)("aria-expanded",i.autocompleteDisabled?null:i.panelOpen.toString())("aria-owns",i.autocompleteDisabled||!i.panelOpen||null==i.autocomplete?null:i.autocomplete.id)("aria-haspopup",i.autocompleteDisabled?null:"listbox")},exportAs:["matAutocompleteTrigger"],features:[nt([ffe]),ye]}),n})(),_fe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[pfe],imports:[au,sy,Ft,Br,Vc,sy,Ft]}),n})();const y8=pa({passive:!0});let bfe=(()=>{class n{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return ns;const i=Mi(e),r=this._monitoredElements.get(i);if(r)return r.subject;const o=new Me,s="cdk-text-field-autofilled",a=c=>{"cdk-text-field-autofill-start"!==c.animationName||i.classList.contains(s)?"cdk-text-field-autofill-end"===c.animationName&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!1}))):(i.classList.add(s),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,y8),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",a,y8)}}),o}stopMonitoring(e){const i=Mi(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}}return n.\u0275fac=function(e){return new(e||n)(Q(Hn),Q(Ye))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),vfe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const yfe=new ae("MAT_INPUT_VALUE_ACCESSOR"),xfe=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let wfe=0;const Cfe=l5(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new Me}});let ql=(()=>{class n extends Cfe{get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(Rf.required)??!1}set required(e){this._required=Ke(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&HB().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Ke(e)}constructor(e,i,r,o,s,a,c,l,d,u){super(a,o,s,r),this._elementRef=e,this._platform=i,this._autofillMonitor=l,this._formField=u,this._uid="mat-input-"+wfe++,this.focused=!1,this.stateChanges=new Me,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(m=>HB().has(m)),this._iOSKeyupListener=m=>{const g=m.target;!g.value&&0===g.selectionStart&&0===g.selectionEnd&&(g.setSelectionRange(1,1),g.setSelectionRange(0,0))};const h=this._elementRef.nativeElement,f=h.nodeName.toLowerCase();this._inputValueAccessor=c||h,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&d.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===f,this._isTextarea="textarea"===f,this._isInFormField=!!u,this._isNativeSelect&&(this.controlType=h.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){const e=this._getPlaceholder();if(e!==this._previousPlaceholder){const i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){xfe.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(Ga,10),y(mu,8),y(Wl,8),y(d5),y(yfe,10),y(bfe),y(Ye),y(Gy,8))},n.\u0275dir=X({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(e,i){1&e&&z("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&e&&(Ba("id",i.id)("disabled",i.disabled)("required",i.required),vt("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),ot("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[nt([{provide:$y,useExisting:n}]),ye,jn]}),n})(),kfe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Wy,Wy,vfe,Ft]}),n})();function Efe(n,t){if(1&n&&(_(0,"mat-label"),C(1),v()),2&n){const e=O();x(1),Je(e.binding.title)}}function Tfe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){return he(e),fe(O().clearInput())}),_(1,"mat-icon"),C(2,"close"),v()()}}function Sfe(n,t){1&n&&(_(0,"mat-option",8),_e(1,"mat-spinner",9),v())}function Dfe(n,t){if(1&n&&(_(0,"mat-option",10)(1,"span",11),C(2),v(),C(3),v()),2&n){const e=t.$implicit;E("value",e),x(2),Je(e.code),x(1),Qe("",e.display," ")}}let Og=(()=>{class n{static#e=this.nextId=0;constructor(e){this.terminologyService=e,this.term="",this.selectionChange=new De,this.formControl=new Yue,this.loading=!1,this.selectedConcept={},this.stateChanges=new Me,this.focused=!1,this.ngControl=null,this.errorState=!1,this.controlType="app-autocomplete-binding",this.id="app-autocomplete-binding-"+n.nextId++,this.describedBy="",this.onChange=()=>{},this.onTouched=()=>{}}get empty(){return!this.formControl.value}setDescribedByIds(e){this.describedBy=e.join(" ")}onContainerClick(e){}writeValue(e){this.formControl.setValue(e&&"object"==typeof e&&e.display?e.display:e,{emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}ngOnChanges(e){e.term&&(this.term=e.term.currentValue,this.formControl.setValue(this.term&&"object"==typeof this.term&&this.term.display?this.term.display:this.term))}ngOnInit(){this.autoFilter=this.formControl.valueChanges.pipe(Pc(300),ja(),Ji(e=>e?.length>=3?(this.loading=!0,this.terminologyService.expandValueSet(this.binding.ecl,e,0,50)):it([])),gi(e=>{this.loading=!1}))}onTermChange(){this.formControl.setValue(this.term)}optionSelected(e){this.selectedConcept=e,this.selectionChange.emit(e),this.onChange(e)}clearInput(){this.formControl.reset(),this.selectedConcept={code:"",display:""},this.selectionChange.emit(this.selectedConcept)}change(e){const i=e?.option?.value;i&&(this.optionSelected({code:i.code,display:i.display}),this.formControl.setValue(i.display))}static#t=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#n=this.\u0275cmp=Ve({type:n,selectors:[["app-autocomplete-binding"]],inputs:{binding:"binding",term:"term"},outputs:{selectionChange:"selectionChange"},features:[nt([{provide:Hr,useExisting:hn(()=>n),multi:!0},{provide:$y,useExisting:n}]),jn],decls:11,vars:10,consts:[[4,"ngIf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["auto","matAutocomplete"],["disabled","","class","loading",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["disabled","",1,"loading"],["diameter","35"],[3,"value"],[1,"code"]],template:function(i,r){if(1&i&&(_(0,"mat-form-field"),A(1,Efe,2,1,"mat-label",0),_e(2,"input",1),_(3,"mat-hint"),C(4),v(),A(5,Tfe,3,0,"button",2),_(6,"mat-autocomplete",3,4),z("optionSelected",function(s){return r.change(s)}),A(8,Sfe,2,0,"mat-option",5),A(9,Dfe,4,3,"mat-option",6),no(10,"async"),v()()),2&i){const o=Pt(7);let s;x(1),E("ngIf",r.binding.title),x(1),Xh("placeholder",(null==r.formControl.value?null:r.formControl.value.display)||r.binding.title||"Search..."),E("formControl",r.formControl)("matAutocomplete",o),x(2),Je(r.binding.note),x(1),E("ngIf",r.formControl.value),x(3),E("ngIf",r.loading),x(1),E("ngForOf",null==(s=Va(10,8,r.autoFilter))||null==s.expansion?null:s.expansion.contains)}},dependencies:[io,ri,Vs,co,ba,gs,gu,l8,hfe,Ll,v8,Bl,ql,Us,qo,Vy,SE],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}.id-icon[_ngcontent-%COMP%]{margin-left:10px;color:#2e8b57}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();function Afe(n,t){1&n&&_e(0,"mat-spinner",20)}function Ife(n,t){1&n&&(_(0,"th",21),C(1," Date "),v())}function Mfe(n,t){if(1&n&&(_(0,"td",22),C(1),no(2,"date"),v()),2&n){const e=t.$implicit;x(1),Qe(" ",Kd(2,1,e.date,"yyyy-MM-dd")," ")}}function Rfe(n,t){1&n&&(_(0,"th",21),C(1," ConceptId "),v())}function Ffe(n,t){if(1&n&&(_(0,"td",22),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.code," ")}}function Pfe(n,t){1&n&&(_(0,"th",21),C(1," Term "),v())}function Ofe(n,t){1&n&&(_(0,"span",24),C(1,"Allergy / Intolerance condition"),v())}function Nfe(n,t){if(1&n&&(_(0,"td",22),A(1,Ofe,2,0,"span",23),C(2),v()),2&n){const e=t.$implicit;x(1),E("ngIf",e.allergy),x(1),Qe(" ",e.display," ")}}function Lfe(n,t){1&n&&_e(0,"tr",25)}function Bfe(n,t){1&n&&_e(0,"tr",26)}function Vfe(n,t){1&n&&(_(0,"th",21),C(1," ConceptId "),v())}function Ufe(n,t){if(1&n&&(_(0,"td",22),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.code," ")}}function Hfe(n,t){1&n&&(_(0,"th",21),C(1," Term "),v())}function zfe(n,t){if(1&n&&(_(0,"td",22),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.display," ")}}function jfe(n,t){1&n&&_e(0,"tr",25)}function $fe(n,t){1&n&&_e(0,"tr",26)}const Gfe=[],Wfe=[];let x8=(()=>{class n{constructor(e){this.terminologyService=e,this.problemBinding={ecl:"< 404684003 |Clinical finding|",title:"Search..."},this.eclProblem="< 404684003 |Clinical finding|",this.term="",this.displayedColumns=["date","code","display"],this.dataToDisplay=[...Gfe],this.dataSource=new qfe(this.dataToDisplay),this.loading=!1,this.displayedColumns2=["code","display"],this.dataToDisplay2=[...Wfe],this.dataSource2=new Qfe(this.dataToDisplay2)}updateProblem(e){var i=this;return xe(function*(){i.selectedProblemSct=e})()}addProblem(e){var i=this;return xe(function*(){if(i.selectedProblemSct||e){let r=e||i.selectedProblemSct;if(i.loading=!0,i.term=r.display,r.date=new Date,r.code.indexOf(":")>-1){r.allergy=!0;let o=r.substance;i.dataToDisplay2.find(s=>s.code===o.code)||(i.dataToDisplay2=[...i.dataToDisplay2,o],i.dataSource2.setData(i.dataToDisplay2))}else(yield i.getAllergyData(r))?.expansion?.contains?.length>0&&(r.allergy=!0,i.addAllergySubstanceToList(r));i.dataToDisplay.find(o=>o.code===r.code)||(i.dataToDisplay=[...i.dataToDisplay,r],i.dataSource.setData(i.dataToDisplay)),i.loading=!1,i.term=""}})()}addAllergySubstanceToList(e){var i=this;return xe(function*(){(yield i.getAllergySubstance(e))?.expansion?.contains?.forEach(o=>{i.dataToDisplay2.find(s=>s.code===o.code)||(i.dataToDisplay2=[...i.dataToDisplay2,o],i.dataSource2.setData(i.dataToDisplay2))})})()}getAllergyData(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet("<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",e.code,0,1)).pipe(ct(o=>o)))})()}getAllergySubstance(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`${e.code} |${e.display}| . (246075003 |Causative agent (attribute)| OR 47429007 |Associated with (attribute)|)`,"")).pipe(ct(o=>o)))})()}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies-problem-list"]],decls:60,vars:11,consts:[["id","main-card"],[1,"container-space"],[1,"problem-list"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",1,"long-tooltip",3,"disableRipple","click"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],[1,"container"],[1,"item"],[3,"binding","term","selectionChange"],["mat-flat-button","","color","primary",3,"click"],["diameter","35",4,"ngIf"],["mat-table","",3,"dataSource"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","code"],["matColumnDef","display"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35"],["mat-header-cell",""],["mat-cell",""],["class","tag pill",4,"ngIf"],[1,"tag","pill"],["mat-header-row",""],["mat-row",""]],template:function(i,r){if(1&i&&(_(0,"mat-card",0)(1,"div",1)(2,"div",2)(3,"h4"),C(4,"Problem List "),_(5,"button",3)(6,"mat-icon"),C(7,"info"),v()(),_(8,"mat-menu",null,4)(10,"span",5),z("click",function(s){return s.stopPropagation()}),_(11,"h4"),C(12,"Problem list"),v(),_(13,"p"),C(14,"Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),v(),_(15,"p"),C(16,"For practical guidance using SNOMED CT to document hypersensitivity to specific substances in a problem list, it is suggested to map to the appropriate concepts under the 473011001 |Allergic condition (finding)|hierarchies. This is due to the lack of sufficient content under 609433001 |Hypersensitivity disposition (finding)|and 421961002 |Hypersensitivity reaction (disorder)| and that many of the concepts under 609328004 |Allergic disposition (finding)|and 419076005 |Allergic reaction (disorder)| have unclear mechanisms which may actually represent non-allergic hypersensitivity. Please note that SNOMED international does not plan to create new children concepts of hypersensitivity disposition to specific substances unless more than one Member country would submit a request for them to answer to an active use-case."),v(),_(17,"p"),C(18,"Almost all allergy concepts are modeled by substances in SNOMED CT. A very small number of allergy concepts are modeled by products but with explicit description for the specific intended meaning. Records of allergy to multiple substances or to multi-ingredient products should be recoded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),v(),_(19,"p"),C(20,"Vaccine allergy is an example where allergy concepts are modeled using a product concept. For example, \u2018Allergy to component of vaccine product (finding)\u2019 with a synonym \u2018vaccine allergy\u2019 has been modeled by vaccine product. The concept represents that allergy is caused by any substance in a vaccine product."),v(),_(21,"p"),C(22,"To record the level of certainty or verification status, it is recommended to use additional data elements in the EHR information model. Even though it is possible to utilize the SNOMED CT model for \u2018situation with explicit context\u2019 to express certainty, this is not recommended due to potential ambiguity. For example, \u201csuspected penicillin allergy\u201d can mean uncertainty with the condition (is it real allergy?) or with the causative agent (is it penicillin?). Even though SNOMED CT editorial guideline is clear that the first interpretation is correct, it is better to use other methods to represent the uncertainty to avoid confusion."),v(),_(23,"p"),C(24,"For more information check the "),_(25,"a",6),C(26,"Implementation Guide"),v(),C(27," developed by the SNOMED International Allergy Clinical Reference Group."),v()()()(),_(28,"div",7)(29,"div",8)(30,"app-autocomplete-binding",9),z("selectionChange",function(s){return r.updateProblem(s)}),v()(),_(31,"div",8)(32,"button",10),z("click",function(){return r.addProblem()}),C(33,"Add problem"),v()(),_(34,"div",8),A(35,Afe,1,0,"mat-spinner",11),v()(),_(36,"table",12),zt(37,13),A(38,Ife,2,0,"th",14),A(39,Mfe,3,4,"td",15),jt(),zt(40,16),A(41,Rfe,2,0,"th",14),A(42,Ffe,2,1,"td",15),jt(),zt(43,17),A(44,Pfe,2,0,"th",14),A(45,Nfe,3,2,"td",15),jt(),A(46,Lfe,1,0,"tr",18),A(47,Bfe,1,0,"tr",19),v()(),_(48,"div",2)(49,"h4"),C(50,"Substances the patient is allergic to:"),v(),_(51,"table",12),zt(52,16),A(53,Vfe,2,0,"th",14),A(54,Ufe,2,1,"td",15),jt(),zt(55,17),A(56,Hfe,2,0,"th",14),A(57,zfe,2,1,"td",15),jt(),A(58,jfe,1,0,"tr",18),A(59,$fe,1,0,"tr",19),v()()()()),2&i){const o=Pt(9);x(5),E("matMenuTriggerFor",o),x(5),E("disableRipple",!0),x(20),E("binding",r.problemBinding)("term",r.term),x(5),E("ngIf",r.loading),x(1),E("dataSource",r.dataSource),x(10),E("matHeaderRowDef",r.displayedColumns),x(1),E("matRowDefColumns",r.displayedColumns),x(4),E("dataSource",r.dataSource2),x(7),E("matHeaderRowDef",r.displayedColumns2),x(1),E("matRowDefColumns",r.displayedColumns2)}},dependencies:[ri,Fo,Vs,co,lu,$a,du,Bl,cS,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,Og,Jd],styles:["#main-card[_ngcontent-%COMP%]{padding:10px}app-autocomplete-binding[_ngcontent-%COMP%]{display:block;min-width:500px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin:10px 0;gap:10px}.container-space[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin:10px 0;gap:10px}.problem-list[_ngcontent-%COMP%]{width:60%}.tag[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding-left:10px;padding-right:10px;margin-top:5px}td[_ngcontent-%COMP%]{position:relative}.pill[_ngcontent-%COMP%]{display:inline-block;font-size:10px;background-color:orange;color:#fff;padding:4px 8px;border-radius:20px;position:absolute;top:0;right:0;margin-top:1rem}.mat-column-display[_ngcontent-%COMP%]{min-width:350px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return n})();class qfe extends yT{constructor(t){super(),this._dataStream=new TB,this.setData(t)}connect(){return this._dataStream}disconnect(){}setData(t){this._dataStream.next(t)}}class Qfe extends yT{constructor(t){super(),this._dataStream=new TB,this.setData(t)}connect(){return this._dataStream}disconnect(){}setData(t){this._dataStream.next(t)}}function Kfe(n,t){}const Xfe=function(n){return{animationDuration:n}},Yfe=function(n,t){return{value:n,params:t}};function Zfe(n,t){1&n&&dt(0)}const w8=["*"],Jfe=["tabListContainer"],eme=["tabList"],tme=["tabListInner"],nme=["nextPaginator"],ime=["previousPaginator"],rme=["tabBodyWrapper"],ome=["tabHeader"];function sme(n,t){}function ame(n,t){1&n&&A(0,sme,0,0,"ng-template",14),2&n&&E("cdkPortalOutlet",O().$implicit.templateLabel)}function cme(n,t){1&n&&C(0),2&n&&Je(O().$implicit.textLabel)}function lme(n,t){if(1&n){const e=Le();_(0,"div",6,7),z("click",function(){const r=he(e),o=r.$implicit,s=r.index,a=O(),c=Pt(1);return fe(a._handleClick(o,c,s))})("cdkFocusChange",function(r){const s=he(e).index;return fe(O()._tabFocusChanged(r,s))}),_e(2,"span",8)(3,"div",9),_(4,"span",10)(5,"span",11),A(6,ame,1,1,"ng-template",12),A(7,cme,1,1,"ng-template",null,13,Xd),v()()()}if(2&n){const e=t.$implicit,i=t.index,r=Pt(1),o=Pt(8),s=O();ot("mdc-tab--active",s.selectedIndex===i),E("id",s._getTabLabelId(i))("ngClass",e.labelClass)("disabled",e.disabled)("fitInkBarToContent",s.fitInkBarToContent),vt("tabIndex",s._getTabIndex(i))("aria-posinset",i+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(i))("aria-selected",s.selectedIndex===i)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),x(3),E("matRippleTrigger",r)("matRippleDisabled",e.disabled||s.disableRipple),x(3),E("ngIf",e.templateLabel)("ngIfElse",o)}}function dme(n,t){if(1&n){const e=Le();_(0,"mat-tab-body",15),z("_onCentered",function(){return he(e),fe(O()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return he(e),fe(O()._setTabBodyWrapperHeight(r))}),v()}if(2&n){const e=t.$implicit,i=t.index,r=O();ot("mat-mdc-tab-body-active",r.selectedIndex===i),E("id",r._getTabContentId(i))("ngClass",e.bodyClass)("content",e.content)("position",e.position)("origin",e.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),vt("tabindex",null!=r.contentTabIndex&&r.selectedIndex===i?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(i))}}const ume={translateTab:$n("translateTab",[pn("center, void, left-origin-center, right-origin-center",ze({transform:"none"})),pn("left",ze({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),pn("right",ze({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Qt("* => left, * => right, left => center, right => center",Gt("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Qt("void => left-origin-center",[ze({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Gt("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Qt("void => right-origin-center",[ze({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Gt("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let hme=(()=>{class n extends Bc{constructor(e,i,r,o){super(e,i,o),this._host=r,this._centeringSub=lt.EMPTY,this._leavingSub=lt.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(er(this._host._isCenterPosition(this._host._position))).subscribe(e=>{e&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(y(bl),y(ii),y(hn(()=>C8)),y(gt))},n.\u0275dir=X({type:n,selectors:[["","matTabBodyHost",""]],features:[ye]}),n})(),fme=(()=>{class n{set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(e,i,r){this._elementRef=e,this._dir=i,this._dirChangeSubscription=lt.EMPTY,this._translateTabComplete=new Me,this._onCentering=new De,this._beforeCentering=new De,this._afterLeavingCenter=new De,this._onCentered=new De(!0),this.animationDuration="500ms",this.preserveContent=!1,i&&(this._dirChangeSubscription=i.change.subscribe(o=>{this._computePositionAnimationState(o),r.markForCheck()})),this._translateTabComplete.pipe(ja((o,s)=>o.fromState===s.fromState&&o.toState===s.toState)).subscribe(o=>{this._isCenterPosition(o.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(o.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(e){const i=this._isCenterPosition(e.toState);this._beforeCentering.emit(i),i&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(e){return"center"==e||"left-origin-center"==e||"right-origin-center"==e}_computePositionAnimationState(e=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==e?"left":"right":this._positionIndex>0?"ltr"==e?"right":"left":"center"}_computePositionFromOrigin(e){const i=this._getLayoutDirection();return"ltr"==i&&e<=0||"rtl"==i&&e>0?"left-origin-center":"right-origin-center"}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hi,8),y(an))},n.\u0275dir=X({type:n,inputs:{_content:["content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),n})(),C8=(()=>{class n extends fme{constructor(e,i,r){super(e,i,r)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hi,8),y(an))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tab-body"]],viewQuery:function(e,i){if(1&e&&pt(Bc,5),2&e){let r;Ae(r=Ie())&&(i._portalHost=r.first)}},hostAttrs:[1,"mat-mdc-tab-body"],features:[ye],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-mdc-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(e,i){1&e&&(_(0,"div",0,1),z("@translateTab.start",function(o){return i._onTranslateTabStarted(o)})("@translateTab.done",function(o){return i._translateTabComplete.next(o)}),A(2,Kfe,0,0,"ng-template",2),v()),2&e&&E("@translateTab",Uk(3,Yfe,i._position,la(1,Xfe,i.animationDuration)))},dependencies:[hme],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[ume.translateTab]}}),n})();const mme=new ae("MatTabContent");let pme=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(y(Un))},n.\u0275dir=X({type:n,selectors:[["","matTabContent",""]],features:[nt([{provide:mme,useExisting:n}])]}),n})();const gme=new ae("MatTabLabel"),k8=new ae("MAT_TAB");let _me=(()=>{class n extends Yce{constructor(e,i,r){super(e,i),this._closestTab=r}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(ii),y(k8,8))},n.\u0275dir=X({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[nt([{provide:gme,useExisting:n}]),ye]}),n})();const BS="mdc-tab-indicator--active",E8="mdc-tab-indicator--no-transition";class bme{constructor(t){this._items=t}hide(){this._items.forEach(t=>t.deactivateInkBar())}alignToElement(t){const e=this._items.find(r=>r.elementRef.nativeElement===t),i=this._currentItem;if(i?.deactivateInkBar(),e){const r=i?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(r),this._currentItem=e}}}function vme(n){return class extends n{constructor(...t){super(...t),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){const e=Ke(t);this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){const e=this.elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement)return void e.classList.add(BS);const i=e.getBoundingClientRect(),r=t.width/i.width,o=t.left-i.left;e.classList.add(E8),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${r})`),e.getBoundingClientRect(),e.classList.remove(E8),e.classList.add(BS),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this.elementRef.nativeElement.classList.remove(BS)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){const t=this.elementRef.nativeElement.ownerDocument||document;this._inkBarElement=t.createElement("span"),this._inkBarContentElement=t.createElement("span"),this._inkBarElement.className="mdc-tab-indicator",this._inkBarContentElement.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",this._inkBarElement.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this.elementRef.nativeElement.querySelector(".mdc-tab__content"):this.elementRef.nativeElement).appendChild(this._inkBarElement)}}}const xme=Oc(class{}),wme=vme((()=>{class n extends xme{constructor(e){super(),this.elementRef=e}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}}return n.\u0275fac=function(e){return new(e||n)(y(Ne))},n.\u0275dir=X({type:n,features:[ye]}),n})());let T8=(()=>{class n extends wme{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){2&e&&(vt("aria-disabled",!!i.disabled),ot("mat-mdc-tab-disabled",i.disabled))},inputs:{disabled:"disabled",fitInkBarToContent:"fitInkBarToContent"},features:[ye]}),n})();const Cme=Oc(class{}),S8=new ae("MAT_TAB_GROUP");let kme=(()=>{class n extends Cme{get content(){return this._contentPortal}constructor(e,i){super(),this._viewContainerRef=e,this._closestTabGroup=i,this.textLabel="",this._contentPortal=null,this._stateChanges=new Me,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Lc(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}}return n.\u0275fac=function(e){return new(e||n)(y(ii),y(S8,8))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt(Un,7),2&e){let r;Ae(r=Ie())&&(i._implicitContent=r.first)}},inputs:{textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},features:[ye,jn]}),n})(),qy=(()=>{class n extends kme{get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-tab"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,pme,7,Un),qt(r,_me,5)),2&e){let o;Ae(o=Ie())&&(i._explicitContent=o.first),Ae(o=Ie())&&(i.templateLabel=o.first)}},inputs:{disabled:"disabled"},exportAs:["matTab"],features:[nt([{provide:k8,useExisting:n}]),ye],ngContentSelectors:w8,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),A(0,Zfe,1,0,"ng-template"))},encapsulation:2}),n})();const D8=pa({passive:!0});let Sme=(()=>{class n{get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Ke(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=gr(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}constructor(e,i,r,o,s,a,c){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=o,this._ngZone=s,this._platform=a,this._animationMode=c,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Me,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Me,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new De,this.indexFocused=new De,s.runOutsideAngular(()=>{ga(e.nativeElement,"mouseleave").pipe(St(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){ga(this._previousPaginator.nativeElement,"touchstart",D8).pipe(St(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),ga(this._nextPaginator.nativeElement,"touchstart",D8).pipe(St(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const e=this._dir?this._dir.change:it("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new zT(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(An(1)).subscribe(r),oi(e,i,this._items.changes,this._itemsResized()).pipe(St(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return"function"!=typeof ResizeObserver?ns:this._items.changes.pipe(er(this._items),Ji(e=>new Dn(i=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(o=>i.next(o));return e.forEach(o=>r.observe(o.elementRef.nativeElement)),()=>{r.disconnect()}}))),LT(1),mn(e=>e.some(i=>i.contentRect.width>0&&i.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!so(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){const i=this._items.get(this.focusIndex);i&&!i.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){const e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return!this._items||!!this._items.toArray()[e]}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();const i=this._tabListContainer.nativeElement;i.scrollLeft="ltr"==this._getLayoutDirection()?0:i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const e=this.scrollDistance,i="ltr"===this._getLayoutDirection()?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){return this._scrollTo(this._scrollDistance+("before"==e?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;const i=this._items?this._items.toArray()[e]:null;if(!i)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:s}=i.elementRef.nativeElement;let a,c;"ltr"==this._getLayoutDirection()?(a=o,c=a+s):(c=this._tabListInner.nativeElement.offsetWidth-o,a=c-s);const l=this.scrollDistance,d=this.scrollDistance+r;ad&&(this.scrollDistance+=Math.min(c-d,a-l))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const e=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=e}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&null!=i.button&&0!==i.button||(this._stopInterval(),yg(650,100).pipe(St(oi(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:o}=this._scrollHeader(e);(0===o||o>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(_a),y(Hi,8),y(Ye),y(Hn),y(Jn,8))},n.\u0275dir=X({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),Dme=(()=>{class n extends Sme{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Ke(e)}constructor(e,i,r,o,s,a,c){super(e,i,r,o,s,a,c),this._disableRipple=!1}_itemSelected(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(_a),y(Hi,8),y(Ye),y(Hn),y(Jn,8))},n.\u0275dir=X({type:n,inputs:{disableRipple:"disableRipple"},features:[ye]}),n})(),Ame=(()=>{class n extends Dme{constructor(e,i,r,o,s,a,c){super(e,i,r,o,s,a,c)}ngAfterContentInit(){this._inkBar=new bme(this._items),super.ngAfterContentInit()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(_a),y(Hi,8),y(Ye),y(Hn),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,i,r){if(1&e&&qt(r,T8,4),2&e){let o;Ae(o=Ie())&&(i._items=o)}},viewQuery:function(e,i){if(1&e&&(pt(Jfe,7),pt(eme,7),pt(tme,7),pt(nme,5),pt(ime,5)),2&e){let r;Ae(r=Ie())&&(i._tabListContainer=r.first),Ae(r=Ie())&&(i._tabList=r.first),Ae(r=Ie())&&(i._tabListInner=r.first),Ae(r=Ie())&&(i._nextPaginator=r.first),Ae(r=Ie())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-mdc-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==i._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[ye],ngContentSelectors:w8,decls:13,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-mdc-tab-labels"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(Rn(),_(0,"button",0,1),z("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),_e(2,"div",2),v(),_(3,"div",3,4),z("keydown",function(o){return i._handleKeydown(o)}),_(5,"div",5,6),z("cdkObserveContent",function(){return i._onContentChanges()}),_(7,"div",7,8),dt(9),v()()(),_(10,"button",9,10),z("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),_e(12,"div",2),v()),2&e&&(ot("mat-mdc-tab-header-pagination-disabled",i._disableScrollBefore),E("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),x(3),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode),x(7),ot("mat-mdc-tab-header-pagination-disabled",i._disableScrollAfter),E("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[Bs,BT],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2}),n})();const A8=new ae("MAT_TABS_CONFIG");let Ime=0;const Mme=Pl(Ol(class{constructor(n){this._elementRef=n}}),"primary");let Rme=(()=>{class n extends Mme{get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(e){this._dynamicHeight=Ke(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=gr(e,null)}get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e+"")?e+"ms":e}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=gr(e,null)}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Ke(e)}get preserveContent(){return this._preserveContent}set preserveContent(e){this._preserveContent=Ke(e)}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){const i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,i,r,o){super(e),this._changeDetectorRef=i,this._animationMode=o,this._tabs=new yl,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=lt.EMPTY,this._tabLabelSubscription=lt.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this._disablePagination=!1,this._preserveContent=!1,this.selectedIndexChange=new De,this.focusChange=new De,this.animationDone=new De,this.selectedTabChange=new De(!0),this._groupId=Ime++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,this.contentTabIndex=r?.contentTabIndex??null,this.preserveContent=!!r?.preserveContent}ngAfterContentChecked(){const e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){const i=null==this._selectedIndex;if(!i){this.selectedTabChange.emit(this._createChangeEvent(e));const r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,o)=>r.isActive=o===e),i||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((i,r)=>{i.position=r-e,null!=this._selectedIndex&&0==i.position&&!i.origin&&(i.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{const e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){const i=this._tabs.toArray();let r;for(let o=0;o{i[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(er(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(i=>i._closestTabGroup===this||!i._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){const i=this._tabHeader;i&&(i.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){const i=new Fme;return i.index=e,this._tabs&&this._tabs.length&&(i.tab=this._tabs.toArray()[e]),i}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=oi(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e){return`mat-tab-label-${this._groupId}-${e}`}_getTabContentId(e){return`mat-tab-content-${this._groupId}-${e}`}_setTabBodyWrapperHeight(e){if(!this._dynamicHeight||!this._tabBodyWrapperHeight)return;const i=this._tabBodyWrapper.nativeElement;i.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(i.style.height=e+"px")}_removeTabBodyWrapperHeight(){const e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this.animationDone.emit()}_handleClick(e,i,r){i.focusIndex=r,e.disabled||(this.selectedIndex=r)}_getTabIndex(e){return e===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(e,i){e&&"mouse"!==e&&"touch"!==e&&(this._tabHeader.focusIndex=i)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(A8,8),y(Jn,8))},n.\u0275dir=X({type:n,inputs:{dynamicHeight:"dynamicHeight",selectedIndex:"selectedIndex",headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:"contentTabIndex",disablePagination:"disablePagination",preserveContent:"preserveContent",backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},features:[ye]}),n})(),Ng=(()=>{class n extends Rme{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=Ke(e),this._changeDetectorRef.markForCheck()}get stretchTabs(){return this._stretchTabs}set stretchTabs(e){this._stretchTabs=Ke(e)}constructor(e,i,r,o){super(e,i,r,o),this._fitInkBarToContent=!1,this._stretchTabs=!0,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(A8,8),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tab-group"]],contentQueries:function(e,i,r){if(1&e&&qt(r,qy,5),2&e){let o;Ae(o=Ie())&&(i._allTabs=o)}},viewQuery:function(e,i){if(1&e&&(pt(rme,5),pt(ome,5)),2&e){let r;Ae(r=Ie())&&(i._tabBodyWrapper=r.first),Ae(r=Ie())&&(i._tabHeader=r.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:6,hostBindings:function(e,i){2&e&&ot("mat-mdc-tab-group-dynamic-height",i.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===i.headerPosition)("mat-mdc-tab-group-stretch-tabs",i.stretchTabs)},inputs:{color:"color",disableRipple:"disableRipple",fitInkBarToContent:"fitInkBarToContent",stretchTabs:["mat-stretch-tabs","stretchTabs"]},exportAs:["matTabGroup"],features:[nt([{provide:S8,useExisting:n}]),ye],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mdc-tab mat-mdc-tab mat-mdc-focus-indicator","role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",3,"id","mdc-tab--active","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange",4,"ngFor","ngForOf"],[1,"mat-mdc-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-mdc-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange"],["tabNode",""],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"ngIf","ngIfElse"],["tabTextLabel",""],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering"]],template:function(e,i){1&e&&(_(0,"mat-tab-header",0,1),z("indexFocused",function(o){return i._focusChanged(o)})("selectFocusedIndex",function(o){return i.selectedIndex=o}),A(2,lme,9,17,"div",2),v(),_(3,"div",3,4),A(5,dme,1,11,"mat-tab-body",5),v()),2&e&&(E("selectedIndex",i.selectedIndex||0)("disableRipple",i.disableRipple)("disablePagination",i.disablePagination),x(2),E("ngForOf",i._tabs),x(1),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode),x(2),E("ngForOf",i._tabs))},dependencies:[ha,io,ri,Bc,Bs,pce,C8,T8,Ame],styles:['.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-tab.mdc-tab{height:48px;flex-grow:0}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.mat-mdc-tab .mdc-tab__text-label{display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-disabled{opacity:.4}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-mdc-tab-header-with-background-background-color, transparent)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2}),n})();class Fme{}let Pme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft,ru,Nl,Jv,GT,Ft]}),n})();var Wa=Qr(327);class Ome{constructor(t,e){this._document=e;const i=this._textarea=this._document.createElement("textarea"),r=i.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",i.setAttribute("aria-hidden","true"),i.value=t,i.readOnly=!0,this._document.body.appendChild(i)}copy(){const t=this._textarea;let e=!1;try{if(t){const i=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),i&&i.focus()}}catch{}return e}destroy(){const t=this._textarea;t&&(t.remove(),this._textarea=void 0)}}let VS=(()=>{class n{constructor(e){this._document=e}copy(e){const i=this.beginCopy(e),r=i.copy();return i.destroy(),r}beginCopy(e){return new Ome(e,this._document)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Nme=new ae("HighlightJs-Config");let Qy=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.ngModel=i,this.doc=r,this.ngZone=s,this.lang="html",this.mode="simple",Object.assign(this,o)}escapeHTML(e){return(e||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}init(){this.ngZone.runOutsideAngular(()=>{this.destroy();const e=this.el.nativeElement,i=this.code||""+e.innerHTML.trim();if(this.codeEl=this.doc.createElement("default"===this.mode?"div":"pre"),null==this.codeEl)return;const r="simple"===this.mode;r?(this.lang&&(this.codeEl.className=this.lang),this.parentEl=e.parentNode,this.parentEl.insertBefore(this.codeEl,e.nextSibling)):(this.parentEl=e,this.parentEl.innerHTML="",this.parentEl.appendChild(this.codeEl)),this.codeEl.innerHTML=i,hljs.configure({...this.options}),r?hljs.highlightElement(this.codeEl):this.codeEl.querySelectorAll("pre code").forEach(o=>{hljs.highlightElement(o)})})}destroy(){this.codeEl&&this.parentEl&&(this.parentEl.removeChild(this.codeEl),this.codeEl=void 0)}ngAfterViewInit(){this.init(),this.ngModel?this.modelValue$=this.ngModel.valueChanges?.subscribe(e=>{this.code=this.escapeHTML(e),this.init()}):this.initMutation()}ngOnDestroy(){this.destroy(),this.destroyMutation(),this.modelValue$&&this.modelValue$.unsubscribe()}initMutation(){typeof MutationObserver>"u"||this.ngZone.runOutsideAngular(()=>{this.observer=new MutationObserver(this.init.bind(this)),this.observer.observe(this.el.nativeElement,{characterData:!0,childList:!0,subtree:!0})})}destroyMutation(){this.observer&&this.observer.disconnect()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ps,8),y(gt),y(Nme,8),y(Ye))},n.\u0275dir=X({type:n,selectors:[["","highlight-js",""]],hostVars:2,hostBindings:function(e,i){2&e&&Ai("display","simple"===i.mode?"none":null)},inputs:{options:"options",lang:"lang",code:"code",mode:"mode"},exportAs:["highlightJs"],standalone:!0}),n})(),Lme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[LS]}),n})();const Bme=["trigger"],Vme=["panel"];function Ume(n,t){if(1&n&&(_(0,"span",10),C(1),v()),2&n){const e=O();x(1),Je(e.placeholder)}}function Hme(n,t){if(1&n&&(_(0,"span",14),C(1),v()),2&n){const e=O(2);x(1),Je(e.triggerValue)}}function zme(n,t){1&n&&dt(0,0,["*ngSwitchCase","true"])}function jme(n,t){1&n&&(_(0,"span",11),A(1,Hme,2,1,"span",12),A(2,zme,1,0,"ng-content",13),v()),2&n&&(E("ngSwitch",!!O().customTrigger),x(2),E("ngSwitchCase",!0))}function $me(n,t){if(1&n){const e=Le();xc(),Eh(),_(0,"div",15,16),z("@transformPanel.done",function(r){return he(e),fe(O()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return he(e),fe(O()._handleKeydown(r))}),dt(2,1),v()}if(2&n){const e=O();(function g4(n,t,e){ca(as,La,zh(we(),n,t,e),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),E("ngClass",e.panelClass)("@transformPanel","showing"),vt("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const Gme=[[["mat-select-trigger"]],"*"],Wme=["mat-select-trigger","*"],qme={transformPanelWrap:$n("transformPanelWrap",[Qt("* => void",cy("@transformPanel",[ay()],{optional:!0}))]),transformPanel:$n("transformPanel",[pn("void",ze({opacity:0,transform:"scale(1, 0.8)"})),Qt("void => showing",Gt("120ms cubic-bezier(0, 0, 0.2, 1)",ze({opacity:1,transform:"scale(1, 1)"}))),Qt("* => void",Gt("100ms linear",ze({opacity:0})))])};let I8=0;const M8=new ae("mat-select-scroll-strategy"),Kme=new ae("MAT_SELECT_CONFIG"),Xme={provide:M8,deps:[ao],useFactory:function Qme(n){return()=>n.scrollStrategies.reposition()}},Yme=new ae("MatSelectTrigger");class Zme{constructor(t,e){this.source=t,this.value=e}}const Jme=Ol(gg(Oc(l5(class{constructor(n,t,e,i,r){this._elementRef=n,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Me}}))));let epe=(()=>{class n extends Jme{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Rf.required)??!1}set required(e){this._required=Ke(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=Ke(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=Ke(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=gr(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,i,r,o,s,a,c,l,d,u,h,f,m,g){super(s,o,c,l,u),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=d,this._liveAnnouncer=m,this._defaultOptions=g,this._panelOpen=!1,this._compareWith=(p,b)=>p===b,this._uid="mat-select-"+I8++,this._triggerAriaLabelledBy=null,this._destroy=new Me,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+I8++,this._panelDoneAnimatingStream=new Me,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=lf(()=>{const p=this.options;return p?p.changes.pipe(er(p),Ji(()=>oi(...p.map(b=>b.onSelectionChange)))):this._ngZone.onStable.pipe(An(1),Ji(()=>this.optionSelectionChanges))}),this.openedChange=new De,this._openedStream=this.openedChange.pipe(mn(p=>p),ct(()=>{})),this._closedStream=this.openedChange.pipe(mn(p=>!p),ct(()=>{})),this.selectionChange=new De,this.valueChange=new De,this.ngControl&&(this.ngControl.valueAccessor=this),null!=g?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=g.typeaheadDebounceInterval),this._scrollStrategyFactory=f,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(h)||0,this.id=this.id}ngOnInit(){this._selectionModel=new wT(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ja(),St(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(St(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(er(null),St(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,r=40===i||38===i||37===i||39===i,o=13===i||32===i,s=this._keyManager;if(!s.isTyping()&&o&&!so(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;s.onKeydown(e);const c=this.selected;c&&a!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,r=e.keyCode,o=40===r||38===r,s=i.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(s||13!==r&&32!==r||!i.activeItem||so(e))if(!s&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();const a=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(a?c.select():c.deselect())})}else{const a=i.activeItemIndex;i.onKeydown(e),this._multiple&&o&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(An(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new JB(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=oi(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(St(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),oi(...this.options.map(i=>i._stateChanges)).pipe(St(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){const r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();let i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(e){return new(e||n)(y(_a),y(an),y(Ye),y(d5),y(Ne),y(Hi,8),y(mu,8),y(Wl,8),y(Gy,8),y(Ga,10),Ms("tabindex"),y(M8),y(jT),y(Kme,8))},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&(pt(Bme,5),pt(Vme,5),pt(z5,5)),2&e){let r;Ae(r=Ie())&&(i.trigger=r.first),Ae(r=Ie())&&(i.panel=r.first),Ae(r=Ie())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[ye,jn]}),n})(),Lg=(()=>{class n extends epe{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(St(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(e){const i=this.options.toArray()[e];if(i){const r=this.panel.nativeElement,o=b5(e,this.options,this.optionGroups),s=i._getHostElement();r.scrollTop=0===e&&1===o?0:v5(s.offsetTop,s.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Zme(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof rS?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=Ke(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275cmp=Ve({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,Yme,5),qt(r,Ll,5),qt(r,QT,5)),2&e){let o;Ae(o=Ie())&&(i.customTrigger=o.first),Ae(o=Ie())&&(i.options=o),Ae(o=Ie())&&(i.optionGroups=o)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,i){1&e&&z("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(vt("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),ot("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[nt([{provide:$y,useExisting:n},{provide:qT,useExisting:n}]),ye],ngContentSelectors:Wme,decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(Rn(Gme),_(0,"div",0,1),z("click",function(){return i.toggle()}),_(3,"div",2),A(4,Ume,2,1,"span",3),A(5,jme,3,2,"span",4),v(),_(6,"div",5)(7,"div",6),xc(),_(8,"svg",7),_e(9,"path",8),v()()()(),A(10,$me,3,9,"ng-template",9),z("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){const r=Pt(1);vt("aria-owns",i.panelOpen?i.id+"-panel":null),x(3),E("ngSwitch",i.empty),vt("id",i._valueId),x(1),E("ngSwitchCase",!0),x(1),E("ngSwitchCase",!1),x(5),E("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[ha,Vp,TE,FL,z5,rS],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[qme.transformPanel]},changeDetection:0}),n})(),tpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[Xme],imports:[Br,au,sy,Ft,Vc,Wy,sy,Ft]}),n})();const npe=["tooltip"],R8=new ae("mat-tooltip-scroll-strategy"),ope={provide:R8,deps:[ao],useFactory:function rpe(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},ape=new ae("mat-tooltip-default-options",{providedIn:"root",factory:function spe(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),F8="tooltip-panel",P8=pa({passive:!0});let fpe=(()=>{class n{get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=Ke(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=gr(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=gr(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=e?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(e,i,r,o,s,a,c,l,d,u,h,f){this._overlay=e,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=o,this._ngZone=s,this._platform=a,this._ariaDescriber=c,this._focusMonitor=l,this._dir=u,this._defaultOptions=h,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Me,this._scrollStrategy=d,this._document=f,h&&(h.position&&(this.position=h.position),h.positionAtOrigin&&(this.positionAtOrigin=h.positionAtOrigin),h.touchGestures&&(this.touchGestures=h.touchGestures)),u.change.pipe(St(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(St(this._destroyed)).subscribe(e=>{e?"keyboard"===e&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const e=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{e.removeEventListener(i,r,P8)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(i);this._detach(),this._portal=this._portal||new Tf(this._tooltipComponent,this._viewContainerRef);const o=this._tooltipInstance=r.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(St(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(e)}hide(e=this.hideDelay){const i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){const o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof Ne)return this._overlayRef;this._detach()}const i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&e||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(St(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${F8}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(St(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(St(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(St(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&27===o.keyCode&&!so(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){const i=e.getConfig().positionStrategy,r=this._getOrigin(),o=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...o.main}),this._addOffset({...r.fallback,...o.fallback})])}_addOffset(e){return e}_getOrigin(){const e=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={originX:"end",originY:"center"});const{x:o,y:s}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:s}}}_getOverlayPosition(){const e=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={overlayX:"start",overlayY:"center"});const{x:o,y:s}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(An(1),St(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){const{overlayY:i,originX:r,originY:o}=e;let s;if(s="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===o?"above":"below",s!==this._currentPosition){const a=this._overlayRef;if(a){const c=`${this._cssClassPrefix}-${F8}-`;a.removePanelClass(c+this._currentPosition),a.addPanelClass(c+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{let i;this._setupPointerExitEventsIfNeeded(),void 0!==e.x&&void 0!==e.y&&(i=e),this.show(void 0,i)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{const i=e.targetTouches?.[0],r=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{const r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,P8)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){const i=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){const e=this.touchGestures;if("off"!==e){const i=this._elementRef.nativeElement,r=i.style;("on"===e||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===e||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),_u=(()=>{class n extends fpe{constructor(e,i,r,o,s,a,c,l,d,u,h,f){super(e,i,r,o,s,a,c,l,d,u,h,f),this._tooltipComponent=ppe,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(e){const r=!this._dir||"ltr"==this._dir.value;return"top"===e.originY?e.offsetY=-8:"bottom"===e.originY?e.offsetY=8:"start"===e.originX?e.offsetX=r?-8:8:"end"===e.originX&&(e.offsetX=r?8:-8),e}}return n.\u0275fac=function(e){return new(e||n)(y(ao),y(Ne),y(ou),y(ii),y(Ye),y(Hn),y(XB),y(ms),y(R8),y(Hi,8),y(ape,8),y(gt))},n.\u0275dir=X({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[ye]}),n})(),mpe=(()=>{class n{constructor(e,i){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Me,this._animationsDisabled="NoopAnimations"===i}show(e){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){const i=this._tooltip.nativeElement,r=this._showAnimation,o=this._hideAnimation;if(i.classList.remove(e?o:r),i.classList.add(e?r:o),this._isVisible=e,e&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const s=getComputedStyle(i);("0s"===s.getPropertyValue("animation-duration")||"none"===s.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(Jn,8))},n.\u0275dir=X({type:n}),n})(),ppe=(()=>{class n extends mpe{constructor(e,i,r){super(e,r),this._elementRef=i,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>24&&e.width>=200}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(Ne),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(1&e&&pt(npe,7),2&e){let r;Ae(r=Ie())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,i){1&e&&z("mouseleave",function(o){return i._handleMouseLeave(o)}),2&e&&Ai("zoom",i.isVisible()?1:null)},features:[ye],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(e,i){1&e&&(_(0,"div",0,1),z("animationend",function(o){return i._handleAnimationEnd(o)}),_(2,"div",2),C(3),v()()),2&e&&(ot("mdc-tooltip--multiline",i._isMultiline),E("ngClass",i.tooltipClass),x(3),Je(i.message))},dependencies:[ha],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0}),n})(),gpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[ope],imports:[GT,Br,au,Ft,Ft,Vc]}),n})();const _pe=["switch"],bpe=["*"],vpe=new ae("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})}),ype={provide:Hr,useExisting:hn(()=>N8),multi:!0};class O8{constructor(t,e){this.source=t,this.checked=e}}let xpe=0;const wpe=gg(Pl(Ol(Oc(class{constructor(n){this._elementRef=n}}))));let Cpe=(()=>{class n extends wpe{get required(){return this._required}set required(e){this._required=Ke(e)}get checked(){return this._checked}set checked(e){this._checked=Ke(e),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,r,o,s,a,c){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this.defaults=s,this._onChange=l=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new De,this.toggleChange=new De,this.tabIndex=parseInt(o)||0,this.color=this.defaultColor=s.color||"accent",this._noopAnimations="NoopAnimations"===a,this.id=this._uniqueId=`${c}${++xpe}`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{"keyboard"===e||"program"===e?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[ye]}),n})(),N8=(()=>{class n extends Cpe{get buttonId(){return`${this.id||this._uniqueId}-button`}constructor(e,i,r,o,s,a){super(e,i,r,o,s,a,"mat-mdc-slide-toggle-"),this._labelId=this._uniqueId+"-label"}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new O8(this,this.checked)))}focus(){this._switchElement.nativeElement.focus()}_createChangeEvent(e){return new O8(this,e)}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ms),y(an),Ms("tabindex"),y(vpe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-slide-toggle"]],viewQuery:function(e,i){if(1&e&&pt(_pe,5),2&e){let r;Ae(r=Ie())&&(i._switchElement=r.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:11,hostBindings:function(e,i){2&e&&(Ba("id",i.id),vt("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),ot("mat-mdc-slide-toggle-focused",i._focused)("mat-mdc-slide-toggle-checked",i.checked)("_mat-animation-noopable",i._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[nt([ype]),ye],ngContentSelectors:bpe,decls:17,vars:24,consts:[[1,"mdc-form-field"],["role","switch","type","button",1,"mdc-switch",3,"tabIndex","disabled","click"],["switch",""],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"],[3,"for","click"]],template:function(e,i){if(1&e&&(Rn(),_(0,"div",0)(1,"button",1,2),z("click",function(){return i._handleClick()}),_e(3,"div",3),_(4,"div",4)(5,"div",5)(6,"div",6),_e(7,"div",7),v(),_(8,"div",8),_e(9,"div",9),v(),_(10,"div",10),xc(),_(11,"svg",11),_e(12,"path",12),v(),_(13,"svg",13),_e(14,"path",14),v()()()()(),Eh(),_(15,"label",15),z("click",function(o){return o.stopPropagation()}),dt(16),v()()),2&e){const r=Pt(2);ot("mdc-form-field--align-end","before"==i.labelPosition),x(1),ot("mdc-switch--selected",i.checked)("mdc-switch--unselected",!i.checked)("mdc-switch--checked",i.checked)("mdc-switch--disabled",i.disabled),E("tabIndex",i.tabIndex)("disabled",i.disabled),vt("id",i.buttonId)("name",i.name)("aria-label",i.ariaLabel)("aria-labelledby",i._getAriaLabelledBy())("aria-describedby",i.ariaDescribedby)("aria-required",i.required||null)("aria-checked",i.checked),x(8),E("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0),x(6),E("for",i.buttonId),vt("id",i._labelId)}},dependencies:[Bs],styles:['.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mdc-switch{width:var(--mdc-switch-track-width, 36px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, #616161)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color, var(--mdc-theme-surface, #fff))}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__focus-ring-wrapper,.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height, 20px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__handle::after{opacity:var(--mdc-switch-disabled-handle-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape, 10px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width, 20px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width, 20px))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 18px);height:var(--mdc-switch-selected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 18px);height:var(--mdc-switch-unselected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size, 48px);width:var(--mdc-switch-state-layer-size, 48px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height, 14px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape, 7px)}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}'],encapsulation:2,changeDetection:0}),n})(),L8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})(),Tpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[L8,Ft,Nl,Br,L8,Ft]}),n})();function Spe(n,t){if(1&n){const e=Le();_(0,"button",14),z("click",function(){he(e);const r=O().index;return fe(O().removeReaction(r))}),_(1,"mat-icon"),C(2,"close"),v()()}}function Dpe(n,t){if(1&n){const e=Le();_(0,"mat-option",15),z("click",function(){const o=he(e).$implicit,s=O().$implicit;return fe(O().reactionSeveritySelected(s,o))}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Je(e.display)}}function Ape(n,t){if(1&n){const e=Le();_(0,"div",2)(1,"div",3),A(2,Spe,3,0,"button",4),v(),_(3,"div",5)(4,"div",6)(5,"app-autocomplete-binding",7),z("selectionChange",function(r){const s=he(e).$implicit;return fe(O().reactionManifestationSelected(s,r))}),v()(),_(6,"button",8)(7,"mat-icon"),C(8,"info"),v()(),_(9,"mat-menu",null,9)(11,"span",10),z("click",function(r){return r.stopPropagation()}),_(12,"p"),C(13,"Terminology binding:"),v(),_(14,"pre"),C(15),v()()()(),_(16,"mat-form-field",11)(17,"mat-label"),C(18,"Reaction Severity"),v(),_(19,"mat-select"),A(20,Dpe,2,2,"mat-option",12),v()(),_(21,"div",5)(22,"div",6)(23,"app-autocomplete-binding",7),z("selectionChange",function(r){const s=he(e).$implicit;return fe(O().reactionRouteSelected(s,r))}),v()(),_(24,"button",8)(25,"mat-icon"),C(26,"info"),v()(),_(27,"mat-menu",null,13)(29,"span",10),z("click",function(r){return r.stopPropagation()}),_(30,"p"),C(31,"Terminology binding:"),v(),_(32,"pre"),C(33),v()()()()()}if(2&n){const e=t.index,i=Pt(10),r=Pt(28),o=O();x(2),E("ngIf",e>0),x(3),E("binding",o.reactionManifestationBinding),x(1),E("matMenuTriggerFor",i),x(5),E("disableRipple",!0),x(4),Je(o.reactionManifestationBinding.ecl),x(5),E("ngForOf",o.severityOptions),x(3),E("binding",o.routeBinding),x(1),E("matMenuTriggerFor",r),x(5),E("disableRipple",!0),x(4),Je(o.routeBinding.ecl)}}let Ipe=(()=>{class n{constructor(){this.reactions=[],this.newManifestation=new De,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.reaction={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}writeValue(e){void 0!==e&&(this.reactions=e)}setDisabledState(e){}addNewReaction(){this.reactions.push(this.reaction),this.reaction={},this.onChangeCallback(this.reactions)}removeReaction(e){this.reactions.splice(e,1),this.onChangeCallback(this.reactions)}reactionManifestationSelected(e,i){e.manifestation=i,this.newManifestation.emit(i),this.onChangeCallback(this.reactions)}reactionSeveritySelected(e,i){e.severity=i,this.onChangeCallback(this.reactions)}reactionRouteSelected(e,i){e.route=i,this.onChangeCallback(this.reactions)}registerOnChange(e){this.onChangeCallback=e}registerOnTouched(e){this.onTouchedCallback=e}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies-allergy-list-reaction"]],inputs:{reactions:"reactions"},outputs:{newManifestation:"newManifestation"},features:[nt([{provide:Hr,useExisting:hn(()=>n),multi:!0}])],decls:5,vars:1,consts:[["class","reaction",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Add reaction",3,"click"],[1,"reaction"],[1,"button-container"],["mat-icon-button","","color","primary","class","remove","matTooltip","Remove reaction",3,"click",4,"ngIf"],[1,"row-centered"],[1,"small-form-field"],[3,"binding","selectionChange"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["reactionPopoverMenu","matMenu"],["mat-menu-item","",3,"disableRipple","click"],[1,"form-field"],[3,"value","click",4,"ngFor","ngForOf"],["routePopoverMenu","matMenu"],["mat-icon-button","","color","primary","matTooltip","Remove reaction",1,"remove",3,"click"],[3,"value","click"]],template:function(i,r){1&i&&(A(0,Ape,34,10,"div",0),_(1,"div")(2,"button",1),z("click",function(){return r.addNewReaction()}),_(3,"mat-icon"),C(4,"add"),v()()()),2&i&&E("ngForOf",r.reactions)},dependencies:[io,ri,Vs,co,lu,$a,du,ba,gs,Ll,Lg,_u,Og],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px;margin-bottom:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}"]})}return n})();function Mpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Je(e.display)}}function Rpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Je(e.display)}}function Fpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Je(e.display)}}function Ppe(n,t){if(1&n){const e=Le();_(0,"app-autocomplete-binding",10),z("selectionChange",function(r){return he(e),fe(O().substanceSelected(r,!0))}),v()}if(2&n){const e=O();E("binding",e.substanceBinding)("term",e.selectedSubstanceTerm)}}function Ope(n,t){if(1&n){const e=Le();_(0,"app-autocomplete-binding",10),z("selectionChange",function(r){return he(e),fe(O().substanceSelected(r))}),v()}if(2&n){const e=O();E("binding",e.refinedSubstanceBinding)("term",e.selectedSubstanceTerm)}}function Npe(n,t){if(1&n&&(_(0,"pre"),C(1),v()),2&n){const e=O();x(1),Je(e.substanceBinding.ecl)}}function Lpe(n,t){if(1&n&&(_(0,"pre"),C(1),v()),2&n){const e=O();x(1),Je(e.refinedSubstanceBinding.ecl)}}function Bpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Je(e.display)}}function Vpe(n,t){if(1&n){const e=Le();_(0,"mat-option",31),z("click",function(){return he(e),fe(O().updateAllergyStr())}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Je(e.display)}}const Upe=function(){return{}};let Hpe=(()=>{class n{constructor(e,i,r){this.terminologyService=e,this.clipboard=i,this._snackBar=r,this.newProblem=new De,this.clinicalStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"active",display:"Active"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"inactive",display:"Inactive"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"resolved",display:"Resolved"}],this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.verificationStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"unconfirmed",display:"Unconfirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"presumed",display:"Presumed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"confirmed",display:"Confirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"refuted",display:"Refuted"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"entered-in-error",display:"Entered in Error"}],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.intoleranceTypeOptions=[{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"609433001",display:"Hypersensitivity disposition (finding)",fhirCode:"allergy",fhirDisplay:"Allergy"},{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"782197009",display:"Intolerance to substance (finding)",fhirCode:"intolerance",fhirDisplay:"Intolerance"}],this.selectedIntoleranceType=null,this.intoleranceCategoryOptions=[{code:"food",display:"Food"},{code:"medication",display:"Medication"},{code:"environment",display:"Environment"},{code:"biologic",display:"Biologic"}],this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Qo(this.selectedIntoleranceCategories),this.criticalityOptions=[{code:"low",display:"Low Risk"},{code:"high",display:"High Risk"},{code:"unable-to-assess",display:"Unable to Assess Risk"}],this.selectedCriticality=null,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.codeBinding={ecl:"<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",title:"Allergy/Intolerance by propensity"},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.substanceBinding={ecl:"<<105590001 | Substance (substance) | OR <<373873005 | Pharmaceutical / biologic product (product) |",title:"Allergy/Intolerance substance or product"},this.refinedSubstanceBinding={ecl:"<<105590001 | Substance (substance) |",title:"Allergy/Intolerance substance based on propensity"},this.selectedSubstanceTerm="",this.selectedSubstance=null,this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm="",this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.selectedRoute=null,this.selectedRouteTerm="",this.outputAllergyBase={resourceType:"AllergyIntolerance",id:"medication",text:{},clinicalStatus:{coding:[]},verificationStatus:{coding:[]},type:"",category:[],criticality:"high",code:{coding:[]},reaction:[{substance:[{coding:[]}],manifestation:[{coding:[]}],exposureRoute:{coding:[]},severity:""}],patient:{reference:"Patient/example"},recordedDate:"2010-03-01",participant:[{function:{coding:[{system:"http://terminology.hl7.org/CodeSystem/provenance-participant-type",code:"author",display:"Author"}]},actor:{reference:"Practitioner/example"}}]},this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.outputAllergyStr=""}ngOnInit(){this.updateAllergyStr()}onReactionsChange(e){this.updateAllergyStr()}clear(){this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.selectedIntoleranceType=null,this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Qo(this.selectedIntoleranceCategories),this.selectedCriticality=null,this.selectedSeverity={},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.selectedSubstanceTerm="",this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm=" ",this.selectedRoute=null,this.selectedRouteTerm=" ",this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.updateAllergyStr(),setTimeout(()=>{this.selectedReactionManifestationTerm="",this.selectedRouteTerm=""},100)}updateAllergyStr(){this.outputAllergy.clinicalStatus.coding=[this.selectedClinicalStatus],this.outputAllergy.verificationStatus.coding=[this.selectedVerificationStatus],this.outputAllergy.type=this.selectedIntoleranceType?this.selectedIntoleranceType.fhirCode:"",this.outputAllergy.category=this.selectedIntoleranceCategories.length?this.selectedIntoleranceCategories.map(e=>e.display):[],this.outputAllergy.criticality=this.selectedCriticality?.code?[this.selectedCriticality.code]:{},this.outputAllergy.reaction=[],this.selectedReactions.forEach(e=>{e.manifestation.code&&(e.manifestation.system="http://snomed.info/sct"),e.route.code&&(e.route.system="http://snomed.info/sct"),this.outputAllergy.reaction.push({substance:[{coding:[this.selectedSubstance]}],manifestation:[{coding:e.manifestation?[e.manifestation]:[{}]}],exposureRoute:{coding:e.route?[e.route]:[{}]},severity:e.severity?e.severity.code:""})}),setTimeout(()=>{this.outputAllergyStr=JSON.stringify(this.outputAllergy,null,2)},100)}substanceSelected(e,i){var r=this;return xe(function*(){i&&(r.selectedCodeTerm=""),r.selectedSubstance=e,r.selectedIntoleranceCategories=[],e=Object.assign({system:"http://snomed.info/sct"},e),r.recordPropensity||(r.outputAllergy.code.coding=[e]),r.outputAllergy.reaction[0].substance[0].coding=[e],(yield r.getSubstanceCategories(e))?.expansion?.contains?.forEach(s=>{"762766007"==s.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[0]):"115668003"==s.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[3]):"410942007"==s.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[1]):"57795002"==s.code&&r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[2])}),r.selectedIntoleranceCategoriesControl.setValue(r.selectedIntoleranceCategories),r.updateAllergyStr()})()}propensityRecordChanged(){this.outputAllergy.code.coding=[],this.selectedCode&&this.codeSelected(this.selectedCode)}codeSelected(e){var i=this;return xe(function*(){if(e=Object.assign({system:"http://snomed.info/sct"},e)){i.selectedCodeTerm=e.display,i.selectedCode=e,i.recordPropensity&&(i.outputAllergy.code.coding=[e]);let r=yield i.getTypes(e);if(r.expansion?.contains){const s=r.expansion?.contains[0];i.selectedIntoleranceType=i.intoleranceTypeOptions.find(a=>a.code===s.code)}let o=yield i.getAllergySubstance(e);if(o.expansion.contains||(o=yield i.getIntoleranceSubstance(e)),o.expansion?.contains){const s=o.expansion?.contains[0];i.refinedSubstanceBinding.ecl=`<<${s.code} | ${s.display} |`,i.substanceSelected(s),i.selectedSubstanceTerm=s.display}else i.refinedSubstanceBinding.ecl="<<105590001 | Substance (substance) |"}})()}getIntoleranceSubstance(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`${e.code} |${e.display}| . 47429007 |Associated with (attribute)|`,"")).pipe(ct(o=>o)))})()}getAllergySubstance(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`${e.code} |${e.display}| . 246075003 |Causative agent (attribute)|`,"")).pipe(ct(o=>o)))})()}getSubstanceCategories(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`> ${e.code} |${e.display}| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)`,"")).pipe(ct(o=>o)))})()}getTypes(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(`> ${e.code} |${e.display}| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)`,"")).pipe(ct(o=>o)))})()}saveFhirResource(){var e=new Blob([this.outputAllergyStr],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(e,"AllergyIntolerance.json")}copyToClipboard(e){this.clipboard.copy(e)}addToProblemsList(){if(this.selectedCode)this.newProblem.emit(this.selectedCode);else if(this.selectedSubstance&&this.selectedIntoleranceType){let e="";"609433001"===this.selectedIntoleranceType.code?e="Allergy to ":"782197009"===this.selectedIntoleranceType.code&&(e="Intolerance to "),e+=this.selectedSubstance.display,this.newProblem.emit({code:`${this.selectedIntoleranceType.code}:246075003=${this.selectedSubstance.code}`,display:e,substance:this.selectedSubstance})}else this._snackBar.openFromComponent(Si,{duration:1e3,data:"Nothing to add to problem list",panelClass:["yellow-snackbar"]});this.clear()}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(VS),y(Df))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies-allergy-list"]],outputs:{newProblem:"newProblem"},decls:105,vars:30,consts:[["id","main-card"],[1,"row"],[1,"column"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",1,"long-tooltip",3,"disableRipple","click"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-flat-button","","color","accent","id","clear",3,"click"],[1,"row-centered"],[1,"smallest-form-field"],[3,"binding","term","selectionChange"],["codePopoverMenu","matMenu"],["mat-menu-item","",3,"disableRipple","click"],["matTooltip","Defines wether to use a propensity based model or a substance based model. Defines which one is recorded in the code element of the AllergyIntolerance resource.",3,"ngModel","ngModelChange","click"],[1,"form-field"],[3,"ngModel","ngModelChange"],[3,"value","click",4,"ngFor","ngForOf"],[1,"small-form-field"],[3,"binding","term","selectionChange",4,"ngIf"],[4,"ngIf"],[3,"formControl","multiple"],[3,"ngModel","ngModelChange","newManifestation"],["mat-flat-button","","color","accent",3,"click"],["href","https://hl7.org/FHIR/allergyintolerance.html","target","_blank"],["id","output"],["id","save"],["mat-icon-button","","matTooltip","Download FHIR Resource",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy FHIR Resource",3,"click"],["fontIcon","content_copy"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],[3,"value","click"]],template:function(i,r){if(1&i&&(_(0,"mat-card",0)(1,"div",1)(2,"div",2)(3,"h4"),C(4,"Allergy Intolerance Form "),_(5,"button",3)(6,"mat-icon"),C(7,"info"),v()(),_(8,"mat-menu",null,4)(10,"span",5),z("click",function(s){return s.stopPropagation()}),_(11,"h4"),C(12,"Allergy list"),v(),_(13,"p"),C(14,"Allergy or intolerance can be recorded in a specific section (e.g., \u201cDrug Allergy and Intolerance\u201d) of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),v(),_(15,"p"),C(16,"In terms of documenting sensitivity type in the allergy list there is the option to map to 609433001 |Hypersensitivity disposition which in SNOMED CT represents both immune-mediated and non-immune mediated hypersensitivity or to map to 609328004 |Allergic disposition (finding)|which is common clinical parlance for what many clinicians would mean by allergic or non-allergic hypersensitivity. In addition, as recommended in the FHIR documentation if one is unclear as to whether a condition represents hypersensitivity or intolerance, one can just omit the type element from the resource."),v(),_(17,"p"),C(18,"If SNOMED CT concepts are used to document the causative agent, it is preferable to use concepts from the Substance rather than Pharmaceutical/biologic product hierarchy since this will facilitate the downstream use of data, e.g., clinical decision support, data exchange."),v(),_(19,"p"),C(20,"Almost all allergy and intolerance finding concepts are modeled using substance concepts in SNOMED CT. The SNOMED CT substance hierarchy has grouper concepts that are based on structure (e.g., Macrolide) or disposition (e.g., substance with histamine receptor antagonist mechanism of action). Clinical decision support systems can utilize these grouper concepts to access information at the desired level of granularity. Clinicians can also record a class of substance instead of a specific drug or substance (e.g., angiotensin II receptor antagonist). Note that substance grouper concepts based on therapeutic role (e.g., anticonvulsant) is not recommended for use because they are currently under review and may be retired in future."),v(),_(21,"p"),C(22,"There are situations in which it is difficult to determine the specific substance as a true cause or most likely cause of a condition. This is the case for allergy/intolerance to a product containing multiple substances."),v(),_(23,"p"),C(24,"Records of allergy to multiple substances or to multi-ingredient products should be recorded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),v(),_(25,"p"),C(26,"For more information check the "),_(27,"a",6),C(28,"Implementation Guide"),v(),C(29," developed by the SNOMED International Allergy Clinical Reference Group."),v()()()(),_(30,"button",7),z("click",function(){return r.clear()}),C(31,"Clear"),v(),_(32,"div",8)(33,"div",9)(34,"app-autocomplete-binding",10),z("selectionChange",function(s){return r.codeSelected(s)}),v()(),_(35,"button",3)(36,"mat-icon"),C(37,"info"),v()(),_(38,"mat-menu",null,11)(40,"span",12),z("click",function(s){return s.stopPropagation()}),_(41,"p"),C(42,"Terminology binding:"),v(),_(43,"pre"),C(44),v()()(),_(45,"mat-slide-toggle",13),z("ngModelChange",function(s){return r.recordPropensity=s})("click",function(){return r.propensityRecordChanged()}),C(46," Propensity based model "),v()(),_(47,"mat-form-field",14)(48,"mat-label"),C(49,"Allergy Intolerance Type"),v(),_(50,"mat-select",15),z("ngModelChange",function(s){return r.selectedIntoleranceType=s}),A(51,Mpe,2,2,"mat-option",16),v()(),_(52,"div",8)(53,"mat-form-field",2)(54,"mat-label"),C(55,"Clinical Status"),v(),_(56,"mat-select",15),z("ngModelChange",function(s){return r.selectedClinicalStatus=s}),A(57,Rpe,2,2,"mat-option",16),v()(),_(58,"mat-form-field",2)(59,"mat-label"),C(60,"Verification Status"),v(),_(61,"mat-select",15),z("ngModelChange",function(s){return r.selectedVerificationStatus=s}),A(62,Fpe,2,2,"mat-option",16),v()()(),_(63,"div",8)(64,"div",17),A(65,Ppe,1,2,"app-autocomplete-binding",18),A(66,Ope,1,2,"app-autocomplete-binding",18),v(),_(67,"button",3)(68,"mat-icon"),C(69,"info"),v()(),_(70,"mat-menu",null,4)(72,"span",12),z("click",function(s){return s.stopPropagation()}),_(73,"p"),C(74,"Terminology binding:"),v(),A(75,Npe,2,1,"pre",19),A(76,Lpe,2,1,"pre",19),v()()(),_(77,"div",8)(78,"mat-form-field",2)(79,"mat-label"),C(80,"Substance Category"),v(),_(81,"mat-select",20),A(82,Bpe,2,2,"mat-option",16),v()(),_(83,"mat-form-field",2)(84,"mat-label"),C(85,"Allergy Criticality"),v(),_(86,"mat-select",15),z("ngModelChange",function(s){return r.selectedCriticality=s}),A(87,Vpe,2,2,"mat-option",16),v()()(),_(88,"app-allergies-allergy-list-reaction",21),z("ngModelChange",function(s){return r.selectedReactions=s})("ngModelChange",function(s){return r.onReactionsChange(s)})("newManifestation",function(s){return r.newProblem.emit(s)}),v(),_(89,"button",22),z("click",function(){return r.addToProblemsList()}),C(90,"Save"),v()(),_(91,"div",2)(92,"h4"),C(93,"AllergyIntolerance HL7 FHIR Resource ("),_(94,"a",23),C(95,"link"),v(),C(96,")"),v(),_(97,"div",24)(98,"div",25)(99,"button",26),z("click",function(){return r.saveFhirResource()}),_e(100,"mat-icon",27),v(),_(101,"button",28),z("click",function(){return r.copyToClipboard(r.outputAllergyStr)}),_e(102,"mat-icon",29),v()(),_(103,"textarea",30),C(104," "),v()()()()()),2&i){const o=Pt(9),s=Pt(39);x(5),E("matMenuTriggerFor",o),x(5),E("disableRipple",!0),x(24),E("binding",r.codeBinding)("term",r.selectedCodeTerm),x(1),E("matMenuTriggerFor",s),x(5),E("disableRipple",!0),x(4),Je(r.codeBinding.ecl),x(1),E("ngModel",r.recordPropensity),x(5),E("ngModel",r.selectedIntoleranceType),x(1),E("ngForOf",r.intoleranceTypeOptions),x(5),E("ngModel",r.selectedClinicalStatus),x(1),E("ngForOf",r.clinicalStatusOptions),x(4),E("ngModel",r.selectedVerificationStatus),x(1),E("ngForOf",r.verificationStatusOptions),x(3),E("ngIf",!r.recordPropensity),x(1),E("ngIf",r.recordPropensity),x(1),E("matMenuTriggerFor",o),x(5),E("disableRipple",!0),x(3),E("ngIf",!r.recordPropensity),x(1),E("ngIf",r.recordPropensity),x(5),E("formControl",r.selectedIntoleranceCategoriesControl)("multiple",!0),x(1),E("ngForOf",r.intoleranceCategoryOptions),x(4),E("ngModel",r.selectedCriticality),x(1),E("ngForOf",r.criticalityOptions),x(1),E("ngModel",r.selectedReactions),x(15),E("options",us(29,Upe))("lang","json")("innerHTML",r.outputAllergyStr,zd)}},dependencies:[io,ri,Qy,Fo,Vs,co,lu,$a,du,ba,gs,Ll,qo,Vy,cS,Lg,ps,_u,N8,Og,Ipe],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{position:relative;flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}#clear[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return n})(),B8=(()=>{class n{constructor(e){this._snackBar=e}addProblem(e){var i=this;return xe(function*(){i.allergiesProblemListComponent.addProblem(e),i._snackBar.openFromComponent(Si,{duration:1e3,data:"Problem list updated",panelClass:["green-snackbar"]})})()}static#e=this.\u0275fac=function(i){return new(i||n)(y(Df))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-allergies"]],viewQuery:function(i,r){if(1&i&&pt(x8,5),2&i){let o;Ae(o=Ie())&&(r.allergiesProblemListComponent=o.first)}},decls:31,vars:2,consts:[["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",1,"long-tooltip",3,"disableRipple","click"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Allergy List Approach (AllergyIntolerance FHIR resource)"],[3,"newProblem"],["label","Problem List Approach (Condition FHIR resource)"]],template:function(i,r){if(1&i&&(_(0,"div",0)(1,"h3"),C(2,"Allergy, Hypersensitivity and Intolerance "),_(3,"button",1)(4,"mat-icon"),C(5,"info"),v()(),_(6,"mat-menu",null,2)(8,"span",3),z("click",function(s){return s.stopPropagation()}),_(9,"h4"),C(10,"Allergy, Hypersensitivity and Intolerance Implementation Demo"),v(),_(11,"p"),C(12,"This is a demonstration of different implementation approaches for recording Allergies, Hypersensitivity and Intolerance."),v(),_(13,"p")(14,"b"),C(15,"Allergy list:"),v(),C(16," allergy or intolerance can be recorded in a specific section of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),v(),_(17,"p")(18,"b"),C(19,"Problem list:"),v(),C(20," Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),v(),_(21,"p"),C(22,"For more information check the "),_(23,"a",4),C(24,"Implementation Guide"),v(),C(25," developed by the SNOMED International Allergy Clinical Reference Group."),v()()()(),_(26,"mat-tab-group",5)(27,"mat-tab",6)(28,"app-allergies-allergy-list",7),z("newProblem",function(s){return r.addProblem(s)}),v()(),_(29,"mat-tab",8),_e(30,"app-allergies-problem-list"),v()()()),2&i){const o=Pt(7);x(3),E("matMenuTriggerFor",o),x(5),E("disableRipple",!0)}},dependencies:[Vs,co,lu,$a,du,qy,Ng,x8,Hpe],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}#guideLink[_ngcontent-%COMP%]{font-size:smaller}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return n})();function US(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,e?.has(i)?"important":""):n.removeProperty(i)}return n}function Of(n,t){const e=t?"":"none";US(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function V8(n,t,e){US(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Ky(n,t){return t&&"none"!=t?n+" "+t:n}function U8(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function HS(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function zS(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function jS(n,t,e){const{top:i,bottom:r,left:o,right:s}=n;return e>=i&&e<=r&&t>=o&&t<=s}function Bg(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function H8(n,t,e,i){const{top:r,right:o,bottom:s,left:a,width:c,height:l}=n,d=c*t,u=l*t;return i>r-u&&ia-d&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:zS(e)})})}handleScroll(t){const e=fs(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let o,s;if(e===this._document){const l=this.getViewportScrollPosition();o=l.top,s=l.left}else o=e.scrollTop,s=e.scrollLeft;const a=r.top-o,c=r.left-s;return this.positions.forEach((l,d)=>{l.clientRect&&e!==d&&e.contains(d)&&Bg(l.clientRect,a,c)}),r.top=o,r.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function j8(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;rOf(i,e)))}constructor(t,e,i,r,o,s){this._config=e,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new Me,this._pointerMoveSubscription=lt.EMPTY,this._pointerUpSubscription=lt.EMPTY,this._scrollSubscription=lt.EMPTY,this._resizeSubscription=lt.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new Me,this.started=new Me,this.released=new Me,this.ended=new Me,this.entered=new Me,this.exited=new Me,this.dropped=new Me,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){const c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const c=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(c.x-this._pickupPositionOnPage.x)+Math.abs(c.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),m=this._dropContainer;if(!f)return void this._endDragSequence(a);(!m||!m.isDragging()&&!m.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const l=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(l),this._dropContainer)this._updateActiveDropContainer(l,c);else{const d=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=l.x-d.x+this._passiveTransform.x,u.y=l.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:l,event:a,distance:this._getDragDistance(l),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new z8(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>Mi(i)),this._handles.forEach(i=>Of(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Mi(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Xy),e.addEventListener("touchstart",this._pointerDown,q8),e.addEventListener("dragstart",this._nativeDragStart,Xy)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Mi(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),Of(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Of(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){Vg(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,r=i.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(s,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),V8(i,!1,$S),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=Vg(e),o=!r&&0!==e.button,s=this._rootElement,a=fs(e),c=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),l=r?ry(e):iy(e);if(a&&a.draggable&&"mousedown"===e.type&&e.preventDefault(),i||o||c||l)return;if(this._handles.length){const h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=zS(this._boundaryElement));const d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,t,e);const u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){V8(this._rootElement,!0,$S),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),o=this._getDragDistance(r),s=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const o=t.matchSize?this._initialClientRect:null,s=t.viewContainer.createEmbeddedView(i,t.context);s.detectChanges(),r=K8(s,this._document),this._previewRef=s,t.matchSize?X8(r,o):r.style.transform=Yy(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=j8(this._rootElement),X8(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return US(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},$S),Of(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>r.classList.add(o)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function jpe(n){const t=getComputedStyle(n),e=HS(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),o=HS(t,"transition-duration"),s=HS(t,"transition-delay");return U8(o[r])+U8(s[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||fs(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=K8(this._placeholderRef,this._document)):i=j8(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){const r=e===this._rootElement?null:e,o=r?r.getBoundingClientRect():t,s=Vg(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-t.left+(s.pageX-o.left-a.left),y:o.top-t.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=Vg(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,o=i.pageY-e.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialClientRect,this._pickupPositionInElement):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:l}=this._getPreviewRect(),d=a.top+s,u=a.bottom-(l-s);i=Q8(i,a.left+o,a.right-(c-o)),r=Q8(r,d,u)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Of(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Xy),t.removeEventListener("touchstart",this._pointerDown,q8),t.removeEventListener("dragstart",this._nativeDragStart,Xy)}_applyRootElementTransform(t,e){const i=Yy(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Ky(i,this._initialTransform)}_applyPreviewTransform(t,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=Yy(t,e);this._preview.style.transform=Ky(r,i)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,c=i.bottom-r.bottom;r.width>i.width?(o>0&&(t+=o),s>0&&(t-=s)):t=0,r.height>i.height?(a>0&&(e+=a),c>0&&(e-=c)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:Vg(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=fs(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Bg(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=RT(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Mi(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function Yy(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function Q8(n,t,e){return Math.max(t,Math.min(e,n))}function Vg(n){return"t"===n.type[0]}function K8(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function X8(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=Yy(t.left,t.top)}function GS(n,t,e){const i=Ug(t,n.length-1),r=Ug(e,n.length-1);if(i===r)return;const o=n[i],s=r0)return null;const a="horizontal"===this.orientation,c=o.findIndex(p=>p.drag===t),l=o[s],u=l.clientRect,h=c>s?1:-1,f=this._getItemOffsetPx(o[c].clientRect,u,h),m=this._getSiblingOffsetPx(c,o,h),g=o.slice();return GS(o,c,s),o.forEach((p,b)=>{if(g[b]===p)return;const k=p.drag===t,w=k?f:m,D=k?t.getPlaceholderElement():p.drag.getRootElement();p.offset+=w,a?(D.style.transform=Ky(`translate3d(${Math.round(p.offset)}px, 0, 0)`,p.initialTransform),Bg(p.clientRect,0,w)):(D.style.transform=Ky(`translate3d(0, ${Math.round(p.offset)}px, 0)`,p.initialTransform),Bg(p.clientRect,w,0))}),this._previousSwap.overlaps=jS(u,e,i),this._previousSwap.drag=l.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:c,currentIndex:s}}enter(t,e,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(t,e,i):r,s=this._activeDraggables,a=s.indexOf(t),c=t.getPlaceholderElement();let l=s[o];if(l===t&&(l=s[o+1]),!l&&(null==o||-1===o||o-1&&s.splice(a,1),l&&!this._dragDropRegistry.isDragging(l)){const d=l.getRootElement();d.parentElement.insertBefore(c,d),s.splice(o,0,t)}else Mi(this._element).appendChild(c),s.push(t);c.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables.forEach(t=>{const e=t.getRootElement();if(e){const i=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{Bg(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const t="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:zS(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){const r="horizontal"===this.orientation;let o=r?e.left-t.left:e.top-t.top;return-1===i&&(o+=r?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this.orientation,o=e[t].clientRect,s=e[t+-1*i];let a=o[r?"width":"height"]*i;if(s){const c=r?"left":"top",l=r?"right":"bottom";-1===i?a-=s.clientRect[c]-o[l]:a+=o[c]-s.clientRect[l]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const s=i[i.length-1].clientRect;return r?t>=s.right:e>=s.bottom}{const s=i[0].clientRect;return r?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>a!==t&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?e>=Math.floor(c.left)&&e=Math.floor(c.top)&&i!0,this.sortPredicate=()=>!0,this.beforeStarted=new Me,this.entered=new Me,this.exited=new Me,this.dropped=new Me,this.sorted=new Me,this.receivingStarted=new Me,this.receivingStopped=new Me,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=lt.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new Me,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function zpe(n=0,t=hg){return n<0&&(n=0),yg(n,n,t)}(0,I5).pipe(St(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=Mi(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new z8(i),this._sortStrategy=new qpe(this.element,e),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,o,s,a,c={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._sortStrategy.direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._sortStrategy.orientation=t,this}withScrollableParents(t){const e=Mi(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!H8(this._clientRect,.05,e,i))return;const o=this._sortStrategy.sort(t,e,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||H8(s.clientRect,.05,t,e)&&([r,o]=function Kpe(n,t,e,i){const r=J8(t,i),o=e6(t,e);let s=0,a=0;if(r){const c=n.scrollTop;1===r?c>0&&(s=1):n.scrollHeight-c>n.clientHeight&&(s=2)}if(o){const c=n.scrollLeft;1===o?c>0&&(a=1):n.scrollWidth-c>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,t,e),(r||o)&&(i=a))}),!r&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};r=J8(c,e),o=e6(c,t),i=window}i&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=Mi(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=Mi(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_reset(){this._isDragging=!1;const t=Mi(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,e){return null!=this._clientRect&&jS(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(r=>r._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!jS(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const o=Mi(this.element);return r===o||o.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=RT(Mi(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function J8(n,t){const{top:e,bottom:i,height:r}=n,o=r*Z8;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}function e6(n,t){const{left:e,right:i,width:r}=n,o=r*Z8;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}const Zy=pa({passive:!1,capture:!0});let Xpe=(()=>{class n{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new Me,this.pointerUp=new Me,this.scroll=new Me,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Zy)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Zy)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:Zy}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:Zy}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new Dn(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),oi(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(Q(Ye),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Ype={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let WS=(()=>{class n{constructor(e,i,r,o){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(e,i=Ype){return new Wpe(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new Qpe(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(Ye),Q(_a),Q(Xpe))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const qS=new ae("CDK_DRAG_PARENT"),QS=new ae("CdkDropListGroup"),t6=new ae("CDK_DRAG_CONFIG");let Jpe=0;const n6=new ae("CdkDropList");let KS=(()=>{class n{get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=Ke(e)}constructor(e,i,r,o,s,a,c){this.element=e,this._changeDetectorRef=r,this._scrollDispatcher=o,this._dir=s,this._group=a,this._destroyed=new Me,this.connectedTo=[],this.id="cdk-drop-list-"+Jpe++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new De,this.entered=new De,this.exited=new De,this.sorted=new De,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,c&&this._assignDefaults(c),this._dropListRef.enterPredicate=(l,d)=>this.enterPredicate(l.data,d.data),this._dropListRef.sortPredicate=(l,d,u)=>this.sortPredicate(l,d.data,u.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),a&&a._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=n._dropLists.indexOf(this);e>-1&&n._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(er(this._dir.value),St(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{const i=fg(this.connectedTo).map(r=>"string"==typeof r?n._dropLists.find(s=>s.id===r):r);if(this._group&&this._group._items.forEach(r=>{-1===i.indexOf(r)&&i.push(r)}),!this._scrollableParentsResolved){const r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(o=>o.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=Ke(this.sortingDisabled),e.autoScrollDisabled=Ke(this.autoScrollDisabled),e.autoScrollStep=gr(this.autoScrollStep,2),e.connectedTo(i.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),oi(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){const{lockAxis:i,draggingDisabled:r,sortingDisabled:o,listAutoScrollDisabled:s,listOrientation:a}=e;this.disabled=r??!1,this.sortingDisabled=o??!1,this.autoScrollDisabled=s??!1,this.orientation=a||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}}return n._dropLists=[],n.\u0275fac=function(e){return new(e||n)(y(Ne),y(WS),y(an),y(ou),y(Hi,8),y(QS,12),y(t6,8))},n.\u0275dir=X({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(e,i){2&e&&(vt("id",i.id),ot("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],data:["cdkDropListData","data"],orientation:["cdkDropListOrientation","orientation"],id:"id",lockAxis:["cdkDropListLockAxis","lockAxis"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[nt([{provide:QS,useValue:void 0},{provide:n6,useExisting:n}])]}),n})();const XS=new ae("CdkDragHandle");let i6=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e),this._stateChanges.next(this)}constructor(e,i){this.element=e,this._stateChanges=new Me,this._disabled=!1,this._parentDrag=i}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(qS,12))},n.\u0275dir=X({type:n,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},standalone:!0,features:[nt([{provide:XS,useExisting:n}])]}),n})();const r6=new ae("CdkDragPlaceholder"),o6=new ae("CdkDragPreview");let YS=(()=>{class n{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=Ke(e),this._dragRef.disabled=this._disabled}constructor(e,i,r,o,s,a,c,l,d,u,h){this.element=e,this.dropContainer=i,this._ngZone=o,this._viewContainerRef=s,this._dir=c,this._changeDetectorRef=d,this._selfHandle=u,this._parentDrag=h,this._destroyed=new Me,this.started=new De,this.released=new De,this.ended=new De,this.entered=new De,this.exited=new De,this.dropped=new De,this.moved=new Dn(f=>{const m=this._dragRef.moved.pipe(ct(g=>({source:this,pointerPosition:g.pointerPosition,event:g.event,delta:g.delta,distance:g.distance}))).subscribe(f);return()=>{m.unsubscribe()}}),this._dragRef=l.createDrag(e,{dragStartThreshold:a&&null!=a.dragStartThreshold?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&null!=a.pointerDirectionChangeThreshold?a.pointerDirectionChangeThreshold:5,zIndex:a?.zIndex}),this._dragRef.data=this,n._dragInstances.push(this),a&&this._assignDefaults(a),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(An(1),St(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(e){const i=e.rootElementSelector,r=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=n._dragInstances.indexOf(this);e>-1&&n._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const e=this.element.nativeElement;let i=e;this.rootElementSelector&&(i=void 0!==e.closest?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){const e=this.boundaryElement;return e?"string"==typeof e?this.element.nativeElement.closest(e):Mi(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const i=this._dir,r=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof r&&r?r:gr(r),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(An(1)).subscribe(()=>{if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains("cdk-drag")){e.withParent(n._dragInstances.find(r=>r.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){const{lockAxis:i,dragStartDelay:r,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:c,rootElementSelector:l,previewContainer:d}=e;this.disabled=c??!1,this.dragStartDelay=r||0,i&&(this.lockAxis=i),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),l&&(this.rootElementSelector=l),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.changes.pipe(er(this._handles),gi(e=>{const i=e.filter(r=>r._parentDrag===this).map(r=>r.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Ji(e=>oi(...e.map(i=>i._stateChanges.pipe(er(i))))),St(this._destroyed)).subscribe(e=>{const i=this._dragRef,r=e.element.nativeElement;e.disabled?i.disableHandle(r):i.enableHandle(r)})}}return n._dragInstances=[],n.\u0275fac=function(e){return new(e||n)(y(Ne),y(n6,12),y(gt),y(Ye),y(ii),y(t6,8),y(Hi,8),y(WS),y(an),y(XS,10),y(qS,12))},n.\u0275dir=X({type:n,selectors:[["","cdkDrag",""]],contentQueries:function(e,i,r){if(1&e&&(qt(r,o6,5),qt(r,r6,5),qt(r,XS,5)),2&e){let o;Ae(o=Ie())&&(i._previewTemplate=o.first),Ae(o=Ie())&&(i._placeholderTemplate=o.first),Ae(o=Ie())&&(i._handles=o)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(e,i){2&e&&ot("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[nt([{provide:qS,useExisting:n}]),jn]}),n})(),ige=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[WS],imports:[Vc]}),n})();function rge(n,t){}class Jy{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let s6=(()=>{class n extends ly{constructor(e,i,r,o,s,a,c,l){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=s,this._ngZone=a,this._overlayRef=c,this._focusMonitor=l,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();const u=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),u},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){const e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const e=this._config.restoreFocus;let i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=Kv(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const e=this._elementRef.nativeElement,i=Kv();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Kv())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(gt,8),y(Jy),y(mg),y(Ye),y(wg),y(ms))},n.\u0275cmp=Ve({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&pt(Bc,7),2&e){let r;Ae(r=Ie())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&vt("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[ye],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&A(0,rge,0,0,"ng-template",0)},dependencies:[Bc],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})();class ZS{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Me,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!so(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{!1!==e.closeOnOverlayDetachments&&this.close()})}close(t,e){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}}const a6=new ae("DialogScrollStrategy"),oge=new ae("DialogData"),sge=new ae("DefaultDialogConfig"),cge={provide:a6,deps:[ao],useFactory:function age(n){return()=>n.scrollStrategies.block()}};let lge=0,c6=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,i,r,o,s,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Me,this._afterOpenedAtThisLevel=new Me,this._ariaHiddenElements=new Map,this.afterAllClosed=lf(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(er(void 0))),this._scrollStrategy=a}open(e,i){(i={...this._defaultOptions||new Jy,...i}).id=i.id||"cdk-dialog-"+lge++,i.id&&this.getDialogById(i.id);const o=this._getOverlayConfig(i),s=this._overlay.create(o),a=new ZS(s,i),c=this._attachContainer(s,a,i);return a.containerInstance=c,this._attachDialogContent(e,a,c,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){JS(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){JS(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),JS(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const i=new Sf({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){const o=r.injector||r.viewContainerRef?.injector,s=[{provide:Jy,useValue:r},{provide:ZS,useValue:i},{provide:wg,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=s6;const c=new Tf(a,r.viewContainerRef,Ni.create({parent:o||this._injector,providers:s}),r.componentFactoryResolver);return e.attach(c).instance}_attachDialogContent(e,i,r,o){if(e instanceof Un){const s=this._createInjector(o,i,r,void 0);let a={$implicit:o.data,dialogRef:i};o.templateContext&&(a={...a,..."function"==typeof o.templateContext?o.templateContext():o.templateContext}),r.attachTemplatePortal(new Lc(e,null,a,s))}else{const s=this._createInjector(o,i,r,this._injector),a=r.attachComponentPortal(new Tf(e,o.viewContainerRef,s,o.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(e,i,r,o){const s=e.injector||e.viewContainerRef?.injector,a=[{provide:oge,useValue:e.data},{provide:ZS,useValue:i}];return e.providers&&("function"==typeof e.providers?a.push(...e.providers(i,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get(Hi,null,{optional:!0}))&&a.push({provide:Hi,useValue:{value:e.direction,change:it()}}),Ni.create({parent:s||o,providers:a})}_removeOpenDialog(e,i){const r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const e=this._overlayContainer.getContainerElement();if(e.parentElement){const i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){const o=i[r];o!==e&&"SCRIPT"!==o.nodeName&&"STYLE"!==o.nodeName&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(Ni),Q(sge,8),Q(n,12),Q(hy),Q(a6))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function JS(n,t){let e=n.length;for(;e--;)t(n[e])}let dge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[c6,cge],imports:[au,ru,GT,ru]}),n})();function uge(n,t){}class ex{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const eD="mdc-dialog--open",l6="mdc-dialog--opening",d6="mdc-dialog--closing";let mge=(()=>{class n extends s6{constructor(e,i,r,o,s,a,c,l){super(e,i,r,o,s,a,c,l),this._animationStateChanged=new De}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(gt,8),y(ex),y(mg),y(Ye),y(wg),y(ms))},n.\u0275cmp=Ve({type:n,selectors:[["ng-component"]],features:[ye],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();const u6="--mat-dialog-transition-duration";function h6(n){return null==n?null:"number"==typeof n?n:n.endsWith("ms")?gr(n.substring(0,n.length-2)):n.endsWith("s")?1e3*gr(n.substring(0,n.length-1)):"0"===n?0:null}let pge=(()=>{class n extends mge{constructor(e,i,r,o,s,a,c,l,d){super(e,i,r,o,s,a,c,d),this._animationMode=l,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?h6(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?h6(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._openAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._closeAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._openAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(u6,`${this._openAnimationDuration}ms`),this._hostElement.classList.add(l6),this._hostElement.classList.add(eD),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(eD),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(eD),this._animationsEnabled?(this._hostElement.style.setProperty(u6,`${this._openAnimationDuration}ms`),this._hostElement.classList.add(d6),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(l6),this._hostElement.classList.remove(d6)}_waitForAnimationToComplete(e,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(gt,8),y(ex),y(mg),y(Ye),y(wg),y(Jn,8),y(ms))},n.\u0275cmp=Ve({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,i){2&e&&(Ba("id",i._config.id),vt("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),ot("_mat-animation-noopable",!i._animationsEnabled))},features:[ye],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1),A(2,uge,0,0,"ng-template",2),v()())},dependencies:[Bc],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title,.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__actions,.mat-mdc-dialog-container.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title{border-bottom-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, "Arial");line-height:var(--mdc-dialog-subhead-line-height, 14px);font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500);letter-spacing:var(--mdc-dialog-subhead-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, black)}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, "Arial");line-height:var(--mdc-dialog-supporting-text-line-height, 14px);font-size:var(--mdc-dialog-supporting-text-size, 14px);font-weight:var(--mdc-dialog-supporting-text-weight, 500);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, black)}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2}),n})();class Ql{constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new Me,this._beforeClosed=new Me,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(mn(r=>"opened"===r.state),An(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(mn(r=>"closed"===r.state),An(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),oi(this.backdropClick(),this.keydownEvents().pipe(mn(r=>27===r.keyCode&&!this.disableClose&&!so(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),f6(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(mn(e=>"closing"===e.state),An(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function f6(n,t,e){return n._closeInteractionType=t,n.close(e)}const tx=new ae("MatMdcDialogData"),gge=new ae("mat-mdc-dialog-default-options"),m6=new ae("mat-mdc-dialog-scroll-strategy"),bge={provide:m6,deps:[ao],useFactory:function _ge(n){return()=>n.scrollStrategies.block()}};let vge=0,yge=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(e,i,r,o,s,a,c,l,d,u){this._overlay=e,this._defaultOptions=r,this._parentDialog=o,this._dialogRefConstructor=c,this._dialogContainerType=l,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Me,this._afterOpenedAtThisLevel=new Me,this._idPrefix="mat-dialog-",this.dialogConfigClass=ex,this.afterAllClosed=lf(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(er(void 0))),this._scrollStrategy=a,this._dialog=i.get(c6)}open(e,i){let r;(i={...this._defaultOptions||new ex,...i}).id=i.id||`${this._idPrefix}${vge++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const o=this._dialog.open(e,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:Jy,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(s,a,c)=>(r=new this._dialogRefConstructor(s,i,c),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return n.\u0275fac=function(e){Fa()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Nf=(()=>{class n extends yge{constructor(e,i,r,o,s,a,c,l){super(e,i,o,a,c,s,Ql,pge,tx,l),this._idPrefix="mat-mdc-dialog-"}}return n.\u0275fac=function(e){return new(e||n)(Q(ao),Q(Ni),Q(Np,8),Q(gge,8),Q(m6),Q(n,12),Q(hy),Q(Jn,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),xge=0,Hg=(()=>{class n{constructor(e,i,r){this.dialogRef=e,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=g6(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){f6(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(e){return new(e||n)(y(Ql,8),y(Ne),y(Nf))},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){1&e&&z("click",function(o){return i._onButtonClick(o)}),2&e&&vt("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[jn]}),n})(),p6=(()=>{class n{constructor(e,i,r){this._dialogRef=e,this._elementRef=i,this._dialog=r,this.id="mat-mdc-dialog-title-"+xge++}ngOnInit(){this._dialogRef||(this._dialogRef=g6(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const e=this._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=this.id)})}}return n.\u0275fac=function(e){return new(e||n)(y(Ql,8),y(Ne),y(Nf))},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,i){2&e&&Ba("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),nx=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),n})(),ix=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-mdc-dialog-actions-align-center","center"===i.align)("mat-mdc-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function g6(n,t){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(i=>i.id===e.id):null}let wge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[Nf,bge],imports:[dge,au,ru,Ft,Ft]}),n})(),Cge=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,this.localEcl="",this.localEcl=i.ecl}onNoClick(){this.dialogRef.close()}eclChanged(e){this.data.ecl=e?.detail[0]}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ql),y(tx))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-ecl-builder-dialog"]],decls:7,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"full-height"],["apiurl","https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct","branch","MAIN/2023-01-31","v-on:eclOutput","eclChange",3,"eclstring","eclOutput"],["mat-dialog-actions","",1,"actions"],["mat-flat-button","","color","accent","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(i,r){1&i&&(_(0,"h1",0),C(1,"ECL Builder"),v(),_(2,"div",1)(3,"snomed-ecl-builder",2),z("eclOutput",function(s){return r.eclChanged(s)}),v()(),_(4,"div",3)(5,"button",4),C(6,"Ok"),v()()),2&i&&(x(3),Xh("eclstring",r.localEcl),x(2),E("mat-dialog-close",r.data))},dependencies:[Fo,Hg,p6,nx,ix],styles:[".full-height[_ngcontent-%COMP%]{height:78%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}return n})();const b6=new ae("CdkAccordion");let kge=0,Ege=(()=>{class n{get expanded(){return this._expanded}set expanded(e){e=Ke(e),this._expanded!==e&&(this._expanded=e,this.expandedChange.emit(e),e?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e)}constructor(e,i,r){this.accordion=e,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=lt.EMPTY,this.closed=new De,this.opened=new De,this.destroyed=new De,this.expandedChange=new De,this.id="cdk-accordion-child-"+kge++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((o,s)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===s&&this.id!==o&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}}return n.\u0275fac=function(e){return new(e||n)(y(b6,12),y(an),y(CT))},n.\u0275dir=X({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[nt([{provide:b6,useValue:void 0}])]}),n})(),Tge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})();const Sge=["body"];function Dge(n,t){}const Age=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Ige=["mat-expansion-panel-header","*","mat-action-row"];function Mge(n,t){1&n&&_e(0,"span",2),2&n&&E("@indicatorRotate",O()._getExpandedState())}const Rge=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Fge=["mat-panel-title","mat-panel-description","*"],v6=new ae("MAT_ACCORDION"),y6="225ms cubic-bezier(0.4,0.0,0.2,1)",x6={indicatorRotate:$n("indicatorRotate",[pn("collapsed, void",ze({transform:"rotate(0deg)"})),pn("expanded",ze({transform:"rotate(180deg)"})),Qt("expanded <=> collapsed, void => collapsed",Gt(y6))]),bodyExpansion:$n("bodyExpansion",[pn("collapsed, void",ze({height:"0px",visibility:"hidden"})),pn("expanded",ze({height:"*",visibility:"visible"})),Qt("expanded <=> collapsed, void => collapsed",Gt(y6))])},w6=new ae("MAT_EXPANSION_PANEL");let Pge=(()=>{class n{constructor(e,i){this._template=e,this._expansionPanel=i}}return n.\u0275fac=function(e){return new(e||n)(y(Un),y(w6,8))},n.\u0275dir=X({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]}),n})(),Oge=0;const C6=new ae("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let k6=(()=>{class n extends Ege{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=Ke(e)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}constructor(e,i,r,o,s,a,c){super(e,i,r),this._viewContainerRef=o,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new De,this.afterCollapse=new De,this._inputChanges=new Me,this._headerId="mat-expansion-panel-header-"+Oge++,this._bodyAnimationDone=new Me,this.accordion=e,this._document=s,this._bodyAnimationDone.pipe(ja((l,d)=>l.fromState===d.fromState&&l.toState===d.toState)).subscribe(l=>{"void"!==l.fromState&&("expanded"===l.toState?this.afterExpand.emit():"collapsed"===l.toState&&this.afterCollapse.emit())}),c&&(this.hideToggle=c.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(er(null),mn(()=>this.expanded&&!this._portal),An(1)).subscribe(()=>{this._portal=new Lc(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const e=this._document.activeElement,i=this._body.nativeElement;return e===i||i.contains(e)}return!1}}return n.\u0275fac=function(e){return new(e||n)(y(v6,12),y(an),y(CT),y(ii),y(gt),y(Jn,8),y(C6,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(e,i,r){if(1&e&&qt(r,Pge,5),2&e){let o;Ae(o=Ie())&&(i._lazyContent=o.first)}},viewQuery:function(e,i){if(1&e&&pt(Sge,5),2&e){let r;Ae(r=Ie())&&(i._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,i){2&e&&ot("mat-expanded",i.expanded)("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[nt([{provide:v6,useValue:void 0},{provide:w6,useExisting:n}]),ye,jn],ngContentSelectors:Ige,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(e,i){1&e&&(Rn(Age),dt(0),_(1,"div",0,1),z("@bodyExpansion.done",function(o){return i._bodyAnimationDone.next(o)}),_(3,"div",2),dt(4,1),A(5,Dge,0,0,"ng-template",3),v(),dt(6,2),v()),2&e&&(x(1),E("@bodyExpansion",i._getExpandedState())("id",i.id),vt("aria-labelledby",i._headerId),x(4),E("cdkPortalOutlet",i._portal))},dependencies:[Bc],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[x6.bodyExpansion]},changeDetection:0}),n})();class Nge{}const Lge=gg(Nge);let Bge=(()=>{class n extends Lge{constructor(e,i,r,o,s,a,c){super(),this.panel=e,this._element=i,this._focusMonitor=r,this._changeDetectorRef=o,this._animationMode=a,this._parentChangeSubscription=lt.EMPTY;const l=e.accordion?e.accordion._stateChanges.pipe(mn(d=>!(!d.hideToggle&&!d.togglePosition))):ns;this.tabIndex=parseInt(c||"")||0,this._parentChangeSubscription=oi(e.opened,e.closed,l,e._inputChanges.pipe(mn(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(mn(()=>e._containsFocus())).subscribe(()=>r.focusVia(i,"program")),s&&(this.expandedHeight=s.expandedHeight,this.collapsedHeight=s.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:so(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}}focus(e,i){e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return n.\u0275fac=function(e){return new(e||n)(y(k6,1),y(Ne),y(ms),y(an),y(C6,8),y(Jn,8),Ms("tabindex"))},n.\u0275cmp=Ve({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&z("click",function(){return i._toggle()})("keydown",function(o){return i._keydown(o)}),2&e&&(vt("id",i.panel._headerId)("tabindex",i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Ai("height",i._getHeaderHeight()),ot("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after","after"===i._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===i._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[ye],ngContentSelectors:Fge,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,i){1&e&&(Rn(Rge),_(0,"span",0),dt(1),dt(2,1),dt(3,2),v(),A(4,Mge,1,1,"span",1)),2&e&&(ot("mat-content-hide-toggle",!i._showToggle()),x(4),E("ngIf",i._showToggle()))},dependencies:[ri],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[x6.indicatorRotate]},changeDetection:0}),n})(),Vge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),n})(),Uge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),n})(),Hge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft,Tge,ru]}),n})();function zge(n,t){if(1&n){const e=Le();_(0,"mat-option",2),z("click",function(){return he(e),fe(O().optionClicked())}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e),x(1),Qe(" ",e.display," ")}}let jge=(()=>{class n{constructor(e){this.terminologyService=e,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>this.options=e.expansion.contains)}optionClicked(){this.selectionChange.emit(this.selectedOptions)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-dropdown-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:7,vars:5,consts:[[3,"multiple","ngModel","ngModelChange"],[3,"value","click",4,"ngFor","ngForOf"],[3,"value","click"]],template:function(i,r){1&i&&(_(0,"mat-form-field")(1,"mat-label"),C(2),v(),_(3,"mat-select",0),z("ngModelChange",function(s){return r.selectedOptions=s}),A(4,zge,2,2,"mat-option",1),v(),_(5,"mat-hint"),C(6),v()()),2&i&&(x(2),Je(r.binding.title),x(1),E("multiple","Select (Multiple)"==r.binding.type)("ngModel",r.selectedOptions),x(1),E("ngForOf",r.options),x(2),Je(r.binding.note))},dependencies:[io,ba,gs,gu,Ll,qo,Lg,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();const $ge=["input"],Gge=["*"];let E6=0;class T6{constructor(t,e){this.source=t,this.value=e}}const Wge={provide:Hr,useExisting:hn(()=>tD),multi:!0},S6=new ae("MatRadioGroup"),qge=new ae("mat-radio-default-options",{providedIn:"root",factory:function Qge(){return{color:"accent"}}});let Kge=(()=>{class n{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition="before"===e?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=Ke(e),this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=Ke(e),this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+E6++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new De}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new T6(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}}return n.\u0275fac=function(e){return new(e||n)(y(an))},n.\u0275dir=X({type:n,inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"}}),n})();class Xge{constructor(t){this._elementRef=t}}const Yge=Ol(gg(Xge));let Zge=(()=>{class n extends Yge{get checked(){return this._checked}set checked(e){const i=Ke(e);this._checked!==i&&(this._checked=i,i&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!i&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),i&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(e){this._setDisabled(Ke(e))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=Ke(e)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,r,o,s,a,c,l){super(i),this._changeDetector=r,this._focusMonitor=o,this._radioDispatcher=s,this._providerOverride=c,this._uniqueId="mat-radio-"+ ++E6,this.id=this._uniqueId,this.change=new De,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=e,this._noopAnimations="NoopAnimations"===a,l&&(this.tabIndex=gr(l,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new T6(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){const i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){const e=this.radioGroup;let i;if(i=e&&e.selected&&!this.disabled?e.selected===this?this.tabIndex:-1:this.tabIndex,i!==this._previousTabIndex){const r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",i+""),this._previousTabIndex=i)}}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&pt($ge,5),2&e){let r;Ae(r=Ie())&&(i._inputElement=r.first)}},inputs:{id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},features:[ye]}),n})(),tD=(()=>{class n extends Kge{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Nt(n)))(i||n)}}(),n.\u0275dir=X({type:n,selectors:[["mat-radio-group"]],contentQueries:function(e,i,r){if(1&e&&qt(r,nD,5),2&e){let o;Ae(o=Ie())&&(i._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],exportAs:["matRadioGroup"],features:[nt([Wge,{provide:S6,useExisting:n}]),ye]}),n})(),nD=(()=>{class n extends Zge{constructor(e,i,r,o,s,a,c,l){super(e,i,r,o,s,a,c,l)}}return n.\u0275fac=function(e){return new(e||n)(y(S6,8),y(Ne),y(an),y(ms),y(CT),y(Jn,8),y(qge,8),Ms("tabindex"))},n.\u0275cmp=Ve({type:n,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(e,i){1&e&&z("focus",function(){return i._inputElement.nativeElement.focus()}),2&e&&(vt("id",i.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),ot("mat-primary","primary"===i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("mat-mdc-radio-checked",i.checked)("_mat-animation-noopable",i._noopAnimations))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[ye],ngContentSelectors:Gge,decls:13,vars:17,consts:[[1,"mdc-form-field"],["formField",""],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"id","checked","disabled","required","change"],["input",""],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[3,"for"]],template:function(e,i){if(1&e&&(Rn(),_(0,"div",0,1)(2,"div",2)(3,"div",3),z("click",function(o){return i._onTouchTargetClick(o)}),v(),_(4,"input",4,5),z("change",function(o){return i._onInputInteraction(o)}),v(),_(6,"div",6),_e(7,"div",7)(8,"div",8),v(),_(9,"div",9),_e(10,"div",10),v()(),_(11,"label",11),dt(12),v()()),2&e){const r=Pt(1);ot("mdc-form-field--align-end","before"==i.labelPosition),x(2),ot("mdc-radio--disabled",i.disabled),x(2),E("id",i.inputId)("checked",i.checked)("disabled",i.disabled)("required",i.required),vt("name",i.name)("value",i.value)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby),x(5),E("matRippleTrigger",r)("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0),x(2),E("for",i.inputId)}},dependencies:[Bs],styles:['.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, #6200ee)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, #000)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, #000)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, #000)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);right:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);left:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-mdc-radio-ripple-color, transparent)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-mdc-radio-checked-ripple-color, transparent)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-mdc-radio-checked-ripple-color, transparent)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0}),n})(),Jge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Br,Nl,Ft]}),n})();function e_e(n,t){if(1&n){const e=Le();_(0,"mat-radio-button",3),z("click",function(){const o=he(e).$implicit;return fe(O().optionSelected(o))}),C(1),v()}if(2&n){const e=t.$implicit;E("value",e.code),x(1),Qe(" ",e.display," ")}}let t_e=(()=>{class n{constructor(e){this.terminologyService=e,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(e=>this.options=e.expansion.contains)}optionSelected(e){this.selectionChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-radios-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:3,consts:[["aria-label","Select an option",1,"radio-group"],["class","radio-button",3,"value","click",4,"ngFor","ngForOf"],["id","hint"],[1,"radio-button",3,"value","click"]],template:function(i,r){1&i&&(_(0,"div"),C(1),v(),_(2,"mat-radio-group",0),A(3,e_e,2,2,"mat-radio-button",1),v(),_(4,"div",2),C(5),v()),2&i&&(x(1),Je(r.binding.title),x(2),E("ngForOf",r.options),x(2),Je(r.binding.note))},dependencies:[io,tD,nD],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:0}"]})}return n})(),n_e=(()=>{class n{constructor(e){this.terminologyService=e,this.textChange=new De,this.text=""}ngOnInit(){}onTextChange(e){this.text=e,this.textChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-textbox-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","placeholder","Enter text...",3,"ngModel","ngModelChange"]],template:function(i,r){1&i&&(_(0,"mat-form-field",0)(1,"mat-label"),C(2),v(),_(3,"textarea",1),z("ngModelChange",function(s){return r.text=s})("ngModelChange",function(s){return r.onTextChange(s)}),v(),_(4,"mat-hint"),C(5),v()()),2&i&&(x(2),Je(r.binding.title),x(1),E("ngModel",r.text),x(2),Je(r.binding.note))},dependencies:[ba,gs,gu,ql,Us,qo,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();const i_e=["input"],r_e=["label"],o_e=["*"],s_e=new ae("mat-checkbox-default-options",{providedIn:"root",factory:D6});function D6(){return{color:"accent",clickAction:"check-indeterminate"}}const a_e={provide:Hr,useExisting:hn(()=>I6),multi:!0};class c_e{}let l_e=0;const A6=D6(),d_e=gg(Pl(Ol(Oc(class{constructor(n){this._elementRef=n}}))));let u_e=(()=>{class n extends d_e{get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(e){this._required=Ke(e)}constructor(e,i,r,o,s,a,c){super(i),this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=c,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new De,this.indeterminateChange=new De,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||A6,this.color=this.defaultColor=this._options.color||A6.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`${e}${++l_e}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){const i=Ke(e);i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){const i=Ke(e);i!==this.disabled&&(this._disabled=i,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){const i=e!=this._indeterminate;this._indeterminate=Ke(e),i&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(i!==e&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const e=this._options?.clickAction;this.disabled||"noop"===e?!this.disabled&&"noop"===e&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==e&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if("NoopAnimations"===this._animationMode)return"";switch(e){case 0:if(1===i)return this._animationClasses.uncheckedToChecked;if(3==i)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===i?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===i?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===i?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){const i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}}return n.\u0275fac=function(e){Fa()},n.\u0275dir=X({type:n,viewQuery:function(e,i){if(1&e&&(pt(i_e,5),pt(r_e,5),pt(Bs,5)),2&e){let r;Ae(r=Ie())&&(i._inputElement=r.first),Ae(r=Ie())&&(i._labelElement=r.first),Ae(r=Ie())&&(i.ripple=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[ye]}),n})(),I6=(()=>{class n extends u_e{constructor(e,i,r,o,s,a){super("mat-mdc-checkbox-",e,i,r,o,s,a),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"}}focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){const i=new c_e;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_onInputClick(){super._handleInputClick()}_onTouchTargetClick(){super._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(an),y(Ye),Ms("tabindex"),y(Jn,8),y(s_e,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-mdc-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&(Ba("id",i.id),vt("tabindex",null)("aria-label",null)("aria-labelledby",null),ot("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mdc-checkbox--disabled",i.disabled)("mat-mdc-checkbox-disabled",i.disabled)("mat-mdc-checkbox-checked",i.checked))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[nt([a_e]),ye],ngContentSelectors:o_e,decls:15,vars:19,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[3,"for"],["label",""]],template:function(e,i){if(1&e&&(Rn(),_(0,"div",0),z("click",function(o){return i._preventBubblingFromLabel(o)}),_(1,"div",1,2)(3,"div",3),z("click",function(){return i._onTouchTargetClick()}),v(),_(4,"input",4,5),z("blur",function(){return i._onBlur()})("click",function(){return i._onInputClick()})("change",function(o){return i._onInteractionEvent(o)}),v(),_e(6,"div",6),_(7,"div",7),xc(),_(8,"svg",8),_e(9,"path",9),v(),Eh(),_e(10,"div",10),v(),_e(11,"div",11),v(),_(12,"label",12,13),dt(14),v()()),2&e){const r=Pt(2);ot("mdc-form-field--align-end","before"==i.labelPosition),x(4),ot("mdc-checkbox--selected",i.checked),E("checked",i.checked)("indeterminate",i.indeterminate)("disabled",i.disabled)("id",i.inputId)("required",i.required)("tabIndex",i.tabIndex),vt("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby)("name",i.name)("value",i.value),x(7),E("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0),x(1),E("for",i.inputId)}},dependencies:[Bs],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:not([disabled])~.mdc-checkbox__ripple{opacity:.04;transform:scale(1);transition:opacity 80ms 0 cubic-bezier(0, 0, 0.2, 1),transform 80ms 0 cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:.16}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__native-control:focus:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, black)}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),M6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({}),n})(),m_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Nl,M6,Ft,M6]}),n})();function p_e(n,t){if(1&n){const e=Le();_(0,"mat-checkbox",3),z("click",function(){return he(e),fe(O().optionClicked())}),C(1),v()}if(2&n){const e=t.$implicit;Xh("formControlName",e.display),x(1),Qe(" ",e.display," ")}}let g_e=(()=>{class n{constructor(e,i){this.terminologyService=e,this._formBuilder=i,this.selectionChange=new De,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.options=[{display:this.binding.title}],this.options?.forEach(e=>{this.checkboxes.addControl(e.display,this._formBuilder.control(!1))})}optionClicked(){let e=[];e.push({title:this.binding.title,code:this.binding.ecl,value:this.checkboxes.value[this.binding.title]?this.present:this.absent}),this.selectionChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(o8))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-checkbox-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:4,vars:3,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","before",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","before",1,"check",3,"formControlName","click"]],template:function(i,r){1&i&&(_(0,"form",0),A(1,p_e,2,2,"mat-checkbox",1),_(2,"span",2),C(3),v()()),2&i&&(E("formGroup",r.checkboxes),x(1),E("ngForOf",r.options),x(2),Je(r.binding.note))},dependencies:[io,Fg,qo,Sg,Wl,Pg,I6],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}return n})(),__e=(()=>{class n{constructor(e){this.terminologyService=e,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(e){this.value=e,this.textChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-integer-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter integer value...","pattern","^-?[0-9]\\d*$","title","Only integer values are allowed",3,"ngModel","ngModelChange"]],template:function(i,r){1&i&&(_(0,"mat-form-field",0)(1,"mat-label"),C(2),v(),_(3,"input",1),z("ngModelChange",function(s){return r.value=s})("ngModelChange",function(s){return r.onValueChange(s)}),v(),_(4,"mat-hint"),C(5),v()()),2&i&&(x(2),Je(r.binding.title),x(1),E("ngModel",r.value),x(2),Je(r.binding.note))},dependencies:[ba,gs,gu,ql,Us,By,qo,zy,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})(),b_e=(()=>{class n{constructor(e){this.terminologyService=e,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(e){this.value=e,this.textChange.emit(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-decimal-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter decimal value...","pattern","^-?[0-9]*\\.?[0-9]+$","title","Only decimal values are allowed","step","any",3,"ngModel","ngModelChange"]],template:function(i,r){1&i&&(_(0,"mat-form-field",0)(1,"mat-label"),C(2),v(),_(3,"input",1),z("ngModelChange",function(s){return r.value=s})("ngModelChange",function(s){return r.onValueChange(s)}),v(),_(4,"mat-hint"),C(5),v()()),2&i&&(x(2),Je(r.binding.title),x(1),E("ngModel",r.value),x(2),Je(r.binding.note))},dependencies:[ba,gs,gu,ql,Us,By,qo,zy,ps],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return n})();const v_e=["newPanel"];function y_e(n,t){1&n&&(_(0,"mat-panel-description"),C(1," Click to add new binding "),v())}function x_e(n,t){if(1&n){const e=Le();_(0,"button",46),z("click",function(){let o;return he(e),fe(null==(o=O().newBindingForm.get("title"))?null:o.reset())}),_(1,"mat-icon"),C(2,"close"),v()()}}function w_e(n,t){1&n&&(_(0,"span"),C(1,"Restrict to Observables"),v())}function C_e(n,t){1&n&&(_(0,"span"),C(1,"Open to Observables + Findings + Procedures + Situations"),v())}function k_e(n,t){if(1&n&&(_(0,"mat-option",47),C(1),v()),2&n){const e=t.$implicit;E("value",e),x(1),Qe(" ",e," ")}}function E_e(n,t){if(1&n){const e=Le();_(0,"button",46),z("click",function(){let o;return he(e),fe(null==(o=O(2).newBindingForm.get("ecl"))?null:o.reset())}),_(1,"mat-icon"),C(2,"close"),v()()}}function T_e(n,t){if(1&n){const e=Le();_(0,"mat-form-field",12)(1,"mat-label"),C(2,"Answer options: ECL Expression"),v(),_e(3,"input",48),_(4,"a",49),z("click",function(){he(e);const r=O();let o;return fe(r.openEclBuilder(null==(o=r.newBindingForm.get("ecl"))?null:o.value,"ecl"))}),C(5,"ECL Builder"),v(),A(6,E_e,3,0,"button",14),_(7,"mat-error"),C(8),v()()}if(2&n){const e=O();let i;x(6),E("ngIf",null==(i=e.newBindingForm.get("ecl"))?null:i.value),x(2),Je(e.getErrorMessage("ecl"))}}function S_e(n,t){1&n&&(_(0,"span"),C(1,"Restrict to Observables"),v())}function D_e(n,t){1&n&&(_(0,"span"),C(1,"Open to Observables + Findings + Procedures"),v())}function A_e(n,t){if(1&n){const e=Le();_(0,"mat-form-field",12),_e(1,"app-autocomplete-binding",50),_(2,"a",17),z("click",function(){return he(e),fe(O().toggleCheckboxBinding())}),A(3,S_e,2,0,"span",8),A(4,D_e,2,0,"span",8),v(),_(5,"mat-error"),C(6),v()()}if(2&n){const e=O();x(1),E("binding",e.checkboxBinding),x(2),E("ngIf",e.checkboxBinding.ecl===e.codeBindingAll.ecl),x(1),E("ngIf",e.checkboxBinding.ecl!=e.codeBindingAll.ecl),x(2),Je(e.getErrorMessage("ecl"))}}function I_e(n,t){if(1&n){const e=Le();_(0,"button",46),z("click",function(){let o;return he(e),fe(null==(o=O(2).newBindingForm.get("note"))?null:o.reset())}),_(1,"mat-icon"),C(2,"close"),v()()}}function M_e(n,t){if(1&n&&(_(0,"mat-form-field",51)(1,"mat-label"),C(2,"Note"),v(),_e(3,"input",52),A(4,I_e,3,0,"button",14),_(5,"mat-error"),C(6),v()()),2&n){const e=O();let i;x(4),E("ngIf",null==(i=e.newBindingForm.get("note"))?null:i.value),x(2),Je(e.getErrorMessage("note"))}}function R_e(n,t){if(1&n){const e=Le();_(0,"button",25),z("click",function(){return he(e),fe(O().addBinding())}),C(1,"Add binding"),v()}}function F_e(n,t){if(1&n){const e=Le();_(0,"button",25),z("click",function(){he(e);const r=O();return r.addBinding(),fe(r.clearOutput())}),C(1,"Update binding"),v()}}function P_e(n,t){if(1&n){const e=Le();_(0,"button",35),z("click",function(){he(e);const r=O();return fe(r.showRightContainer=!r.showRightContainer)}),C(1),v()}if(2&n){const e=O();x(1),Qe(" ",e.showRightContainer?"Close data panel":"Open data panel"," ")}}function O_e(n,t){1&n&&(_(0,"button",53),C(1," Download form "),v()),2&n&&(O(),E("matMenuTriggerFor",Pt(69)))}function N_e(n,t){if(1&n){const e=Le();_(0,"div",54)(1,"p",55),C(2),v(),_(3,"button",56),z("click",function(){return he(e),fe(O().titleEditMode=!0)}),_(4,"mat-icon"),C(5,"edit"),v()()()}if(2&n){const e=O();x(2),Je(e.formTitle)}}const L_e=function(){return{standalone:!0}};function B_e(n,t){if(1&n){const e=Le();_(0,"div",54)(1,"form",57)(2,"mat-form-field")(3,"mat-label"),C(4,"Title"),v(),_(5,"input",58),z("ngModelChange",function(r){return he(e),fe(O().formTitle=r)})("ngModelChange",function(){return he(e),fe(O().refreshFhirQuestionnaire())}),v(),_(6,"button",46),z("click",function(){return he(e),fe(O().formTitle="")}),_(7,"mat-icon"),C(8,"close"),v()()()(),_(9,"button",56),z("click",function(){return he(e),fe(O().titleEditMode=!1)}),_(10,"mat-icon"),C(11,"save"),v()()()}if(2&n){const e=O();x(5),E("ngModel",e.formTitle)("ngModelOptions",us(2,L_e))}}function V_e(n,t){if(1&n){const e=Le();_(0,"app-autocomplete-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function U_e(n,t){if(1&n){const e=Le();_(0,"app-dropdown-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function H_e(n,t){if(1&n){const e=Le();_(0,"app-radios-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function z_e(n,t){if(1&n&&(_(0,"span",68),C(1),v()),2&n){const e=O().$implicit;x(1),Je(e.title)}}function j_e(n,t){if(1&n){const e=Le();_(0,"app-textbox-binding",69),z("textChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function $_e(n,t){if(1&n){const e=Le();_(0,"app-integer-binding",69),z("textChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function G_e(n,t){if(1&n){const e=Le();_(0,"app-decimal-binding",69),z("textChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function W_e(n,t){if(1&n){const e=Le();_(0,"app-checkbox-binding",67),z("selectionChange",function(r){he(e);const o=O().$implicit;return fe(O().optionSelected(o.title,o.code,r))}),v()}2&n&&E("binding",O().$implicit)}function q_e(n,t){if(1&n&&(_(0,"button",70)(1,"mat-icon"),C(2,"info"),v()()),2&n){const e=O().$implicit;E("matMenuTriggerFor",Pt(14))("disabled",!e.code&&!e.ecl)}}function Q_e(n,t){if(1&n&&(_(0,"span",3),z("click",function(i){return i.stopPropagation()}),_(1,"h4"),C(2,"Question terminology binding"),v(),_(3,"pre"),C(4),v()()),2&n){const e=O().$implicit;E("disableRipple",!0),x(4),qd("",null==e.code?null:e.code.code," |",null==e.code?null:e.code.display,"|")}}function K_e(n,t){if(1&n&&(_(0,"span",3),z("click",function(i){return i.stopPropagation()}),_(1,"h4"),C(2,"Answer terminology binding"),v(),_(3,"pre"),C(4),v()()),2&n){const e=O().$implicit;E("disableRipple",!0),x(4),Je(e.ecl)}}function X_e(n,t){if(1&n){const e=Le();_(0,"div",59)(1,"div",60)(2,"mat-icon",61),C(3,"drag_indicator"),v(),A(4,V_e,1,1,"app-autocomplete-binding",62),A(5,U_e,1,1,"app-dropdown-binding",62),A(6,H_e,1,1,"app-radios-binding",62),A(7,z_e,2,1,"span",63),A(8,j_e,1,1,"app-textbox-binding",64),A(9,$_e,1,1,"app-integer-binding",64),A(10,G_e,1,1,"app-decimal-binding",64),A(11,W_e,1,1,"app-checkbox-binding",62),A(12,q_e,3,2,"button",65),_(13,"mat-menu",null,2),A(15,Q_e,5,3,"span",66),A(16,K_e,5,2,"span",66),v(),_(17,"button",56),z("click",function(){const o=he(e).index;return fe(O().bindings.splice(o,1))}),_(18,"mat-icon"),C(19,"delete"),v()(),_(20,"button",56),z("click",function(){const o=he(e).index;return fe(O().edit(o))}),_(21,"mat-icon"),C(22,"edit"),v()()()()}if(2&n){const e=t.$implicit;x(4),E("ngIf","Autocomplete"==e.type),x(1),E("ngIf","Select (Single)"==e.type||"Select (Multiple)"==e.type),x(1),E("ngIf","Options"==e.type),x(1),E("ngIf","Section header"==e.type),x(1),E("ngIf","Text box"==e.type),x(1),E("ngIf","Integer"==e.type),x(1),E("ngIf","Decimal"==e.type),x(1),E("ngIf","Checkbox"==e.type),x(1),E("ngIf","Section header"!=e.type),x(3),E("ngIf",e.code),x(1),E("ngIf",e.ecl)}}function Y_e(n,t){if(1&n){const e=Le();_(0,"div",74)(1,"button",75),z("click",function(){he(e);const r=O(2);return fe(r.saveOutput(r.outputStr))}),_e(2,"mat-icon",76),v(),_(3,"button",77),z("click",function(){he(e);const r=O(2);return fe(r.copyOutputToClipboard(r.outputStr))}),_e(4,"mat-icon",78),v()()}}const iD=function(){return{}};function Z_e(n,t){if(1&n&&(_(0,"div",71),A(1,Y_e,5,0,"div",72),_(2,"textarea",73),C(3," "),v()()),2&n){const e=O();x(1),E("ngIf",e.showRightContainer),x(1),E("options",us(4,iD))("lang","json")("innerHTML",e.responseStr,zd)}}function J_e(n,t){if(1&n){const e=Le();_(0,"div",74)(1,"button",75),z("click",function(){he(e);const r=O(2);return fe(r.saveBundleOutput(r.responseBundleStr))}),_e(2,"mat-icon",76),v(),_(3,"button",77),z("click",function(){he(e);const r=O(2);return fe(r.copyOutputToClipboard(r.responseBundleStr))}),_e(4,"mat-icon",78),v()()}}function e0e(n,t){if(1&n&&(_(0,"div",71),A(1,J_e,5,0,"div",72),_(2,"textarea",73),C(3," "),v()()),2&n){const e=O();x(1),E("ngIf",e.showRightContainer),x(1),E("options",us(4,iD))("lang","json")("innerHTML",e.responseBundleStr,zd)}}function t0e(n,t){if(1&n){const e=Le();_(0,"div",74)(1,"button",75),z("click",function(){he(e);const r=O(2);return fe(r.saveOutput(r.fhirQuestionnaireStr))}),_e(2,"mat-icon",76),v(),_(3,"button",77),z("click",function(){he(e);const r=O(2);return fe(r.copyOutputToClipboard(r.fhirQuestionnaireStr))}),_e(4,"mat-icon",78),v()()}}function n0e(n,t){if(1&n&&(_(0,"div",71),A(1,t0e,5,0,"div",72),_(2,"textarea",73),C(3," "),v()()),2&n){const e=O();x(1),E("ngIf",e.showRightContainer),x(1),E("options",us(4,iD))("lang","json")("innerHTML",e.fhirQuestionnaireStr,zd)}}let i0e=(()=>{class n{constructor(e,i,r){this.terminologyService=e,this.clipboard=i,this.dialog=r,this.formTitle="My new form",this.titleEditMode=!1,this.bindings=[],this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}",this.fhirQuestionnaire={},this.fhirQuestionnaireStr="{}",this.observableBinding={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingObservables={title:"Question code (Observables)",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingAll={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)| OR << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)| OR << 243796009 |Situation with explicit context (situation)|",value:""},this.codeBinding=this.codeBindingAll,this.checkboxBinding=JSON.parse(JSON.stringify(this.codeBindingAll)),this.example1={title:"Appendicitis data entry form (example)",bindings:[{title:"Diagnosis (type of appendicitis)",type:"Autocomplete",ecl:"<< 74400008 |Appendicitis|",value:"",note:"An autocomplete field to select between all descendants of appendicitis."},{title:"Clinical note",type:"Text box",ecl:"74400008 |Appendicitis|",value:"",note:"A text box for entering free text clinical information."},{title:"Appendicitis type",type:"Select (Single)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A single selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicitis type (M)",type:"Select (Multiple)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A multiple selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicectomy type",type:"Options",ecl:"<< 174036004 |Emergency appendectomy (procedure)|",value:"",note:"A radio buttons selector for the type of appendicectomy procedure."}]},this.newBindingForm=new Pf({title:new Qo("",[Rf.required,Rf.maxLength(50)]),code:new Qo("",[]),type:new Qo("",[Rf.required]),ecl:new Qo("",[]),value:new Qo("",[]),note:new Qo("",[Rf.maxLength(500)])}),this.indexInEdit=-1,this.panelOpenState=!1,this.maxSelectCount=50,this.maxOptionsCount=10,this.controlTypes=["Autocomplete","Select (Single)","Select (Multiple)","Options","Section header","Text box","Integer","Decimal","Checkbox"].sort((o,s)=>o.localeCompare(s)),this.showRightContainer=!1}ngOnInit(){this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}get stateName(){return this.showRightContainer?"open":"closed"}addBinding(){var e=this;return xe(function*(){if(e.newBindingForm.markAllAsTouched(),e.newBindingForm.invalid)return;const{title:i,code:r,type:o,ecl:s,value:a,note:c}=e.newBindingForm.controls;let l={title:i.value,code:r.value,type:o.value,ecl:s.value,value:a.value,note:c.value},d=!1;s.value?typeof l.type?.indexOf("Select")<"u"&&l.type?.indexOf("Select")>-1?(yield e.getEclPreview(s.value)).expansion.contains.length>e.maxSelectCount&&(d=!0,s.setErrors({selectTooManyResults:!0})):typeof l.type?.indexOf("Options")<"u"&&l.type?.indexOf("Options")>-1&&(yield e.getEclPreview(s.value)).expansion.contains.length>e.maxOptionsCount&&(d=!0,s.setErrors({optionsTooManyResults:!0})):"Section header"!=l.type&&"Text box"!=l.type&&"Integer"!=l.type&&"Decimal"!=l.type&&(d=!0,s.setErrors({required:!0})),!d&&(e.indexInEdit>-1?e.bindings[e.indexInEdit]=l:e.bindings.push(l),e.newBindingForm.reset(),e.newPanel.close(),e.indexInEdit=-1,setTimeout(()=>{e.refreshFhirQuestionnaire(),e.refreshResponse()},100))})()}refreshFhirQuestionnaire(){this.fhirQuestionnaire={resourceType:"Questionnaire",title:this.formTitle,status:"draft",item:[]},this.bindings.forEach((e,i)=>{const r=this.createItemForBinding(e,i);r&&this.fhirQuestionnaire.item.push(r)}),this.fhirQuestionnaireStr=JSON.stringify(this.fhirQuestionnaire,null,2)}createItemForBinding(e,i){const r=this.initializeBaseItem(e,i);return["Select (Single)","Select (Multiple)","Options","Autocomplete"].includes(e.type)&&(r.extension=this.getExtensionForSelectableTypes(),r.answerValueSet=this.getAnswerValueSet(e)),"Autocomplete"===e.type&&r.extension.push(this.getAutocompleteExtension()),"Select (Multiple)"===e.type&&(r.repeats=!0),r}initializeBaseItem(e,i){const r={linkId:i+1,text:e.title,type:this.getQuestionnaireItemType(e.type)};return e.code&&(r.code=[{system:"http://snomed.info/sct",code:e.code.code,display:e.code.display}]),r}getQuestionnaireItemType(e){switch(e){case"Section header":return"display";case"Select (Single)":case"Select (Multiple)":case"Options":case"Autocomplete":return"choice";case"Text box":return"text";case"Integer":return"integer";case"Decimal":return"decimal";default:return console.warn(`Unhandled binding type: ${e}`),null}}getExtensionForSelectableTypes(){return[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-preferredTerminologyServer",valueUrl:"https://snowstorm.ihtsdotools.org/fhir"}]}getAutocompleteExtension(){return{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"autocomplete",display:"Auto-complete"}]}}}getAnswerValueSet(e){return`http://snomed.info/sct/900000000000207008?fhir_vs=ecl%2F${encodeURIComponent(e.ecl)}`}getEclPreview(e){var i=this;return xe(function*(){return oo((yield i.terminologyService.expandValueSet(e,"")).pipe(ct(o=>o)))})()}edit(e){this.indexInEdit=e;const i=this.bindings[e];this.newBindingForm.setValue({title:i.title,code:i.code?i.code:"",type:i.type,ecl:i.ecl,value:i.value,note:i.note}),this.newPanel.open()}onDrop(e){GS(this.bindings,e.previousIndex,e.currentIndex)}getErrors(e){const i=this.newBindingForm.get(e);return i?i.errors:null}getErrorMessage(e){const i=this.getErrors(e);if(i){if(i.required)return"This field is required";if(i.maxlength)return`This field must be less than ${i.maxlength.requiredLength} characters`;if(i.selectTooManyResults)return`Too many results (Max = ${this.maxSelectCount})`;if(i.optionsTooManyResults)return`Too many results (Max = ${this.maxOptionsCount})`}return null}refreshResponse(){this.response={};for(let e of this.bindings)this.response[e.title]={},e.code&&(this.response[e.title].code=e.code);for(let[e,i]of Object.entries(this.output))this.output[e].code&&(this.response[e].code=this.output[e].code),this.output[e].value&&(this.response[e].value=this.output[e].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[e,i]of Object.entries(this.response)){let r=i;const s=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let a={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};a.code=(r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0)||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},s&&(a.valueCodeableConcept=s),r.value&&"string"==typeof r.value&&(a.valueString=r.value),(a.valueCodeableConcept||a.valueString)&&this.responseBundle.entry.push(a)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}optionSelected(e,i,r){this.output[e]={code:i,value:r},i||delete this.output[e].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}loadExample1(){this.formTitle=this.example1.title,this.bindings=this.example1.bindings,this.refreshFhirQuestionnaire(),this.clearOutput(),this.refreshResponse()}cancelEdit(){this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1}clear(){this.bindings=[],this.clearOutput(),this.newBindingForm.reset(),this.formTitle="My new form",this.showRightContainer=!1}clearOutput(){this.output={},this.outputStr="{}";const e=JSON.parse(JSON.stringify(this.bindings));this.bindings=[],this.bindings=e}saveForm(){var e=new Blob([JSON.stringify({title:this.formTitle,bindings:this.bindings},null,2)],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(e,`${this.formTitle}.json`)}saveOutput(e){var i=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(i,`${this.formTitle}-data.json`)}saveBundleOutput(e){var i=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(i,`${this.formTitle}-fhir-bundle.json`)}copyOutputToClipboard(e){this.clipboard.copy(e)}uploadFile(e){if(1!==e.target.files.length)console.error("No file selected");else{const i=new FileReader;i.onloadend=r=>{if(i.result){const o=JSON.parse(i.result?.toString());Array.isArray(o)?(this.bindings=o,this.formTitle="My new form"):(this.bindings=[],this.bindings=o.bindings,this.formTitle=o.title),this.clearOutput(),this.refreshResponse(),this.refreshFhirQuestionnaire()}},i.readAsText(e.target.files[0])}}openEclBuilder(e,i){this.dialog.open(Cge,{data:{ecl:e},width:"80%",height:"80%"}).afterClosed().subscribe(o=>{if(o){const s=this.newBindingForm.get(i);s&&s.setValue(o.ecl)}})}toggleCodeBinding(){this.codeBinding=this.codeBinding===this.codeBindingAll?this.codeBindingObservables:this.codeBindingAll}toggleCheckboxBinding(){this.checkboxBinding=this.checkboxBinding.ecl===this.codeBindingAll.ecl?JSON.parse(JSON.stringify(this.codeBindingObservables)):JSON.parse(JSON.stringify(this.codeBindingAll)),this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(VS),y(Nf))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-bindings-sandbox"]],viewQuery:function(i,r){if(1&i&&pt(v_e,5),2&i){let o;Ae(o=Ie())&&(r.newPanel=o.first)}},decls:94,vars:27,consts:[["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["substancePopoverMenu","matMenu"],["mat-menu-item","",3,"disableRipple","click"],[1,"flex","flex-row","mb-8"],[1,"w-2/3"],[1,"editPanel","w-full","pt-4","pb-4",3,"opened","closed"],["newPanel",""],[4,"ngIf"],[1,"row",3,"formGroup"],[1,"form-row"],[1,"form-column"],[1,"input-field"],["matInput","","type","text","formControlName","title","placeholder","Enter title..."],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"input-field","autocomplete-field"],["formControlName","code",1,"grow",3,"binding"],["href","javascript:void(0)",1,"bottom-right-link",3,"click"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["class","input-field",4,"ngIf"],["class","input-field full-width",4,"ngIf"],[1,"row"],[1,"grow"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"w-1/3"],[1,"flex","flex-row","gap-4","justify-end","flex-wrap"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["hidden","","type","file","id","file",3,"change"],["fileInput",""],["mat-flat-button","","color","accent",3,"matMenuTriggerFor",4,"ngIf"],[1,"wide-menu"],["demosMenu","matMenu"],["mat-menu-item","",3,"click"],["mat-flat-button","","color","accent",3,"click"],["class","compact-row-container",4,"ngIf"],[1,"row-container"],[1,"row-container-item"],["cdkDropList","",3,"cdkDropListDropped"],["class","output-panel","cdkDrag","",4,"ngFor","ngForOf"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Data collected from form"],["class","output",4,"ngIf"],["label","Data collected (FHIR Bundle)"],["label","FHIR Questionnaire"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"value"],["matInput","","type","text","formControlName","ecl","placeholder","Enter ECL..."],["href","javascript:void(0)",1,"top-right-link",3,"click"],["formControlName","ecl",1,"grow",3,"binding"],[1,"input-field","full-width"],["matInput","","type","text","formControlName","note","placeholder","Enter a description..."],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"compact-row-container"],[1,"title"],["mat-icon-button","","color","primary",1,"tool",3,"click"],[1,"row","form-title"],["matInput","","type","text","placeholder","Enter title...",3,"ngModel","ngModelOptions","ngModelChange"],["cdkDrag","",1,"output-panel"],[1,"row","control"],["cdkDragHandle","",1,"tool","drag-handle"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"binding","selectionChange"],[1,"title","grow"],[1,"grow",3,"binding","textChange"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(i,r){if(1&i){const o=Le();_(0,"div",0)(1,"h3"),C(2,"Terminology Bindings Sandbox "),_(3,"button",1)(4,"mat-icon"),C(5,"info"),v()(),_(6,"mat-menu",null,2)(8,"span",3),z("click",function(a){return a.stopPropagation()}),_(9,"h4"),C(10,"Terminology Bindings Sandbox"),v(),_(11,"p"),C(12,"This is a sandbox for creating terminology bindings, designed to support education activities."),v()()()(),_(13,"div",4)(14,"div",5)(15,"mat-expansion-panel",6,7),z("opened",function(){return r.panelOpenState=!0})("closed",function(){return r.panelOpenState=!1}),_(17,"mat-expansion-panel-header")(18,"mat-panel-title")(19,"h4"),C(20,"New binding:"),v()(),A(21,y_e,2,0,"mat-panel-description",8),v(),_(22,"div")(23,"form",9)(24,"div",10)(25,"div",11)(26,"h5"),C(27,"Question"),v(),_(28,"mat-form-field",12)(29,"mat-label"),C(30,"Question text"),v(),_e(31,"input",13),A(32,x_e,3,0,"button",14),_(33,"mat-error"),C(34),v()(),_(35,"mat-form-field",15),_e(36,"app-autocomplete-binding",16),_(37,"a",17),z("click",function(){return r.toggleCodeBinding()}),A(38,w_e,2,0,"span",8),A(39,C_e,2,0,"span",8),v(),_(40,"mat-error"),C(41),v()()(),_(42,"div",11)(43,"h5"),C(44,"Answer"),v(),_(45,"mat-form-field",12)(46,"mat-label"),C(47,"Answer Type"),v(),_(48,"mat-select",18),A(49,k_e,2,2,"mat-option",19),v(),_(50,"mat-error"),C(51),v()(),A(52,T_e,9,2,"mat-form-field",20),A(53,A_e,7,4,"mat-form-field",20),v()(),A(54,M_e,7,2,"mat-form-field",21),v(),_e(55,"br"),_(56,"div",22),_e(57,"span",23),A(58,R_e,2,0,"button",24),A(59,F_e,2,0,"button",24),_(60,"button",25),z("click",function(){return r.cancelEdit()}),C(61,"Cancel"),v()()()()(),_(62,"div",26)(63,"div",27),A(64,P_e,2,1,"button",28),_(65,"input",29,30),z("change",function(a){return r.uploadFile(a)}),v(),A(67,O_e,2,1,"button",31),_(68,"mat-menu",32,33)(70,"button",34),z("click",function(){return r.saveForm()}),C(71,"Download"),v(),_(72,"button",34),z("click",function(){return r.saveOutput(r.fhirQuestionnaireStr)}),C(73,"Download as FHIR Questionnaire"),v()(),_(74,"button",35),z("click",function(){return he(o),fe(Pt(66).click())}),C(75,"Upload form"),v(),_(76,"button",35),z("click",function(){return r.loadExample1()}),C(77,"Example"),v(),_(78,"button",35),z("click",function(){return r.clear()}),C(79,"Clear"),v()()()(),A(80,N_e,6,1,"div",36),A(81,B_e,12,3,"div",36),_(82,"div",37)(83,"div",38)(84,"div",39),z("cdkDropListDropped",function(a){return r.onDrop(a)}),A(85,X_e,23,11,"div",40),v()(),_(86,"div",38)(87,"mat-tab-group",41)(88,"mat-tab",42),A(89,Z_e,4,5,"div",43),v(),_(90,"mat-tab",44),A(91,e0e,4,5,"div",43),v(),_(92,"mat-tab",45),A(93,n0e,4,5,"div",43),v()()()()()}if(2&i){const o=Pt(7);let s;x(3),E("matMenuTriggerFor",o),x(5),E("disableRipple",!0),x(13),E("ngIf",!r.panelOpenState),x(2),E("formGroup",r.newBindingForm),x(9),E("ngIf",null==(s=r.newBindingForm.get("title"))?null:s.value),x(2),Je(r.getErrorMessage("title")),x(2),E("binding",r.codeBinding),x(2),E("ngIf",r.codeBinding===r.codeBindingAll),x(1),E("ngIf",r.codeBinding!=r.codeBindingAll),x(2),Je(r.getErrorMessage("code")),x(8),E("ngForOf",r.controlTypes),x(2),Je(r.getErrorMessage("type")),x(1),E("ngIf","Section header"!=r.newBindingForm.controls.type.value&&"Text box"!=r.newBindingForm.controls.type.value&&"Checkbox"!=r.newBindingForm.controls.type.value&&"Integer"!=r.newBindingForm.controls.type.value&&"Decimal"!=r.newBindingForm.controls.type.value),x(1),E("ngIf","Checkbox"==r.newBindingForm.controls.type.value),x(1),E("ngIf","Section header"!=r.newBindingForm.controls.type.value),x(4),E("ngIf",-1==r.indexInEdit),x(1),E("ngIf",r.indexInEdit>-1),x(5),E("ngIf",r.bindings.length),x(3),E("ngIf",r.bindings.length),x(13),E("ngIf",!r.titleEditMode),x(1),E("ngIf",r.titleEditMode),x(2),E("@growShrink",r.stateName),x(2),E("ngForOf",r.bindings),x(1),E("@openClose",r.stateName),x(3),E("ngIf",r.bindings.length>0),x(2),E("ngIf",r.bindings.length>0),x(2),E("ngIf",r.bindings.length>0)}},dependencies:[io,ri,Qy,KS,YS,i6,Fo,Vs,co,lu,$a,du,ba,gs,a8,l8,Ll,ql,Fg,Us,qo,Sg,Wl,Pg,qy,Ng,Lg,ps,mu,_u,k6,Bge,Uge,Vge,Og,jge,t_e,n_e,g_e,__e,b_e],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"],data:{animation:[$n("openClose",[pn("open",ze({opacity:1,width:"50%"})),pn("closed",ze({opacity:0,width:"0"})),Qt("open <=> closed",[Gt("0.5s")])]),$n("growShrink",[pn("open",ze({width:"50%"})),pn("closed",ze({width:"100%"})),Qt("open <=> closed",[Gt("0.5s")])])]}})}return n})(),r0e=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-prescription-main"]],decls:2,vars:0,template:function(i,r){1&i&&(_(0,"p"),C(1,"prescription-main works!, no?"),v())}})}return n})();const o0e=["mat-sort-header",""];function s0e(n,t){if(1&n){const e=Le();_(0,"div",3),z("@arrowPosition.start",function(){return he(e),fe(O()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return he(e),fe(O()._disableViewStateAnimation=!1)}),_e(1,"div",4),_(2,"div",5),_e(3,"div",6)(4,"div",7)(5,"div",8),v()()}if(2&n){const e=O();E("@arrowOpacity",e._getArrowViewState())("@arrowPosition",e._getArrowViewState())("@allowChildren",e._getArrowDirectionState()),x(2),E("@indicator",e._getArrowDirectionState()),x(1),E("@leftPointer",e._getArrowDirectionState()),x(1),E("@rightPointer",e._getArrowDirectionState())}}const a0e=["*"],R6=new ae("MAT_SORT_DEFAULT_OPTIONS"),c0e=Ice(Oc(class{}));let Kl=(()=>{class n extends c0e{get direction(){return this._direction}set direction(e){this._direction=e}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Ke(e)}constructor(e){super(),this._defaultOptions=e,this.sortables=new Map,this._stateChanges=new Me,this.start="asc",this._direction="",this.sortChange=new De}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let r=function l0e(n,t){let e=["asc","desc"];return"desc"==n&&e.reverse(),t||e.push(""),e}(e.start||this.start,e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),o=r.indexOf(this.direction)+1;return o>=r.length&&(o=0),r[o]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(y(R6,8))},n.\u0275dir=X({type:n,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ye,jn]}),n})();const Xl=Sce.ENTERING+" "+Tce.STANDARD_CURVE,Lf={indicator:$n("indicator",[pn("active-asc, asc",ze({transform:"translateY(0px)"})),pn("active-desc, desc",ze({transform:"translateY(10px)"})),Qt("active-asc <=> active-desc",Gt(Xl))]),leftPointer:$n("leftPointer",[pn("active-asc, asc",ze({transform:"rotate(-45deg)"})),pn("active-desc, desc",ze({transform:"rotate(45deg)"})),Qt("active-asc <=> active-desc",Gt(Xl))]),rightPointer:$n("rightPointer",[pn("active-asc, asc",ze({transform:"rotate(45deg)"})),pn("active-desc, desc",ze({transform:"rotate(-45deg)"})),Qt("active-asc <=> active-desc",Gt(Xl))]),arrowOpacity:$n("arrowOpacity",[pn("desc-to-active, asc-to-active, active",ze({opacity:1})),pn("desc-to-hint, asc-to-hint, hint",ze({opacity:.54})),pn("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",ze({opacity:0})),Qt("* => asc, * => desc, * => active, * => hint, * => void",Gt("0ms")),Qt("* <=> *",Gt(Xl))]),arrowPosition:$n("arrowPosition",[Qt("* => desc-to-hint, * => desc-to-active",Gt(Xl,Ef([ze({transform:"translateY(-25%)"}),ze({transform:"translateY(0)"})]))),Qt("* => hint-to-desc, * => active-to-desc",Gt(Xl,Ef([ze({transform:"translateY(0)"}),ze({transform:"translateY(25%)"})]))),Qt("* => asc-to-hint, * => asc-to-active",Gt(Xl,Ef([ze({transform:"translateY(25%)"}),ze({transform:"translateY(0)"})]))),Qt("* => hint-to-asc, * => active-to-asc",Gt(Xl,Ef([ze({transform:"translateY(0)"}),ze({transform:"translateY(-25%)"})]))),pn("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",ze({transform:"translateY(0)"})),pn("hint-to-desc, active-to-desc, desc",ze({transform:"translateY(-25%)"})),pn("hint-to-asc, active-to-asc, asc",ze({transform:"translateY(25%)"}))]),allowChildren:$n("allowChildren",[Qt("* <=> *",[cy("@*",ay(),{optional:!0})])])};let rx=(()=>{class n{constructor(){this.changes=new Me}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const u0e={provide:rx,deps:[[new Ia,new Vd,rx]],useFactory:function d0e(n){return n||new rx}},h0e=Oc(class{});let rD=(()=>{class n extends h0e{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Ke(e)}constructor(e,i,r,o,s,a,c,l){super(),this._intl=e,this._changeDetectorRef=i,this._sort=r,this._columnDef=o,this._focusMonitor=s,this._elementRef=a,this._ariaDescriber=c,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",l?.arrowPosition&&(this.arrowPosition=l?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{const i=!!e;i!==this._showIndicatorHint&&(this._setIndicatorHintVisible(i),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(e){this._isDisabled()&&e||(this._showIndicatorHint=e,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(e){this._viewState=e||{},this._disableViewStateAnimation&&(this._viewState={toState:e.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(e){!this._isDisabled()&&(32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const e=this._viewState.fromState;return(e?`${e}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}_handleStateChanges(){this._rerenderSubscription=oi(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(y(rx),y(an),y(Kl,8),y("MAT_SORT_HEADER_COLUMN_DEF",8),y(ms),y(Ne),y(XB,8),y(R6,8))},n.\u0275cmp=Ve({type:n,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(e,i){1&e&&z("click",function(){return i._handleClick()})("keydown",function(o){return i._handleKeydown(o)})("mouseenter",function(){return i._setIndicatorHintVisible(!0)})("mouseleave",function(){return i._setIndicatorHintVisible(!1)}),2&e&&(vt("aria-sort",i._getAriaSortAttribute()),ot("mat-sort-header-disabled",i._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[ye],attrs:o0e,ngContentSelectors:a0e,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(e,i){1&e&&(Rn(),_(0,"div",0)(1,"div",1),dt(2),v(),A(3,s0e,6,6,"div",2),v()),2&e&&(ot("mat-sort-header-sorted",i._isSorted())("mat-sort-header-position-before","before"===i.arrowPosition),vt("tabindex",i._isDisabled()?null:0)("role",i._isDisabled()?null:"button"),x(3),E("ngIf",i._renderArrow()))},dependencies:[ri],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[Lf.indicator,Lf.leftPointer,Lf.rightPointer,Lf.arrowOpacity,Lf.arrowPosition,Lf.allowChildren]},changeDetection:0}),n})(),f0e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:[u0e],imports:[Br,Ft]}),n})(),m0e=(()=>{class n{saveItem(e,i){localStorage.setItem(e,i)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}isLocalStorageSupported(){try{const e="__test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Bf=(()=>{class n{constructor(e,i){this.http=e,this.storageService=i,this.baseUrlSubject=new Ti("https://hapi.fhir.org/baseR4"),this.baseUrl$=this.baseUrlSubject.asObservable(),this.userTagSubject=new Ti(""),this.userTag$=this.userTagSubject.asObservable(),this.initialize()}initialize(){if(this.storageService.isLocalStorageSupported()){const e=this.storageService.getItem("baseUrl");e&&this.baseUrlSubject.next(e);const i=this.storageService.getItem("userTag");i&&this.userTagSubject.next(i)}}setBaseUrl(e){this.baseUrlSubject.next(e),this.storageService.saveItem("baseUrl",e)}getBaseUrl(){return this.baseUrlSubject.getValue()}setUserTag(e){this.userTagSubject.next(e),this.storageService.saveItem("userTag",e)}getUserTag(){return this.userTagSubject.getValue()}postQuestionnaire(e){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire`,e)}getQuestionnairesByTag(e){return this.http.get(`${this.baseUrlSubject.value}/Questionnaire?_tag=${e}`)}tagQuestionnaire(e,i){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire/${e}/$meta-add`,{resourceType:"Parameters",parameter:[{name:"meta",valueMeta:{tag:[{system:"http://snomed.org/tags",code:i}]}}]})}deleteQuestionnaire(e){return this.http.delete(`${this.baseUrlSubject.value}/Questionnaire/${e}`)}updateOrCreateQuestionnaire(e,i){return e.id?this.http.put(`${this.baseUrlSubject.value}/Questionnaire?_id=${e.id}&_tag=${i}`,e).pipe(Vi(o=>404===o.status?this.postQuestionnaire(e):eu(o))):this.postQuestionnaire(e)}getQuestionnaireHistory(e){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${e}/_history`)}getSpecificQuestionnaireVersion(e,i){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${e}/_history/${i}`)}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ml),Q(m0e))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function p0e(n,t){if(1&n&&(_(0,"mat-option",15),C(1),v()),2&n){const e=t.$implicit;E("value",e),x(1),Qe(" ",e.title," ")}}function g0e(n,t){1&n&&_e(0,"mat-spinner",16)}function _0e(n,t){if(1&n){const e=Le();_(0,"div",17)(1,"span",18),C(2,"\u2261"),v(),C(3),_(4,"button",19),z("click",function(){const o=he(e).index;return fe(O().deleteQuestionnaire(o))}),_(5,"mat-icon"),C(6,"delete"),v()()()}if(2&n){const e=t.$implicit;x(3),Qe(" ",e.title," ")}}let F6=(()=>{class n{constructor(e,i,r,o){this.fb=e,this.fhirService=i,this.data=r,this.dialogRef=o,this.allQuestionnaires=[],this.availableQuestionnaires=[],this.addedQuestionnaires=[],this.userTag="",this.loading=!1}ngOnInit(){this.questionnaireForm=this.fb.group({selectedQuestionnaire:[{value:"",disabled:!0}],assignedName:[{value:"",disabled:!0}]}),this.data&&(this.addedQuestionnaires=this.data.questionnaires,this.questionnaireForm.get("assignedName")?.setValue(this.data.title)),this.questionnaireForm.get("selectedQuestionnaire"),this.userTag=this.fhirService.getUserTag(),this.loadAvailableQuestionnaires()}updateAvailableQuestionnaires(){this.availableQuestionnaires=this.addedQuestionnaires?this.allQuestionnaires.filter(e=>!this.addedQuestionnaires.some(i=>i.id===e.id)):this.allQuestionnaires,this.availableQuestionnaires=this.availableQuestionnaires.filter(e=>!e.extension||!e.extension.some(i=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===i.url&&"assemble-root"===i.valueCode))}loadAvailableQuestionnaires(){this.loading=!0,this.fhirService.getQuestionnairesByTag(this.userTag).subscribe(e=>{this.allQuestionnaires=e.entry.map(i=>i.resource),this.allQuestionnaires.sort((i,r)=>i.title.localeCompare(r.title)),this.updateAvailableQuestionnaires(),this.loading=!1,this.questionnaireForm?.get("selectedQuestionnaire")?.enable(),this.questionnaireForm?.get("assignedName")?.enable()})}addQuestionnaire(){const e=this.questionnaireForm.value;e.selectedQuestionnaire&&(this.addedQuestionnaires.push({...e.selectedQuestionnaire,assignedName:e.assignedName}),this.questionnaireForm.get("selectedQuestionnaire")?.reset(),this.updateAvailableQuestionnaires())}drop(e){GS(this.addedQuestionnaires,e.previousIndex,e.currentIndex)}deleteQuestionnaire(e){e>-1&&(this.addedQuestionnaires.splice(e,1),this.updateAvailableQuestionnaires())}isSaveDisabled(){return!this.questionnaireForm.get("assignedName")?.value||!this.addedQuestionnaires.length}closeModal(){this.dialogRef.close({title:this.questionnaireForm.get("assignedName")?.value,questionnaires:this.addedQuestionnaires})}static#e=this.\u0275fac=function(i){return new(i||n)(y(o8),y(Bf),y(tx),y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-create-root-module"]],decls:26,vars:6,consts:[[1,"form-layout",3,"formGroup"],[1,"form-row"],[1,"full-width"],["matInput","","formControlName","assignedName"],[1,"half-width"],["formControlName","selectedQuestionnaire"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"add-button",3,"disabled","click"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"questionnaire-list"],[1,"list",3,"cdkDropListDropped"],["cdkDrag","","class","cdk-drag",4,"ngFor","ngForOf"],[1,"button-container"],["mat-flat-button","","color","primary","mat-dialog-close",""],["mat-flat-button","","color","accent",3,"disabled","click"],[3,"value"],["diameter","35",1,"loading-spinner"],["cdkDrag","",1,"cdk-drag"],[1,"drag-handle"],["mat-icon-button","","aria-label","Delete questionnaire",3,"click"]],template:function(i,r){1&i&&(_(0,"mat-dialog-content")(1,"h2"),C(2,"Create a modular Questionnaire"),v(),_(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),C(7,"Assign Name"),v(),_e(8,"input",3),v()(),_(9,"div",1)(10,"mat-form-field",4)(11,"mat-label"),C(12,"Select Child Questionnaire"),v(),_(13,"mat-select",5),A(14,p0e,2,2,"mat-option",6),v()(),_(15,"button",7),z("click",function(){return r.addQuestionnaire()}),C(16,"Add questionnaire"),v(),A(17,g0e,1,0,"mat-spinner",8),v()(),_(18,"div",9)(19,"cdk-drop-list",10),z("cdkDropListDropped",function(s){return r.drop(s)}),A(20,_0e,7,1,"div",11),v()()(),_(21,"mat-dialog-actions",12)(22,"button",13),C(23,"Cancel"),v(),_(24,"button",14),z("click",function(){return r.closeModal()}),C(25,"Save"),v()()),2&i&&(x(3),E("formGroup",r.questionnaireForm),x(11),E("ngForOf",r.availableQuestionnaires),x(1),E("disabled",r.loading),x(2),E("ngIf",r.loading),x(3),E("ngForOf",r.addedQuestionnaires),x(4),E("disabled",r.isSaveDisabled()||r.loading))},dependencies:[io,ri,KS,YS,Fo,Vs,co,ba,gs,Ll,Bl,ql,Fg,Us,qo,Sg,Wl,Pg,Lg,Hg,nx,ix],styles:[".questionnaire-list[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;border:1px solid #ccc;border-radius:4px;background-color:#f9f9f9;padding:10px}.list[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;background-color:#fff;margin-bottom:10px;padding:10px;display:flex;align-items:center;justify-content:left;box-shadow:0 2px 4px #0000001a}.drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:15px;font-size:20px;color:#666}.cdk-drag-preview[_ngcontent-%COMP%]{background-color:#e0e0e0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.form-layout[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.form-layout[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.form-layout[_ngcontent-%COMP%] .half-width[_ngcontent-%COMP%]{width:50%;margin-right:15px}"]})}return n})(),P6=(()=>{class n{constructor(e,i){this.http=e,this.fhirService=i}generateRootQuestionnaire(e,i){var r=this;return xe(function*(){try{let s=yield oo(r.http.get("assets/questionnaires/root-questionnaire-template.json"));s.title=e;let a=0,c=r.fhirService.getBaseUrl();return r.fhirService.getUserTag(),i.forEach(d=>{a++,d.url=c+"/Questionnaire/"+d.id,s.item.push({linkId:a.toString(),text:d.title,type:"group",required:!1,item:[{extension:[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire",valueCanonical:d.url}],linkId:a.toString()+".1",text:"Unable to resolve sub-questionnaire",type:"display"}]})}),s}catch(o){throw console.error("Error generating root questionnaire:",o),o}})()}getRootQuestionnaireData(e){var i=this;return xe(function*(){if(!e||!Array.isArray(e.item))throw new Error("Invalid root questionnaire");const r=e.title,o=e.item.filter(a=>"group"===a.type&&a.item&&Array.isArray(a.item)).flatMap(a=>a.item).map(function(){var a=xe(function*(c){const l=c.extension?.find(d=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===d.url);return l?i.getQuestionnaireFromUrl(l.valueCanonical):null});return function(c){return a.apply(this,arguments)}}());return{title:r,questionnaires:(yield Promise.all(o)).filter(a=>null!==a)}})()}checkForAssembleRoot(e){return!!(e&&e.extension&&Array.isArray(e.extension))&&e.extension.some(i=>"assemble-root"===i.valueCode)}assembleQuestionnaire(e){var i=this;return xe(function*(){if(e=JSON.parse(JSON.stringify(e)),!i.checkForAssembleRoot(e))return null;for(let r of e.item)if("group"==r.type){r.extension=[];for(let o of r.item)if(o.extension&&Array.isArray(o.extension))for(let s of o.extension)if("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===s.url){let a=yield i.getQuestionnaireFromUrl(s.valueCanonical);a&&(r.item=a.item),r.extension||(r.extension=[]),r.extension.push({url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",valueCanonical:s.valueCanonical})}}return e.extension=e.extension.filter(r=>"assemble-root"!==r.valueCode),e})()}disassembleQuestionnaire(e){var i=this;return xe(function*(){if(!e||!e.item||!Array.isArray(e.item))throw new Error("Invalid root questionnaire");const r=e.title,o=[];for(const s of e.item)if("group"===s.type&&s.extension&&Array.isArray(s.extension)){const a=s.extension.find(c=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom"===c.url);if(a){const c=a.valueCanonical,l=yield i.getQuestionnaireFromUrl(c);l&&o.push(l)}}return{title:r,questionnaires:o}})()}getQuestionnaireFromUrl(e){var i=this;return xe(function*(){try{return yield oo(i.http.get(e))}catch(r){return console.error("Error fetching questionnaire:",r),null}})()}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ml),Q(Bf))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function b0e(n,t){1&n&&(_(0,"th",17),C(1," Title "),v())}function v0e(n,t){if(1&n&&(_(0,"td",18),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.title," ")}}function y0e(n,t){1&n&&(_(0,"th",17),C(1," Status "),v())}const x0e=function(n){return["status-pill",n]};function w0e(n,t){if(1&n&&(_(0,"td",18)(1,"span",19),C(2),no(3,"uppercase"),v()()),2&n){const e=t.$implicit;x(1),E("ngClass",la(4,x0e,e.status)),x(1),Je(Va(3,2,e.status))}}function C0e(n,t){1&n&&(_(0,"th",17),C(1," Version "),v())}function k0e(n,t){if(1&n&&(_(0,"td",18),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.meta.versionId," ")}}function E0e(n,t){1&n&&(_(0,"th",17),C(1," Type "),v())}const T0e=function(){return["status-pill","active"]};function S0e(n,t){1&n&&(_(0,"span",19),C(1,"QUESTIONNAIRE"),v()),2&n&&E("ngClass",us(1,T0e))}const D0e=function(){return["status-pill","draft"]};function A0e(n,t){1&n&&(_(0,"span",19),C(1,"MODULAR ROOT"),v()),2&n&&E("ngClass",us(1,D0e))}function I0e(n,t){if(1&n&&(_(0,"td",18),A(1,S0e,2,2,"span",20),A(2,A0e,2,2,"span",20),v()),2&n){const e=t.$implicit,i=O();x(1),E("ngIf",!i.isRootQuestionnaire(e)),x(1),E("ngIf",i.isRootQuestionnaire(e))}}function M0e(n,t){1&n&&(_(0,"th",21),C(1," Actions "),v())}function R0e(n,t){if(1&n){const e=Le();_(0,"button",32),z("click",function(){he(e);const r=O().$implicit;return fe(O().validate(r))}),_(1,"mat-icon"),C(2,"done"),v()()}if(2&n){const e=O().$implicit;E("disabled",O().isRootQuestionnaire(e))}}function F0e(n,t){if(1&n){const e=Le();_(0,"button",33),z("click",function(){he(e);const r=O().$implicit;return fe(O().assemble(r))}),_(1,"mat-icon"),C(2,"build"),v()()}}function P0e(n,t){if(1&n){const e=Le();_(0,"button",34),z("click",function(){he(e);const r=O().$implicit;return fe(O().preview(r))}),_(1,"mat-icon"),C(2,"visibility"),v()()}}function O0e(n,t){if(1&n){const e=Le();_(0,"button",35),z("click",function(){he(e);const r=O().$implicit;return fe(O().openInNewTab(r))}),_(1,"mat-icon"),C(2,"open_in_new"),v()()}}function N0e(n,t){if(1&n){const e=Le();_(0,"button",36),z("click",function(){he(e);const r=O().$implicit;return fe(O().editQuestionnaire(r))}),_(1,"mat-icon"),C(2,"edit"),v()()}}function L0e(n,t){if(1&n){const e=Le();_(0,"button",37),z("click",function(){he(e);const r=O().$implicit;return fe(O().openModularQuestionnaireModal(r))}),_(1,"mat-icon"),C(2,"edit"),v()()}}function B0e(n,t){if(1&n){const e=Le();_(0,"td",18),A(1,R0e,3,1,"button",22),A(2,F0e,3,0,"button",23),A(3,P0e,3,0,"button",24),A(4,O0e,3,0,"button",25),_(5,"button",26),z("click",function(){const o=he(e).$implicit;return fe(O().saveQuestionnaire(o))}),_(6,"mat-icon"),C(7,"cloud_download"),v()(),A(8,N0e,3,0,"button",27),A(9,L0e,3,0,"button",28),_(10,"button",29),z("click",function(){const o=he(e).$implicit;return fe(O().viewHistory(o))}),_(11,"mat-icon"),C(12,"history"),v()(),_(13,"span",30)(14,"button",31),z("click",function(){const o=he(e).$implicit;return fe(O().deleteQuestionnaire(o))}),_(15,"mat-icon"),C(16,"delete"),v()()()()}if(2&n){const e=t.$implicit,i=O();x(1),E("ngIf",i.config.validate),x(1),E("ngIf",i.isRootQuestionnaire(e)),x(1),E("ngIf",i.config.preview&&!i.isRootQuestionnaire(e)),x(1),E("ngIf",i.config.preview),x(4),E("ngIf",!i.isRootQuestionnaire(e)),x(1),E("ngIf",i.isRootQuestionnaire(e)),x(1),E("disabled",1==e.meta.versionId),x(3),Xh("matTooltip",i.getDeleteTooltip(e)),x(1),E("disabled",i.getReferencingQuestionnaires(e).length>0)}}function V0e(n,t){1&n&&_e(0,"tr",38)}function U0e(n,t){1&n&&_e(0,"tr",39)}function H0e(n,t){1&n&&(_(0,"p",40)(1,"i"),C(2," No questionnaires found. Upload your questionnaires to start. "),v()())}function z0e(n,t){1&n&&_e(0,"mat-spinner",41)}function j0e(n,t){if(1&n){const e=Le();_(0,"button",42),z("click",function(){return he(e),fe(O().downloadAllQuestionnaires())}),C(1," Download bundle "),v()}}let O6=(()=>{class n{constructor(e,i,r,o){this.fhirService=e,this.questionnaireService=i,this.dialog=r,this._snackBar=o,this.questionnaireSelected=new De,this.validateQuestionnaire=new De,this.previewQuestionnaire=new De,this.viewQuestionaireHistory=new De,this.config={},this.displayedColumns=["title","status","version","type","actions"],this.dataSource=new uu,this.questionnaires=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.notFound=!1,this.baseUrlChanged=new Me,this.userTagChanged=new Me}ngOnInit(){Cl([this.fhirService.baseUrl$.pipe(Pc(1e3),ja()),this.fhirService.userTag$.pipe(Pc(1e3),ja())]).subscribe(([e,i])=>{(this.selectedFhirServer!==e||this.selectedUserTag!==i)&&(this.selectedFhirServer=e,this.selectedUserTag=i,this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires())})}ngOnChanges(e){}ngAfterViewInit(){this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(e,i)=>{switch(i){case"type":return this.isRootQuestionnaire(e)?"Modular root":"Questionnaire";case"version":return e.meta&&e.meta.versionId?e.meta.versionId:"";default:return e[i]}},this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires()}loadQuestionnaires(){this.loading=!0,this.notFound=!1,this.questionnaires=[],this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(e=>{e.entry?(this.questionnaires=e.entry.map(i=>i.resource),this.dataSource.data=this.questionnaires,this.dataSource.sort=this.sort,this.loading=!1):(this.questionnaires=[],this.dataSource.data=this.questionnaires,this.loading=!1,this.notFound=!0)})}updateQuestionnairesList(e){const i=this.questionnaires.findIndex(r=>r.id===e.id);-1!==i?(this.questionnaires[i]=e,this.dataSource.data=this.questionnaires):(this.questionnaires.push(e),this.dataSource.data=this.questionnaires)}addQuestionnaire(e){this.updateQuestionnairesList(e)}deleteQuestionnaire(e){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Deleting Questionnaire...",panelClass:["green-snackbar"]}),this.fhirService.deleteQuestionnaire(e.id).subscribe(()=>{this.questionnaires=this.questionnaires.filter(i=>i.id!==e.id),this.dataSource.data=this.questionnaires,this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire deleted successfully",panelClass:["green-snackbar"]})})}selectQuestionnaire(e){this.questionnaireSelected.emit(e)}validate(e){this.validateQuestionnaire.emit(e)}viewHistory(e){this.viewQuestionaireHistory.emit(e)}preview(e){this.previewQuestionnaire.emit(e)}openInNewTab(e){window.open(this.selectedFhirServer+"/Questionnaire/"+e.id,"_blank")}saveQuestionnaire(e){var i=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});Wa(i,`${e.title}-v${e.meta.versionId}.json`)}isRootQuestionnaire(e){return!(!e.extension||!Array.isArray(e.extension))&&e.extension.some(i=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===i.url&&"assemble-root"===i.valueCode)}assemble(e){this._snackBar.openFromComponent(Si,{duration:2e3,data:"Assembling Questionnaire...",panelClass:["green-snackbar"]}),this.questionnaireService.assembleQuestionnaire(e).then(i=>{i.title=e.title+" (assembled)",this.previewQuestionnaire.emit(i),this._snackBar.openFromComponent(Si,{duration:2e3,data:"Questionnaire ready",panelClass:["green-snackbar"]})}).catch(i=>{console.error("Error assembling questionnaire:",i)})}editQuestionnaire(e){this.saveQuestionnaire(e),window.open("https://lhcformbuilder.nlm.nih.gov/","_blank")}openModularQuestionnaireModal(e){var i=this;return xe(function*(){let r=yield i.questionnaireService.getRootQuestionnaireData(e);i.dialog.open(F6,{data:r,width:"75%"}).afterClosed().subscribe(s=>{s&&i.handleDialogResult(s,e)})})()}handleDialogResult(e,i){var r=this;return xe(function*(){r._snackBar.openFromComponent(Si,{duration:5e3,data:"Updating questionnaire...",panelClass:["green-snackbar"]});try{let o=yield r.questionnaireService.generateRootQuestionnaire(e.title,e.questionnaires);o&&(i.title=e.title,i.item=o.item,r.addQuestionnaire(i),r.fhirService.updateOrCreateQuestionnaire(i,r.selectedUserTag).pipe(Ns()).subscribe(s=>{r._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(s)},s=>{r._snackBar.openFromComponent(Si,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})}))}catch(o){console.error("Error handling dialog result:",o)}})()}downloadAllQuestionnaires(){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Downloading Questionnaires...",panelClass:["green-snackbar"]}),this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(e=>{var i=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});Wa(i,"questionnaires-bundle.json"),this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaires downloaded successfully",panelClass:["green-snackbar"]})})}getReferencingQuestionnaires(e){let r=`${this.fhirService.getBaseUrl()}/Questionnaire/${e.id}`;return this.dataSource.data.filter(s=>s.item&&Array.isArray(s.item)&&s.item.some(a=>a.item&&Array.isArray(a.item)&&a.item.some(c=>c.extension&&Array.isArray(c.extension)&&c.extension.some(l=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===l.url&&l.valueCanonical===r))))}getDeleteTooltip(e){const i=this.getReferencingQuestionnaires(e);return 0===i.length?"Delete Questionnaire":`Cannot delete: Referenced by ${i.map(o=>`"${o.title}"`).join(", ")}`}static#e=this.\u0275fac=function(i){return new(i||n)(y(Bf),y(P6),y(Nf),y(Df))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-list-questionnaires"]],viewQuery:function(i,r){if(1&i&&pt(Kl,5),2&i){let o;Ae(o=Ie())&&(r.sort=o.first)}},inputs:{config:"config"},outputs:{questionnaireSelected:"questionnaireSelected",validateQuestionnaire:"validateQuestionnaire",previewQuestionnaire:"previewQuestionnaire",viewQuestionaireHistory:"viewQuestionaireHistory"},features:[jn],decls:24,vars:6,consts:[["id","table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["id","outer-container"],[1,"download-button-container"],["mat-flat-button","","color","accent","matTooltip","Dowload all Questionnaires",3,"click",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","class","action-button","matTooltip","Validate Questionnaire",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Assemble Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Preview Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Open resource in new tab",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Modular Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","View Questionnaire History",1,"action-button",3,"disabled","click"],[3,"matTooltip"],["mat-icon-button","","color","accent",3,"disabled","click"],["mat-icon-button","","color","accent","matTooltip","Validate Questionnaire",1,"action-button",3,"disabled","click"],["mat-icon-button","","color","accent","matTooltip","Assemble Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Modular Questionnaire",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"],["mat-flat-button","","color","accent","matTooltip","Dowload all Questionnaires",3,"click"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"table",1),zt(2,2),A(3,b0e,2,0,"th",3),A(4,v0e,2,1,"td",4),jt(),zt(5,5),A(6,y0e,2,0,"th",3),A(7,w0e,4,6,"td",4),jt(),zt(8,6),A(9,C0e,2,0,"th",3),A(10,k0e,2,1,"td",4),jt(),zt(11,7),A(12,E0e,2,0,"th",3),A(13,I0e,3,2,"td",4),jt(),zt(14,8),A(15,M0e,2,0,"th",9),A(16,B0e,17,9,"td",4),jt(),A(17,V0e,1,0,"tr",10),A(18,U0e,1,0,"tr",11),v(),A(19,H0e,3,0,"p",12),A(20,z0e,1,0,"mat-spinner",13),v(),_(21,"div",14)(22,"div",15),A(23,j0e,2,0,"button",16),v()()),2&i&&(x(1),E("dataSource",r.dataSource),x(16),E("matHeaderRowDef",r.displayedColumns),x(1),E("matRowDefColumns",r.displayedColumns),x(1),E("ngIf",r.notFound&&!r.questionnaires.length),x(1),E("ngIf",r.loading),x(3),E("ngIf",!r.loading&&r.questionnaires.length>0))},dependencies:[ha,ri,Fo,Vs,co,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Kl,rD,DE],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}#table-container[_ngcontent-%COMP%]{padding-bottom:2rem}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:2rem}"]})}return n})(),$0e=(()=>{class n{constructor(e){this.dialogRef=e,this.listConfig={select:!0}}selectAndDownload(e){this.dialogRef.close(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-load-questionnaire-modal"]],decls:7,vars:1,consts:[[3,"config","questionnaireSelected"],["align","end"],["mat-flat-button","","color","accent","mat-dialog-close",""]],template:function(i,r){1&i&&(_(0,"mat-dialog-content")(1,"h2"),C(2,"Available Questionnaires"),v(),_(3,"app-list-questionnaires",0),z("questionnaireSelected",function(s){return r.selectAndDownload(s)}),v()(),_(4,"mat-dialog-actions",1)(5,"button",2),C(6,"Close"),v()()),2&i&&(x(3),E("config",r.listConfig))},dependencies:[Fo,Hg,nx,ix,O6]})}return n})();const G0e=["settingsForm"];function W0e(n,t){1&n&&(_(0,"mat-error"),C(1,"Base URL is required"),v())}function q0e(n,t){1&n&&(_(0,"mat-error"),C(1,"User Tag is required and must be at least 3 characters"),v())}let oD=(()=>{class n{constructor(e,i){this.fhirService=e,this.dialogRef=i,this.baseUrl="",this.userTag=""}ngAfterViewInit(){this.triggerValidation()}triggerValidation(){Object.keys(this.settingsForm.controls).forEach(e=>{const i=this.settingsForm.control.get(e);i?.markAsTouched({onlySelf:!0}),i?.markAsDirty({onlySelf:!0})})}ngOnInit(){this.baseUrl=this.fhirService.getBaseUrl(),this.userTag=this.fhirService.getUserTag()}updateSettings(){this.settingsForm.valid&&(this.fhirService.setBaseUrl(this.baseUrl),this.fhirService.setUserTag(this.userTag),this.dialogRef.close("save"))}static#e=this.\u0275fac=function(i){return new(i||n)(y(Bf),y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-fhir-server-settings-modal"]],viewQuery:function(i,r){if(1&i&&pt(G0e,5),2&i){let o;Ae(o=Ie())&&(r.settingsForm=o.first)}},decls:29,vars:5,consts:[[1,"form-container"],[1,"warning"],[3,"ngSubmit"],["settingsForm","ngForm"],["matInput","","name","baseUrl","required","",3,"ngModel","ngModelChange"],["baseUrlField","ngModel"],[4,"ngIf"],["matInput","","name","userTag","required","","minlength","3",3,"ngModel","ngModelChange"],["userTagField","ngModel"],[1,"button-container"],["mat-flat-button","","color","accent","type","submit",3,"disabled"],["mat-flat-button","","color","primary","mat-dialog-close",""]],template:function(i,r){if(1&i&&(_(0,"div",0)(1,"h2"),C(2,"FHIR Server Connection"),v(),_(3,"p"),C(4,"Manager mode allows you to store questionnares in a FHIR Server. Enter the FHIR server URL and your "),_(5,"b"),C(6,"User Tag"),v(),C(7,", this value will be used to identify your questionnaires."),v(),_(8,"p",1),C(9,"Warning: using the default public FHIR server will not ensure the persistence of your information, always save your questionnaires to your computer as a backup."),v(),_(10,"form",2,3),z("ngSubmit",function(){return r.updateSettings()}),_(12,"mat-form-field")(13,"mat-label"),C(14,"Base URL of the FHIR Server"),v(),_(15,"input",4,5),z("ngModelChange",function(s){return r.baseUrl=s}),v(),A(17,W0e,2,0,"mat-error",6),v(),_(18,"mat-form-field")(19,"mat-label"),C(20,"User Tag"),v(),_(21,"input",7,8),z("ngModelChange",function(s){return r.userTag=s}),v(),A(23,q0e,2,0,"mat-error",6),v(),_(24,"div",9)(25,"button",10),C(26,"Open FHIR Repository"),v(),_(27,"button",11),C(28,"Close"),v()()()()),2&i){const o=Pt(11),s=Pt(16),a=Pt(22);x(15),E("ngModel",r.baseUrl),x(2),E("ngIf",s.invalid&&s.touched),x(4),E("ngModel",r.userTag),x(2),E("ngIf",a.invalid&&a.touched),x(2),E("disabled",!o.valid)}},dependencies:[ri,Fo,ba,gs,a8,ql,Fg,Us,qo,Sg,Uy,NS,ps,mu,Hg],styles:[".form-container[_ngcontent-%COMP%]{margin:auto;padding:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.warning[_ngcontent-%COMP%]{color:#ff9500;font-weight:lighter;font-style:italic}"]})}return n})(),N6=(()=>{class n{constructor(e,i){this.data=e,this.dialogRef=i}static#e=this.\u0275fac=function(i){return new(i||n)(y(tx),y(Ql))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-confirmation-dialog"]],decls:10,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"button-container"],["mat-button","",3,"mat-dialog-close"]],template:function(i,r){1&i&&(_(0,"h1",0),C(1),v(),_(2,"div",1)(3,"p"),C(4),v()(),_(5,"div",2)(6,"button",3),C(7,"Yes"),v(),_(8,"button",3),C(9,"No"),v()()),2&i&&(x(1),Je(r.data.title),x(3),Je(r.data.message),x(2),E("mat-dialog-close",!0),x(2),E("mat-dialog-close",!1))},dependencies:[Fo,Hg,p6,nx,ix],encapsulation:2})}return n})();const Q0e=new ae("MAT_PROGRESS_BAR_DEFAULT_OPTIONS"),X0e=Pl(class{constructor(n){this._elementRef=n}},"primary");let L6=(()=>{class n extends X0e{constructor(e,i,r,o,s){super(e),this._ngZone=i,this._changeDetectorRef=r,this._animationMode=o,this._isNoopAnimation=!1,this._value=0,this._bufferValue=0,this.animationEnd=new De,this._mode="determinate",this._transitionendHandler=a=>{0===this.animationEnd.observers.length||!a.target||!a.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===o,s&&(s.color&&(this.color=this.defaultColor=s.color),this.mode=s.mode||this.mode)}get value(){return this._value}set value(e){this._value=B6(gr(e)),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=B6(gr(e)),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Ye),y(an),y(Jn,8),y(Q0e,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:8,hostBindings:function(e,i){2&e&&(vt("aria-valuenow",i._isIndeterminate()?null:i.value)("mode",i.mode),ot("_mat-animation-noopable",i._isNoopAnimation)("mdc-linear-progress--animation-ready",!i._isNoopAnimation)("mdc-linear-progress--indeterminate",i._isIndeterminate()))},inputs:{color:"color",value:"value",bufferValue:"bufferValue",mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[ye],decls:7,vars:4,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(e,i){1&e&&(_(0,"div",0),_e(1,"div",1)(2,"div",2),v(),_(3,"div",3),_e(4,"span",4),v(),_(5,"div",5),_e(6,"span",4),v()),2&e&&(x(1),Ai("flex-basis",i._getBufferBarFlexBasis()),x(2),Ai("transform",i._getPrimaryBarTransform()))},styles:["@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half, 83.67142%))}100%{transform:translateX(var(--mdc-linear-progress-primary-full, 200.611057%))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half, 84.386165%))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full, 160.277782%))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(-10px)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;width:100%;height:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;width:100%;height:100%}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color, #6200ee)}.mdc-linear-progress__buffer-dots{background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E\")}.mdc-linear-progress__buffer-bar{background-color:#e6e6e6}.mdc-linear-progress{height:var(--mdc-linear-progress-track-height, 4px)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-track-height, 4px)}.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height, 4px)}.mat-mdc-progress-bar{display:block}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}"],encapsulation:2,changeDetection:0}),n})();function B6(n,t=0,e=100){return Math.max(t,Math.min(e,n))}let Y0e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft]}),n})();const Z0e=["questionnairesList"];function J0e(n,t){if(1&n&&(_(0,"div",20),_e(1,"mat-progress-bar",21),_(2,"div",22),C(3),v()()),2&n){const e=O();x(1),E("value",e.validatingProgress),x(2),Qe("",e.validatingProgress,"%")}}function ebe(n,t){1&n&&(_(0,"span"),C(1,"Run validation"),v())}function tbe(n,t){1&n&&_e(0,"mat-spinner",23)}function nbe(n,t){if(1&n&&(_(0,"span",29),C(1),v()),2&n){const e=O(2);x(1),Qe("Error: ",e.loadResults.error,"")}}function ibe(n,t){if(1&n&&(_(0,"span",30),C(1),v()),2&n){const e=O(2);x(1),Qe("Inactive: ",e.loadResults.inactive,"")}}function rbe(n,t){if(1&n&&(_(0,"span",31),C(1),v()),2&n){const e=O(2);x(1),Qe("Active: ",e.loadResults.active,"")}}function obe(n,t){if(1&n&&(_(0,"p",24)(1,"b"),C(2,"Questionnaire:"),v(),C(3),_(4,"i"),C(5),v(),C(6,") - "),_(7,"span",25),C(8),v(),C(9),no(10,"date"),A(11,nbe,2,1,"span",26),A(12,ibe,2,1,"span",27),A(13,rbe,2,1,"span",28),v()),2&n){const e=O();x(3),Qe(" ",e.questionnaire.title," ("),x(2),Je(e.questionnaire.url),x(3),Qe("",e.dataSource.data.length," bindings"),x(1),qd(" - - Version: ",e.questionnaire.meta.versionId," (",Kd(10,8,e.questionnaire.meta.lastUpdated,"fullDate"),") "),x(2),E("ngIf",e.loadResults.total>0),x(1),E("ngIf",e.loadResults.total>0),x(1),E("ngIf",e.loadResults.total>0)}}function sbe(n,t){1&n&&(_(0,"th",32),C(1," # "),v())}function abe(n,t){if(1&n&&(_(0,"td",33),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.order," ")}}function cbe(n,t){1&n&&(_(0,"th",32),C(1," FHIRPath "),v())}function lbe(n,t){if(1&n&&(_(0,"td",33),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.path," ")}}function dbe(n,t){1&n&&(_(0,"th",32),C(1," Path "),v())}function ube(n,t){if(1&n&&(_(0,"td",33),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.readablePath," ")}}function hbe(n,t){1&n&&(_(0,"th",32),C(1,"Code "),v())}function fbe(n,t){if(1&n&&(_(0,"td",33)(1,"a",34),C(2),v()()),2&n){const e=t.$implicit;x(1),Hb("href","http://snomed.info/id/",e.code,"",Tb),x(1),Je(e.code)}}function mbe(n,t){1&n&&(_(0,"th",32),C(1," Display "),v())}function pbe(n,t){if(1&n&&(_(0,"p",38),C(1),v()),2&n){const e=O().$implicit;x(1),Qe("Concept FSN: ",e.serverDisplay,"")}}function gbe(n,t){1&n&&(_(0,"p",39),C(1,"Concept is inactive"),v())}function _be(n,t){if(1&n){const e=Le();_(0,"p",40),C(1),_(2,"button",41),z("click",function(){const o=he(e).$implicit,s=O().$implicit;return fe(O().replaceInactiveConcept(s,o.replacement))}),_(3,"mat-icon"),C(4,"arrow_forward"),v()()()}if(2&n){const e=t.$implicit,i=O(2);x(1),Tp(" Replacement: ",e.equivalence," to ",e.replacement.code," |",e.replacement.display,"| "),x(1),E("disabled",i.validating)}}function bbe(n,t){if(1&n&&(_(0,"td",33),C(1),A(2,pbe,2,1,"p",35),A(3,gbe,2,0,"p",36),A(4,_be,5,4,"p",37),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.display," "),x(1),E("ngIf",e.serverDisplay),x(1),E("ngIf","Inactive"==e.status),x(1),E("ngForOf",e.replacements)}}function vbe(n,t){1&n&&(_(0,"th",32),C(1," System "),v())}function ybe(n,t){if(1&n&&(_(0,"td",33),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.system," ")}}function xbe(n,t){1&n&&(_(0,"th",32),C(1," Status "),v())}function wbe(n,t){1&n&&(_(0,"span"),_e(1,"mat-progress-bar",42),v())}function Cbe(n,t){if(1&n&&(_(0,"span")(1,"span",43),C(2),v()()),2&n){const e=O().$implicit;x(1),E("ngClass",e.status),x(1),Je(e.status)}}function kbe(n,t){if(1&n&&(_(0,"td",33),A(1,wbe,2,0,"span",3),A(2,Cbe,3,2,"span",3),v()),2&n){const e=t.$implicit;x(1),E("ngIf","Validating"==e.status),x(1),E("ngIf","Validating"!=e.status)}}function Ebe(n,t){1&n&&_e(0,"tr",44)}function Tbe(n,t){1&n&&_e(0,"tr",45)}function Sbe(n,t){1&n&&_e(0,"mat-spinner",46)}let Dbe=(()=>{class n{constructor(e){this.terminologyService=e,this.questionnaireUpdated=new De,this.validatingQuestionnaire=new De,this.loading=!1,this.validating=!1,this.displayedColumns=["order","readablePath","code","display","system","status"],this.dataSource=new uu,this.validatingProgress=0,this.orderCounter=0,this.loadResults={total:0,active:0,inactive:0,error:0}}ngOnChanges(e){e.questionnaire&&(this.questionnaire?this.loadQuestionnaire(this.questionnaire):this.clearQuestionnaire())}clearQuestionnaire(){this.questionnaire=null,this.dataSource.data=[],this.orderCounter=0,this.validatingProgress=0,this.loadResults={total:0,active:0,inactive:0,error:0}}loadQuestionnaire(e){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=e;let i=this.extractObjects(e);this.dataSource.data=i,this.dataSource.sort=this.sort},700)}validate(){var e=this;this.loadResults={total:0,active:0,inactive:0,error:0},this.dataSource.data.forEach(o=>{o.status="Not checked"}),this.validating=!0,this.validatingQuestionnaire.emit(!0);let i=this.dataSource.data.length,r=0;this.asyncForEach(this.dataSource.data,function(){var o=xe(function*(s){e.loadResults.total++,s.status="Validating",r++,e.validatingProgress=Math.round(r/i*100);try{const a=yield e.terminologyService.lookupConcept(s.code,s.system).pipe(Ns()).toPromise();let c=[],l="";for(const d of a.parameter){if("designation"===d.name){let u="",h="";for(const f of d.part)"value"===f.name&&(u=f.valueString),"use"===f.name&&(h=f.valueCoding?.code);c.push(u),"900000000000003001"===h&&(l=u)}"inactive"===d.name&&(d.valueBoolean?(s.status="Inactive",e.loadResults.inactive++):(s.status="Active",e.loadResults.active++))}if((!s.display||!c.includes(s.display))&&(s.serverDisplay=l),"Inactive"==s.status){const d=yield e.getHistoricalAssociationsTarget("900000000000527005",s.code),u=yield e.getHistoricalAssociationsTarget("900000000000530003",s.code),h=yield e.getHistoricalAssociationsTarget("900000000000523009",s.code),f=yield e.getHistoricalAssociationsTarget("900000000000526001",s.code),m=d.concat(u,h,f);s.replacements=m}}catch{s.status="Error",e.loadResults.error++}});return function(s){return o.apply(this,arguments)}}()).then(()=>{this.validating=!1,this.validatingQuestionnaire.emit(!1)})}getHistoricalAssociationsTarget(e,i){var r=this;return xe(function*(){let o=[];const s=r.terminologyService.translate(e,i);let a=yield oo(s.pipe(ct(c=>c)));if(a.parameter)for(const c of a.parameter)if("match"===c.name){let l={replacement:{},equivalence:""};for(const d of c.part)"concept"===d.name&&d.valueCoding&&(l.replacement={code:d.valueCoding.code,display:d.valueCoding.display,system:d.valueCoding.system}),"equivalence"===d.name&&d.valueCode&&(l.equivalence=d.valueCode);o.push(l)}return o})()}removeSemanticTag(e){return e.replace(/\s*\([^)]+\)\s*$/,"").trim().toLowerCase()}asyncForEach(e,i){return xe(function*(){for(let r=0;r ${e.text}`:e.text),e.system&&e.system.startsWith("http://snomed.info/sct")&&e.code&&e.display){this.orderCounter++;const s={order:this.orderCounter,system:e.system,code:e.code,display:e.display,path:i,readablePath:r,status:"Not checked"};o.some(a=>a.system===s.system&&a.code===s.code&&a.display===s.display)||o.push(s)}if(Array.isArray(e))for(let s in e)o=o.concat(this.extractObjects(e[s],`${i}[${s}]`,r));else for(let s in e)e.hasOwnProperty(s)&&(o=o.concat(this.extractObjects(e[s],i?`${i}.${s}`:s,r)));if(e.answerValueSet){const a=new URL(e.answerValueSet).searchParams.get("fhir_vs");if(a){const c=decodeURIComponent(a),l=/(\d{5,})(?:\s*\|\s*([^|]*)\s*\|)?/g;let d;for(;null!==(d=l.exec(c));)this.orderCounter++,o.push({order:this.orderCounter,code:d[1],display:d[2]?d[2].trim():void 0,system:"http://snomed.info/sct",path:i+".answerValueSet",readablePath:r+" -> answerValueSet [ECL]",status:"Not checked"})}}return o}replaceInactiveConcept(e,i){this.searchAndReplace(this.questionnaire,e,i,!1)&&(this.loadQuestionnaire(this.questionnaire),this.questionnaireUpdated.emit(this.questionnaire))}searchAndReplace(e,i,r,o){if("object"!=typeof e||null===e)return o;if(e.system==i.system&&e.code==i.code&&e.display==i.display&&(e.system=r.system,e.code=r.code,e.display=r.display,o=!0),e.answerValueSet){const s=new URL(e.answerValueSet),a=s.searchParams.get("fhir_vs");if(a){const c=decodeURIComponent(a),l=new RegExp(`(\\s|^)${i.code}(\\s|$|\\|)`,"g");if(l.test(c)){const d=c.replace(l,`$1${r.code}$2`);o=!0;const u=new RegExp(`\\|\\s*${i.display}\\s*\\|`,"g");if(u.test(d)){const h=d.replace(u,`| ${r.display} |`);s.searchParams.set("fhir_vs",encodeURIComponent(h)),e.answerValueSet=s.toString()}s.searchParams.set("fhir_vs",encodeURIComponent(d)),e.answerValueSet=s.toString()}}}if(Array.isArray(e))for(let s in e)o=this.searchAndReplace(e[s],i,r,o);else for(let s in e)e.hasOwnProperty(s)&&(o=this.searchAndReplace(e[s],i,r,o));return o}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-validate-questionnaire"]],viewQuery:function(i,r){if(1&i&&(pt(Kl,5),pt(Ng,5),pt(Z0e,5)),2&i){let o;Ae(o=Ie())&&(r.sort=o.first),Ae(o=Ie())&&(r.tabGroup=o.first),Ae(o=Ie())&&(r.questionnairesList=o.first)}},inputs:{questionnaire:"questionnaire"},outputs:{questionnaireUpdated:"questionnaireUpdated",validatingQuestionnaire:"validatingQuestionnaire"},features:[jn],decls:32,vars:9,consts:[[1,"button-container","bottom-spacer"],["class","progress-container",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click"],[4,"ngIf"],["diameter","20",4,"ngIf"],["class","header","id","tab-header",4,"ngIf"],[1,"table-container","mt-4"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","order"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","path"],["matColumnDef","readablePath"],["matColumnDef","code"],["matColumnDef","display"],["matColumnDef","system"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"progress-container"],["mode","determinate",3,"value"],[1,"progress-label"],["diameter","20"],["id","tab-header",1,"header"],[1,"bindingsCount"],["class","mini-pill Error",4,"ngIf"],["class","mini-pill Inactive",4,"ngIf"],["class","mini-pill Active",4,"ngIf"],[1,"mini-pill","Error"],[1,"mini-pill","Inactive"],[1,"mini-pill","Active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["target","_blank",1,"code-link",3,"href"],["class","server-name",4,"ngIf"],["class","concept-is-inactive",4,"ngIf"],["class","replacement",4,"ngFor","ngForOf"],[1,"server-name"],[1,"concept-is-inactive"],[1,"replacement"],["mat-icon-button","","color","primary","matTooltip","Replace using this concept",3,"disabled","click"],["mode","indeterminate"],[1,"pill",3,"ngClass"],["mat-header-row",""],["mat-row",""],["diameter","35",1,"loading-spinner"]],template:function(i,r){1&i&&(_(0,"div",0),A(1,J0e,4,2,"div",1),_(2,"button",2),z("click",function(){return r.validate()}),A(3,ebe,2,0,"span",3),A(4,tbe,1,0,"mat-spinner",4),v()(),A(5,obe,14,11,"p",5),_(6,"div",6)(7,"table",7),zt(8,8),A(9,sbe,2,0,"th",9),A(10,abe,2,1,"td",10),jt(),zt(11,11),A(12,cbe,2,0,"th",9),A(13,lbe,2,1,"td",10),jt(),zt(14,12),A(15,dbe,2,0,"th",9),A(16,ube,2,1,"td",10),jt(),zt(17,13),A(18,hbe,2,0,"th",9),A(19,fbe,3,2,"td",10),jt(),zt(20,14),A(21,mbe,2,0,"th",9),A(22,bbe,5,4,"td",10),jt(),zt(23,15),A(24,vbe,2,0,"th",9),A(25,ybe,2,1,"td",10),jt(),zt(26,16),A(27,xbe,2,0,"th",9),A(28,kbe,3,2,"td",10),jt(),A(29,Ebe,1,0,"tr",17),A(30,Tbe,1,0,"tr",18),v(),A(31,Sbe,1,0,"mat-spinner",19),v()),2&i&&(x(1),E("ngIf",r.validating),x(1),E("disabled",r.validating||!r.questionnaire),x(1),E("ngIf",!r.validating),x(1),E("ngIf",r.validating),x(1),E("ngIf",r.questionnaire),x(2),E("dataSource",r.dataSource),x(22),E("matHeaderRowDef",r.displayedColumns),x(1),E("matRowDefColumns",r.displayedColumns),x(1),E("ngIf",r.loading))},dependencies:[ha,io,ri,Fo,Vs,co,L6,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Kl,rD,Jd],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem;padding-bottom:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}"]})}return n})();function Abe(n,t){1&n&&(_(0,"th",15),C(1," Title "),v())}function Ibe(n,t){if(1&n&&(_(0,"td",16),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.title," ")}}function Mbe(n,t){1&n&&(_(0,"th",15),C(1," Status "),v())}const Rbe=function(n){return["status-pill",n]};function Fbe(n,t){if(1&n&&(_(0,"td",16)(1,"span",17),C(2),no(3,"uppercase"),v()()),2&n){const e=t.$implicit;x(1),E("ngClass",la(4,Rbe,e.status)),x(1),Je(Va(3,2,e.status))}}function Pbe(n,t){1&n&&(_(0,"th",15),C(1," Version "),v())}function Obe(n,t){if(1&n&&(_(0,"td",16),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.meta.versionId," ")}}function Nbe(n,t){1&n&&(_(0,"th",15),C(1," Date "),v())}function Lbe(n,t){if(1&n&&(_(0,"td",16)(1,"i"),C(2),no(3,"date"),v()()),2&n){const e=t.$implicit;x(2),Je(Kd(3,1,e.meta.lastUpdated,"MMMM d, y, h:mm:ss a"))}}function Bbe(n,t){1&n&&(_(0,"th",15),C(1," Type "),v())}const Vbe=function(){return["status-pill","active"]};function Ube(n,t){1&n&&(_(0,"span",17),C(1,"QUESTIONNAIRE"),v()),2&n&&E("ngClass",us(1,Vbe))}const Hbe=function(){return["status-pill","draft"]};function zbe(n,t){1&n&&(_(0,"span",17),C(1,"MODULAR ROOT"),v()),2&n&&E("ngClass",us(1,Hbe))}function jbe(n,t){if(1&n&&(_(0,"td",16),A(1,Ube,2,2,"span",18),A(2,zbe,2,2,"span",18),v()),2&n){const e=t.$implicit,i=O();x(1),E("ngIf",!i.isRootQuestionnaire(e)),x(1),E("ngIf",i.isRootQuestionnaire(e))}}function $be(n,t){1&n&&(_(0,"th",19),C(1," Actions "),v())}function Gbe(n,t){if(1&n){const e=Le();_(0,"button",24),z("click",function(){he(e);const r=O().$implicit;return fe(O().restore(r))}),_(1,"mat-icon"),C(2,"restore_page"),v()()}}function Wbe(n,t){if(1&n){const e=Le();_(0,"td",16)(1,"button",20),z("click",function(){const o=he(e).$implicit;return fe(O().preview(o))}),_(2,"mat-icon"),C(3,"visibility"),v()(),_(4,"button",21),z("click",function(){const o=he(e).$implicit;return fe(O().openInNewTab(o))}),_(5,"mat-icon"),C(6,"open_in_new"),v()(),_(7,"button",22),z("click",function(){const o=he(e).$implicit;return fe(O().saveQuestionnaire(o))}),_(8,"mat-icon"),C(9,"cloud_download"),v()(),A(10,Gbe,3,0,"button",23),v()}if(2&n){const e=t.$implicit,i=O();x(10),E("ngIf",(null==e||null==e.meta?null:e.meta.versionId)!=(null==i.versions[0]||null==i.versions[0].meta?null:i.versions[0].meta.versionId))}}function qbe(n,t){1&n&&_e(0,"tr",25)}function Qbe(n,t){1&n&&_e(0,"tr",26)}function Kbe(n,t){1&n&&(_(0,"p",27)(1,"i"),C(2," No questionnaire selected. "),v()())}function Xbe(n,t){1&n&&_e(0,"mat-spinner",28)}let Ybe=(()=>{class n{constructor(e){this.fhirService=e,this.previewQuestionnaire=new De,this.restoreQuestionnaireVersion=new De,this.versions=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new uu}ngOnChanges(e){e.questionnaire&&e.questionnaire.currentValue&&this.loadVersions()}ngOnInit(){Cl([this.fhirService.baseUrl$.pipe(Pc(1e3),ja()),this.fhirService.userTag$.pipe(Pc(1e3),ja())]).subscribe(([e,i])=>{(this.selectedFhirServer!==e||this.selectedUserTag!==i)&&(this.selectedFhirServer=e,this.selectedUserTag=i,this.selectedUserTag&&this.selectedFhirServer&&this.loadVersions())})}loadVersions(e){this.versions=[],this.dataSource.data=this.versions,e&&(this.questionnaire=e),this.questionnaire&&(this.loading=!0,this.fhirService.getQuestionnaireHistory(this.questionnaire.id).subscribe(i=>{this.versions=i.entry.map(r=>r.resource),this.dataSource.data=this.versions,this.loading=!1}))}preview(e){this.previewQuestionnaire.emit(e),this.loadVersions()}openInNewTab(e){window.open(this.selectedFhirServer+"/Questionnaire/"+e.id+"/_history/"+e.meta.versionId,"_blank")}saveQuestionnaire(e){var i=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});Wa(i,`${e.title}-v${e.meta.versionId}.json`)}restore(e){this.restoreQuestionnaireVersion.emit(e)}isRootQuestionnaire(e){return!(!e.extension||!Array.isArray(e.extension))&&e.extension.some(i=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===i.url&&"assemble-root"===i.valueCode)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Bf))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-questionnaire-history"]],inputs:{questionnaire:"questionnaire"},outputs:{previewQuestionnaire:"previewQuestionnaire",restoreQuestionnaireVersion:"restoreQuestionnaireVersion"},features:[jn],decls:24,vars:5,consts:[[1,"table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Restore Version",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Restore Version",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"table",1),zt(2,2),A(3,Abe,2,0,"th",3),A(4,Ibe,2,1,"td",4),jt(),zt(5,5),A(6,Mbe,2,0,"th",3),A(7,Fbe,4,6,"td",4),jt(),zt(8,6),A(9,Pbe,2,0,"th",3),A(10,Obe,2,1,"td",4),jt(),zt(11,7),A(12,Nbe,2,0,"th",3),A(13,Lbe,4,4,"td",4),jt(),zt(14,8),A(15,Bbe,2,0,"th",3),A(16,jbe,3,2,"td",4),jt(),zt(17,9),A(18,$be,2,0,"th",10),A(19,Wbe,11,1,"td",4),jt(),A(20,qbe,1,0,"tr",11),A(21,Qbe,1,0,"tr",12),v(),A(22,Kbe,3,0,"p",13),A(23,Xbe,1,0,"mat-spinner",14),v()),2&i&&(x(1),E("dataSource",r.dataSource),x(19),E("matHeaderRowDef",r.displayedColumns),x(1),E("matRowDefColumns",r.displayedColumns),x(1),E("ngIf",!r.questionnaire),x(1),E("ngIf",r.loading))},dependencies:[ha,ri,Vs,co,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Kl,rD,DE,Jd],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px}.table-container[_ngcontent-%COMP%]{margin:2rem;padding-bottom:2rem}"]})}return n})();const Zbe=["questionnairesList"],Jbe=["fileInput"],eve=["questionnaireHistory"];function tve(n,t){1&n&&(_(0,"span"),C(1," / Validator"),v())}function nve(n,t){1&n&&(_(0,"span"),C(1," / Questionnaires repository"),v())}function ive(n,t){if(1&n){const e=Le();_(0,"span",15)(1,"a",16),z("click",function(){return he(e),fe(O(2).mode="Manager")}),_(2,"mat-icon"),C(3,"play_arrow"),v(),_(4,"span"),C(5,"Reconnect to last FHIR Server"),v()(),_(6,"span",17),C(7),_(8,"i"),C(9),v(),C(10,'" )'),v()()}if(2&n){const e=O(2);x(7),Qe(" ( ",e.selectedFhirServer,' as "'),x(2),Je(e.selectedUserTag)}}function rve(n,t){if(1&n){const e=Le();_(0,"div",6)(1,"p"),C(2,"What do you want to do today?"),v(),_(3,"mat-radio-group",7),z("ngModelChange",function(r){return he(e),fe(O().step1Response=r)}),_(4,"mat-radio-button",8),C(5,"Edit a questionnaire in the NLM Form Builder"),v(),_(6,"mat-radio-button",9),C(7,"Load an example questionnaire"),v(),_(8,"mat-radio-button",10),C(9,"Upload and validate a questionnaire"),v(),_(10,"mat-radio-button",11),C(11,"Work with your questionnaires from a FHIR server"),v(),A(12,ive,11,2,"span",12),v(),_(13,"div",13)(14,"button",14),z("click",function(){return he(e),fe(O().advanceFromStep1())}),C(15,"Next"),v()()()}if(2&n){const e=O();x(3),E("ngModel",e.step1Response),x(9),E("ngIf",e.selectedFhirServer&&e.selectedUserTag),x(2),E("disabled",!e.step1Response)}}function ove(n,t){if(1&n&&(_(0,"span"),C(1," Connected to "),_(2,"a",33),C(3),v(),C(4,' as "'),_(5,"i"),C(6),v(),C(7,'" '),v()),2&n){const e=O(2);x(3),Je(e.selectedFhirServer),x(3),Je(e.selectedUserTag)}}function sve(n,t){if(1&n){const e=Le();_(0,"button",14),z("click",function(){return he(e),fe(O(2).openModularQuestionnaireModal())}),C(1," Create Modular Questionnaire "),v()}2&n&&E("disabled",O(2).validating)}function ave(n,t){if(1&n){const e=Le();_(0,"mat-tab",34)(1,"div",25)(2,"app-list-questionnaires",35,36),z("validateQuestionnaire",function(r){return he(e),fe(O(2).switchToValidateTab(r))})("previewQuestionnaire",function(r){return he(e),fe(O(2).switchToPreviewTab(r))})("viewQuestionaireHistory",function(r){return he(e),fe(O(2).switchToHistoryTab(r))}),v()()()}if(2&n){const e=O(2);x(2),E("config",e.listConfig)}}function cve(n,t){if(1&n&&(_(0,"h4"),C(1),no(2,"date"),v()),2&n){const e=O(2);x(1),Tp("",e.questionnaire.title," - Version: ",e.questionnaire.meta.versionId," (",Kd(2,3,e.questionnaire.meta.lastUpdated,"fullDate"),")")}}function lve(n,t){if(1&n){const e=Le();_(0,"div")(1,"div",18),A(2,ove,8,2,"span",4),_(3,"input",19,20),z("change",function(r){return he(e),fe(O().onFileSelected(r))}),v(),_(5,"button",14),z("click",function(){return he(e),fe(Pt(4).click())}),C(6," Upload "),v(),_(7,"button",14),z("click",function(){return he(e),fe(O().saveQuestionnaireToDisk())}),C(8,"Download"),v(),A(9,sve,2,1,"button",21),v(),_(10,"mat-tab-group",22),z("selectedIndexChange",function(r){return he(e),fe(O().onTabChange(r))}),A(11,ave,4,1,"mat-tab",23),_(12,"mat-tab",24)(13,"div",25),A(14,cve,3,6,"h4",4),_e(15,"div",26),v()(),_(16,"mat-tab",27)(17,"app-validate-questionnaire",28,29),z("questionnaireUpdated",function(r){return he(e),fe(O().loadQuestionnaire(r))})("validatingQuestionnaire",function(r){return he(e),fe(O().validating=r)}),v()(),_(19,"mat-tab",30)(20,"app-questionnaire-history",31,32),z("previewQuestionnaire",function(r){return he(e),fe(O().switchToPreviewTab(r))})("restoreQuestionnaireVersion",function(r){return he(e),fe(O().saveQuestionnaire(r))}),v()()()()}if(2&n){const e=O();x(2),E("ngIf","Manager"==e.mode),x(3),E("disabled",e.validating),x(2),E("disabled",e.validating||!e.questionnaire),x(2),E("ngIf","Manager"==e.mode),x(2),E("ngIf","Manager"===e.mode),x(3),E("ngIf",e.questionnaire),x(1),ot("hidden",!e.questionnaire),x(2),E("questionnaire",e.questionnaire),x(3),E("questionnaire",e.questionnaire)}}let dve=(()=>{class n{constructor(e,i,r,o,s,a){this.http=e,this.terminologyService=i,this.fhirService=r,this.questionnaireService=o,this.dialog=s,this._snackBar=a,this.loading=!1,this.validating=!1,this.orderCounter=0,this.savingQuestionnaire=!1,this.selectedFhirServer="",this.selectedUserTag="",this.showFhirSetupModal=!1,this.listConfig={validate:!0,preview:!0},this.mode="step1"}ngOnInit(){this.fhirService.baseUrl$.subscribe(e=>{this.selectedFhirServer=e}),this.fhirService.userTag$.subscribe(e=>{this.selectedUserTag=e}),this.loadScript()}loadScript(){const e=document.createElement("script");e.src="https://clinicaltables.nlm.nih.gov/lforms-versions/34.3.1/webcomponent/lhc-forms.js",e.onload=()=>{const i=document.createElement("script");i.src="https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/fhir/R4/lformsFHIR.min.js",i.onload=()=>{},document.head.appendChild(i)},document.head.appendChild(e)}toggleMode(){"Validator"===this.mode?this.dialog.open(oD,{width:"60%",disableClose:!0}).afterClosed().subscribe(i=>{"save"===i&&(this.mode="Manager",setTimeout(()=>{this.tabGroup.selectedIndex=0},500))}):this.mode="Validator"}previewForm(){"Preview"==this.getCurrentTabName()&&(this.questionnaire?LForms.Util.addFormToPage(this.questionnaire,"myFormContainer"):LForms.Util.addFormToPage({},"myFormContainer"))}displayHistory(e){e&&this.questionnaireHistory.loadVersions(e)}loadExampleQuestionnaire(){oo(this.http.get("assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json")).then(e=>{this.loadQuestionnaire(e),"Manager"===this.mode&&(this.tabGroup.selectedIndex=1)})}clearQuestionnaire(){this.questionnaire=null,this.orderCounter=0,this.previewForm()}loadQuestionnaire(e){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=e,this.previewForm()},700)}saveQuestionnaireToDisk(){var e=new Blob([JSON.stringify(this.questionnaire,null,2)],{type:"text/plain;charset=utf-8"});Wa(e,`${this.questionnaire.title}.json`)}onFileSelected(e){const i=e.target.files?.[0];if(i){const r=new FileReader;r.onload=o=>{try{const s=JSON.parse(o.target?.result);"Questionnaire"===s.resourceType?(this.loadQuestionnaire(s),setTimeout(()=>{"Manager"===this.mode?this.postCurrentQuestionnaire():this.tabGroup.selectedIndex=1},1e3)):this._snackBar.openFromComponent(Si,{duration:5e3,data:"The file is not a FHIR Questionnaire Resource",panelClass:["red-snackbar"]})}catch(s){console.error(s),this._snackBar.openFromComponent(Si,{duration:5e3,data:"Invalid JSON file",panelClass:["red-snackbar"]})}},r.readAsText(i)}}postCurrentQuestionnaire(){this.postQuestionnaire(this.questionnaire)}postQuestionnaire(e){if(-1!==this.questionnairesList.questionnaires.findIndex(r=>r.title===e.title&&r.id!==e.id))this.dialog.open(N6,{width:"400px",data:{title:"Confirm Action",message:"A questionnaire with the same title and different ID already exists. Do you want to proceed?"}}).afterClosed().subscribe(o=>{o?this.saveQuestionnaire(e):(this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]}),console.log("User cancelled the action"))});else{-1!==this.questionnairesList.questionnaires.findIndex(s=>s.title===e.title&&s.id===e.id&&s.meta?.versionId>=e.meta?.versionId)?this.dialog.open(N6,{width:"400px",data:{title:"Confirm Action",message:"A newer version or identical of this questionnaire already exists. Do you want to proceed?"}}).afterClosed().subscribe(a=>{a?this.saveQuestionnaire(e):(this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]}),console.log("User cancelled the action"))}):this.saveQuestionnaire(e)}}saveQuestionnaire(e){this.savingQuestionnaire=!0,this._snackBar.openFromComponent(Si,{duration:5e3,data:"Saving Questionnaire...",panelClass:["green-snackbar"]}),e.meta||(e.meta={}),e.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.fhirService.updateOrCreateQuestionnaire(e,this.selectedUserTag).pipe(Ns()).subscribe(i=>{setTimeout(()=>{this.tabGroup.selectedIndex=0,setTimeout(()=>{this.savingQuestionnaire=!1,this.questionnairesList.addQuestionnaire(i)},300)},300),this._snackBar.openFromComponent(Si,{duration:5e3,data:"Questionnaire saved successfully",panelClass:["green-snackbar"]})},i=>{this.savingQuestionnaire=!1,this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})})}listQuestionnaires(){this.fhirService.getQuestionnairesByTag(this.selectedUserTag).pipe(Ns()).subscribe(e=>{},e=>{console.error(e)})}openLoadQuestionnairesDialog(){this.dialog.open($0e,{width:"70%"}).afterClosed().subscribe(i=>{this.loadQuestionnaire(i)})}setFhirServer(){this.fhirService.setBaseUrl(this.selectedFhirServer),this.fhirService.setUserTag(this.selectedUserTag)}setupFhirServer(){this.dialog.open(oD,{width:"60%"})}switchToValidateTab(e){this.loadQuestionnaire(e),this.tabGroup.selectedIndex=2}switchToPreviewTab(e){this.loadQuestionnaire(e),this.tabGroup.selectedIndex=1}switchToHistoryTab(e){this.displayHistory(e),this.tabGroup.selectedIndex=3}advanceFromStep1(){"edit"==this.step1Response?window.open("https://lhcformbuilder.nlm.nih.gov/","_blank"):"validate"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.uploadInput.nativeElement.click()},200)):"repository"==this.step1Response?this.dialog.open(oD,{width:"60%"}).afterClosed().subscribe(i=>{i&&(this.mode="Manager")}):"example"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.loadExampleQuestionnaire()},300)):"reconnect"==this.step1Response&&(this.mode="Manager"),this.step1Response=""}getCurrentTabName(){const e=this.tabGroup.selectedIndex;return null!=e?this.tabGroup._tabs.toArray()[e].textLabel:""}onTabChange(e){"Preview"===this.tabGroup._tabs.toArray()[e].textLabel&&setTimeout(()=>{this.previewForm()},300)}openModularQuestionnaireModal(){this.dialog.open(F6,{width:"75%"}).afterClosed().subscribe(i=>{i&&this.questionnaireService.generateRootQuestionnaire(i.title,i.questionnaires).then(r=>{this.postQuestionnaire(r)}).catch(r=>{console.error("Error:",r)})})}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ml),y(Ur),y(Bf),y(P6),y(Nf),y(Df))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-questionnaires-main"]],viewQuery:function(i,r){if(1&i&&(pt(Kl,5),pt(Ng,5),pt(Zbe,5),pt(Jbe,5),pt(eve,5)),2&i){let o;Ae(o=Ie())&&(r.sort=o.first),Ae(o=Ie())&&(r.tabGroup=o.first),Ae(o=Ie())&&(r.questionnairesList=o.first),Ae(o=Ie())&&(r.uploadInput=o.first),Ae(o=Ie())&&(r.questionnaireHistory=o.first)}},decls:11,vars:4,consts:[[1,"header-container"],[1,"header"],[1,"breadcrumb"],["href","javascript:void(0)",3,"click"],[4,"ngIf"],["id","step1",4,"ngIf"],["id","step1"],["aria-label","Select an option",3,"ngModel","ngModelChange"],["value","edit"],["value","example"],["value","validate"],["value","repository"],["id","reconnect",4,"ngIf"],[1,"step-button-container"],["mat-flat-button","","color","accent",3,"disabled","click"],["id","reconnect"],["href","javascript:void(0)","id","reconnect-link",3,"click"],[1,"muted"],[1,"button-container","bottom-spacer"],["type","file","hidden","",3,"change"],["fileInput",""],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange"],["label","My Questionnaires",4,"ngIf"],["label","Preview"],[1,"tab-container"],["id","myFormContainer"],["label","Validate SNOMED Bindings"],[3,"questionnaire","questionnaireUpdated","validatingQuestionnaire"],["validateQuestionnaire",""],["label","History"],[3,"questionnaire","previewQuestionnaire","restoreQuestionnaireVersion"],["questionnaireHistory",""],["href","selectedFhirServer"],["label","My Questionnaires"],[3,"config","validateQuestionnaire","previewQuestionnaire","viewQuestionaireHistory"],["questionnairesList",""]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h2",1),C(2," SNOMED CT Terminology Bindings Validator - FHIR Questionnaire Manager "),v(),_(3,"div",2)(4,"span")(5,"a",3),z("click",function(){return r.mode="step1"}),C(6,"Home"),v(),A(7,tve,2,0,"span",4),A(8,nve,2,0,"span",4),v()()(),A(9,rve,16,3,"div",5),A(10,lve,22,10,"div",4)),2&i&&(x(7),E("ngIf","Validator"==r.mode),x(1),E("ngIf","Manager"==r.mode),x(1),E("ngIf","step1"==r.mode),x(1),E("ngIf","Manager"==r.mode||"Validator"==r.mode))},dependencies:[ri,Fo,co,qo,qy,Ng,ps,tD,nD,O6,Dbe,Ybe,Jd],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding-top:1rem;padding-left:2rem;padding-right:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}#step1[_ngcontent-%COMP%]{margin-top:2rem;margin-left:2rem;font-size:large}#step1[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{margin-left:2rem;display:flex;flex-direction:column;align-items:flex-start}.step-button-container[_ngcontent-%COMP%]{margin-left:30rem;margin-top:2rem}.breadcrumb[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:2rem}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hidden[_ngcontent-%COMP%]{visibility:hidden}.muted[_ngcontent-%COMP%]{color:#8f9397}#reconnect[_ngcontent-%COMP%]{margin-left:5rem}#reconnect-link[_ngcontent-%COMP%]{display:flex;vertical-align:middle;flex-direction:row}"]})}return n})();function uve(n,t){if(1&n&&(_(0,"p",17),C(1),v()),2&n){const e=O();x(1),Je(e.studentSubsetDefinition)}}function hve(n,t){1&n&&_e(0,"mat-spinner",18)}function fve(n,t){if(1&n&&(_(0,"p",22),C(1),v()),2&n){const e=O(2);x(1),Je(e.definitionVsMembersValidationResult)}}function mve(n,t){if(1&n&&(_(0,"p",22),C(1),v()),2&n){const e=O(2);x(1),Je(e.keyConceptValidationResult)}}function pve(n,t){if(1&n&&(_(0,"div",19)(1,"h3",20),C(2,"Validation Results"),v(),A(3,fve,2,1,"p",21),A(4,mve,2,1,"p",21),_(5,"p",22),C(6),v(),_(7,"p",22),C(8),v()()),2&n){const e=O();x(3),E("ngIf",e.selectedAssignment.referenceDefinition),x(1),E("ngIf",e.selectedAssignment.referenceDefinition),x(2),Je(e.membersNotInRefrenceListResult),x(2),Je(e.refrenceListVsStudentListResult)}}function gve(n,t){1&n&&(_(0,"th",32),C(1,"ID"),v())}function _ve(n,t){if(1&n&&(_(0,"td",33),C(1),v()),2&n){const e=t.$implicit;x(1),Je(e.referencedComponentId)}}function bve(n,t){1&n&&(_(0,"th",32),C(1,"Name"),v())}function vve(n,t){if(1&n&&(_(0,"td",33),C(1),v()),2&n){const e=t.$implicit;x(1),Je(e.name)}}function yve(n,t){1&n&&(_(0,"th",32),C(1,"Result"),v())}function xve(n,t){1&n&&(_(0,"span"),C(1,"OK"),v())}function wve(n,t){if(1&n&&(_(0,"span"),C(1),v()),2&n){const e=O(2).$implicit;x(1),Qe(" ",e.customMessage.note," ")}}function Cve(n,t){1&n&&(_(0,"span"),C(1," Error "),v())}function kve(n,t){if(1&n&&(_(0,"span"),A(1,xve,2,0,"span",15),A(2,wve,2,1,"span",15),A(3,Cve,2,0,"span",15),v()),2&n){const e=O().$implicit;x(1),E("ngIf",null==e||null==e.inReferenceList?null:e.inReferenceList.value),x(1),E("ngIf",!(null!=e&&null!=e.inReferenceList&&e.inReferenceList.value)&&(null==e||null==e.customMessage?null:e.customMessage.value)),x(1),E("ngIf",!(null!=e&&null!=e.inReferenceList&&e.inReferenceList.value||null!=e&&null!=e.customMessage&&e.customMessage.value))}}function Eve(n,t){if(1&n&&(_(0,"td",33),A(1,kve,4,3,"span",15),v()),2&n){const e=O(2);x(1),E("ngIf",e.membersValidationResult)}}function Tve(n,t){1&n&&_e(0,"tr",34)}const Sve=function(n){return{"bg-pink":n}};function Dve(n,t){if(1&n&&_e(0,"tr",35),2&n){const e=t.$implicit,i=O(2);E("ngClass",la(1,Sve,!(null!=e.inReferenceList&&e.inReferenceList.value)&&i.membersValidationResult))}}function Ave(n,t){if(1&n&&(_(0,"div",23)(1,"table",24),zt(2,25),A(3,gve,2,0,"th",26),A(4,_ve,2,1,"td",27),jt(),zt(5,28),A(6,bve,2,0,"th",26),A(7,vve,2,1,"td",27),jt(),zt(8,29),A(9,yve,2,0,"th",26),A(10,Eve,2,1,"td",27),jt(),A(11,Tve,1,0,"tr",30),A(12,Dve,1,3,"tr",31),v()()),2&n){const e=O();x(1),E("dataSource",e.studentSubsetMembersDataSource),x(10),E("matHeaderRowDef",e.studentSubsetMembersDisplayedColumns),x(1),E("matRowDefColumns",e.studentSubsetMembersDisplayedColumns)}}function Ive(n,t){if(1&n){const e=Le();_(0,"button",40),z("click",function(){const o=he(e).$implicit;return fe(O(2).setAssignment(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e.name)}}function Mve(n,t){if(1&n&&(_(0,"div")(1,"h3"),C(2,"Assignment"),v(),_(3,"button",36),C(4),v(),_(5,"mat-menu",37,38),A(7,Ive,2,1,"button",39),v()()),2&n){const e=Pt(6),i=O();x(3),E("matMenuTriggerFor",e),x(1),Qe("Selected assignment: ",null==i.selectedAssignment?null:i.selectedAssignment.name,""),x(3),E("ngForOf",i.assignments)}}function Rve(n,t){if(1&n&&(_(0,"h3"),C(1),v()),2&n){const e=O();x(1),Qe(" Assignment: ",null==e.selectedAssignment?null:e.selectedAssignment.name," ")}}function Fve(n,t){1&n&&(_(0,"ol")(1,"li"),C(2,"1- Upload definition file"),v(),_(3,"li"),C(4,"2- Upload members file"),v(),_(5,"li"),C(6,"3- Click validate"),v()())}function Pve(n,t){1&n&&(_(0,"ol")(1,"li"),C(2,"1- Upload members file"),v(),_(3,"li"),C(4,"2- Click validate"),v()())}function Ove(n,t){if(1&n){const e=Le();_(0,"div")(1,"div")(2,"h3"),C(3,"Reference Data"),v(),_(4,"mat-form-field",41)(5,"mat-label"),C(6,"Textarea"),v(),_(7,"textarea",42),z("ngModelChange",function(r){return he(e),fe(O().assignmentsString=r)}),v()(),_(8,"button",10),z("click",function(){return he(e),fe(O().updateAssignments())}),C(9,"Update Assignments"),v()()()}if(2&n){const e=O();x(7),E("ngModel",e.assignmentsString)}}let Nve=(()=>{class n{constructor(e,i,r,o){this.http=e,this.terminologyService=i,this._snackBar=r,this.activatedRoute=o,this.studentSubsetMembersDisplayedColumns=["referencedComponentId","name","result"],this.studentSubsetMembersDataSource=new uu,this.studentSubsetmembers=[],this.studentSubsetDefinition="",this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersNotInRefrenceListResult="",this.membersValidationResult=!1,this.refrenceListVsStudentListResult="",this.embeddedMode=!1,this.loading=!1,this.ok="\u2705",this.error="\u{1f7e5}",this.assignments=[{name:"Assignment X",referenceData:[{referencedComponentId:"403197009",name:"Sun-induced wrinkles"},{referencedComponentId:"279002006",name:"Lichenification of skin"},{referencedComponentId:"274672009",name:"Changes in skin texture"},{referencedComponentId:"271767006",name:"Peeling of skin"},{referencedComponentId:"271761007",name:"Scaly skin"},{referencedComponentId:"247434009",name:"Wrinkled skin"}],referenceDefinition:"< 185823004 |Finding of skin texture (finding)|",keyConceptsInECL:[{code:"185823004",display:"Finding of skin texture (finding)"}],customMessages:[{conceptId:"85345005",note:"wrong hierarchy",principle:"wrong hierarchy"},{conceptId:"403197009",note:"wrong hierarchy",principle:"wrong hierarchy"}]}],this.assignmentsString=JSON.stringify(this.assignments),this.selectedAssignment=this.assignments[0],this.referenceDataDisplayedColumns=["referencedComponentId","name"],this.referenceDataDataSource=new uu(this.selectedAssignment.referenceData)}ngOnInit(){var e=this;return xe(function*(){const i=yield oo(e.http.get("assets/definitions/assignments.json"));e.assignments=i,e.assignmentsString=JSON.stringify(e.assignments),e.setAssignment(e.assignments[0]),e.activatedRoute.queryParams.subscribe(r=>{r.assignment&&e.setAssignment(e.assignments.find(o=>o.name===r.assignment)),e.embeddedMode="true"===r.embedded})})()}setAssignment(e){e&&(this.selectedAssignment=e,this.referenceDataDataSource=new uu(this.selectedAssignment.referenceData))}checkStudentECLvsStudentList(){var e=this;return xe(function*(){if(!e.studentSubsetDefinition){let r=yield e.terminologyService.expandValueSet(e.studentSubsetDefinition,"").toPromise(),s=0;e.studentSubsetmembers.forEach(a=>{r.expansion.contains.find(l=>l.code===a.referencedComponentId)?a.inStudentECL={value:!0,message:""}:(a.inStudentECL={value:!1,message:""},s++)})}return 0})()}checkStudentECLvsKeyConcept(){if(this.studentSubsetDefinition){console.log("Student ECL not defined");let e=this.studentSubsetDefinition,r=!0;return this.selectedAssignment.keyConceptsInECL.forEach(o=>{e.includes(o.code)||(r=!1)}),r}return!0}checkStudentListVsReferenceList(){let i=this.selectedAssignment.referenceData;this.studentSubsetmembers.forEach(o=>{o.inReferenceList=i.find(a=>a.referencedComponentId===o.referencedComponentId)?{value:!0,message:""}:{value:!1,message:""}})}checkReferenceListVsStudentList(){let e=this.studentSubsetmembers,r=0;return this.selectedAssignment.referenceData.forEach(o=>{e.find(a=>a.referencedComponentId===o.referencedComponentId)?o.inStudentList={value:!0,message:""}:(o.inStudentList={value:!1,message:""},r++)}),r}checkStudentListVsCustomMessages(){let i=this.selectedAssignment.customMessages;this.studentSubsetmembers.forEach(r=>{const o=i.find(s=>s.conceptId===r.referencedComponentId);r.customMessage=o?{value:!0,principle:o.principle,note:o.note}:{value:!1,principle:"",note:""}})}updateAssignments(){this.assignments=JSON.parse(this.assignmentsString),this.setAssignment(this.assignments[0])}validateAssignment(){var e=this;return xe(function*(){if(e.loading=!0,e.keyConceptValidationResult="",e.definitionVsMembersValidationResult="",e.membersValidationResult=!1,e.loading=!0,e.studentSubsetDefinition){let o=yield e.checkStudentECLvsStudentList();e.definitionVsMembersValidationResult=o>0?e.error+" "+o+" members not found in student ECL":e.ok+" All members found in student ECL",e.keyConceptValidationResult=e.checkStudentECLvsKeyConcept()?e.ok+" Student ECL contains all key concepts":e.error+" Student ECL does not contain all key concepts"}e.checkStudentListVsReferenceList();let i=e.studentSubsetmembers.filter(o=>!o.inReferenceList.value).length;e.membersNotInRefrenceListResult=i>0?e.error+" "+i+" members not found in reference list":e.ok+" All members found in reference list",e.checkStudentListVsCustomMessages();let r=e.checkReferenceListVsStudentList();e.refrenceListVsStudentListResult=r>0?e.error+" "+r+" "+(r>1?"concepts are":"concept is")+" missing in the uploaded member list that would be recommended to be included in this subset":e.ok+" All recommended concepts are included in this subset",e.loading=!1,e.membersValidationResult=!0})()}onSubsetmembersFileSelected(e){this.studentSubsetmembers=[],this.studentSubsetMembersDataSource=new uu,this.studentSubsetMembersDataSource.sort=this.sort,this.loading=!0;const i=e.target.files?.[0];if(i){const r=new FileReader;r.onload=o=>{try{const a=r.result.split("\n"),c=a[0].split("\t");if(c.length<2)throw new Error("Invalid file format");const l=c.indexOf("referencedComponentId"),d=c.indexOf("name");if(l<0||d<0)throw new Error("Invalid file format");const u=[];for(let h=1;hh.name.localeCompare(f.name)),this.studentSubsetmembers=u,this.studentSubsetMembersDataSource.data=u,this.loading=!1}catch(s){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+s.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=o=>{this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+o,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(i)}else this.loading=!1}onDefinitionFileSelected(e){this.studentSubsetDefinition="",this.loading=!0;const i=e.target.files?.[0];if(i){const r=new FileReader;r.onload=o=>{try{const c=r.result.replace(/\r/g,"").split("\n"),l=c[0].split("\t");if(l.length<2)throw new Error("Invalid file format");const d=l.indexOf("referencedComponentId"),u=l.indexOf("definition");if(d<0||u<0)throw new Error("Invalid file format");this.studentSubsetDefinition=c[1].split("\t")[u],this.loading=!1}catch(s){this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+s.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=o=>{this._snackBar.openFromComponent(Si,{duration:5e3,data:"Error reading file: "+o,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(i)}else this.loading=!1}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ml),y(Ur),y(Df),y(Dl))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-subset-validator"]],viewQuery:function(i,r){if(1&i&&pt(Kl,5),2&i){let o;Ae(o=Ie())&&(r.sort=o.first)}},decls:31,vars:12,consts:[[1,"layout-container"],[1,"left-column"],[1,"upload-controls"],[1,"mb-4"],["class","terminal-style",4,"ngIf"],["type","file",2,"display","none",3,"change"],["fileInput",""],["fileInputDefinition",""],[1,"buttons-panel"],["mat-flat-button","","color","primary",3,"disabled","click"],["mat-flat-button","","color","primary",3,"click"],["class","spinner","diameter","30",4,"ngIf"],["class","blue-rounded-div",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"right-column"],[4,"ngIf"],[1,"instructions"],[1,"terminal-style"],["diameter","30",1,"spinner"],[1,"blue-rounded-div"],[1,"text-white","mb-1"],["class","validation-result",4,"ngIf"],[1,"validation-result"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","referencedComponentId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","result"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"ngClass"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"wide-menu"],["demosMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["appearance","fill"],["matInput","",3,"ngModel","ngModelChange"]],template:function(i,r){if(1&i){const o=Le();_(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3"),C(4,"Subset Members Validator"),v(),_(5,"p",3),C(6),v(),A(7,uve,2,1,"p",4),_(8,"input",5,6),z("change",function(a){return r.onSubsetmembersFileSelected(a)}),v(),_(10,"input",5,7),z("change",function(a){return r.onDefinitionFileSelected(a)}),v(),_(12,"div",8)(13,"button",9),z("click",function(){return he(o),fe(Pt(11).click())}),C(14," Upload Definition File "),v(),_(15,"button",10),z("click",function(){return he(o),fe(Pt(9).click())}),C(16,"Upload Members File"),v(),_(17,"button",9),z("click",function(){return r.validateAssignment()}),C(18,"Validate"),v(),A(19,hve,1,0,"mat-spinner",11),v(),A(20,pve,9,4,"div",12),v(),A(21,Ave,13,3,"div",13),v(),_(22,"div",14),A(23,Mve,8,3,"div",15),A(24,Rve,2,1,"h3",15),_(25,"h3"),C(26,"Instructions"),v(),_(27,"div",16),A(28,Fve,7,0,"ol",15),A(29,Pve,5,0,"ol",15),v(),A(30,Ove,10,1,"div",15),v()()}2&i&&(x(6),Qe("Validating against ",r.terminologyService.getFhirUrlParam(),""),x(1),E("ngIf",r.studentSubsetDefinition),x(6),E("disabled",!r.selectedAssignment.referenceDefinition),x(4),E("disabled",!r.studentSubsetMembersDataSource.data.length),x(2),E("ngIf",r.loading),x(1),E("ngIf",!r.loading&&r.membersNotInRefrenceListResult),x(1),E("ngIf",!r.loading&&r.studentSubsetMembersDataSource.data.length),x(2),E("ngIf",!r.embeddedMode),x(1),E("ngIf",r.embeddedMode),x(4),E("ngIf",r.selectedAssignment.referenceDefinition),x(1),E("ngIf",!r.selectedAssignment.referenceDefinition),x(1),E("ngIf",!r.embeddedMode))},dependencies:[ha,io,ri,Fo,lu,$a,du,ba,gs,Bl,ql,Us,qo,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,ps],styles:["[_nghost-%COMP%]{display:block;height:calc(100% - 65px)}.layout-container[_ngcontent-%COMP%]{display:flex;height:100%}.left-column[_ngcontent-%COMP%]{flex:0 0 68%;display:flex;flex-direction:column;height:100%}.right-column[_ngcontent-%COMP%]{flex:0 0 28%}.buttons-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-top:2rem}.upload-controls[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.table-container[_ngcontent-%COMP%]{overflow-y:auto}.upload-controls[_ngcontent-%COMP%]{margin-left:20px}table[_ngcontent-%COMP%]{width:100%}.validation-result[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.blue-rounded-div[_ngcontent-%COMP%]{border-radius:10px;background-color:#4d7fb4;padding:.5rem 3rem 1rem;width:80%;color:#f5f5f5;margin-top:20px}.terminal-style[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem;background-color:#000;color:#fff;padding:10px;border-radius:10px;margin-top:20px;width:80%}h4[_ngcontent-%COMP%]{margin-top:10px}.instructions[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px;font-weight:lighter;font-size:larger}h3[_ngcontent-%COMP%]{margin-top:10px}.bg-pink[_ngcontent-%COMP%]{background-color:pink}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#aba9a9!important}"]})}return n})();const V6=function(n){const t=[];let e=0;for(let i=0;i>6|192,t[e++]=63&r|128):55296==(64512&r)&&i+1>18|240,t[e++]=r>>12&63|128,t[e++]=r>>6&63|128,t[e++]=63&r|128):(t[e++]=r>>12|224,t[e++]=r>>6&63|128,t[e++]=63&r|128)}return t},U6={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(n,t){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();const e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r>6,f=63&l;c||(f=64,s||(h=64)),i.push(e[o>>2],e[(3&o)<<4|a>>4],e[h],e[f])}return i.join("")},encodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(n):this.encodeByteArray(V6(n),t)},decodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(n):function(n){const t=[];let e=0,i=0;for(;e191&&r<224){const o=n[e++];t[i++]=String.fromCharCode((31&r)<<6|63&o)}else if(r>239&&r<365){const c=((7&r)<<18|(63&n[e++])<<12|(63&n[e++])<<6|63&n[e++])-65536;t[i++]=String.fromCharCode(55296+(c>>10)),t[i++]=String.fromCharCode(56320+(1023&c))}else{const o=n[e++],s=n[e++];t[i++]=String.fromCharCode((15&r)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(n,t))},decodeStringToByteArray(n,t){this.init_();const e=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r>4),64!==l&&(i.push(a<<4&240|l>>2),64!==u&&i.push(l<<6&192|u))}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}};class Hve extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const ox=function(n){return function(n){const t=V6(n);return U6.encodeByteArray(t,!0)}(n).replace(/\./g,"")},sx=()=>{try{return function $ve(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const n=process.env.__FIREBASE_DEFAULTS__;return n?JSON.parse(n):void 0})()||(()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=n&&function(n){try{return U6.decodeString(n,!0)}catch(t){console.error("base64Decode failed: ",t)}return null}(n[1]);return t&&JSON.parse(t)})()}catch(n){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`)}},Kve=n=>{const t=(n=>{var t,e;return null===(e=null===(t=sx())||void 0===t?void 0:t.emulatorHosts)||void 0===e?void 0:e[n]})(n);if(!t)return;const e=t.lastIndexOf(":");if(e<=0||e+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const i=parseInt(t.substring(e+1),10);return"["===t[0]?[t.substring(1,e-1),i]:[t.substring(0,e),i]},z6=()=>{var n;return null===(n=sx())||void 0===n?void 0:n.config};class j6{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,i)=>{e?this.reject(e):this.resolve(i),"function"==typeof t&&(this.promise.catch(()=>{}),1===t.length?t(e):t(e,i))}}}function Yl(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function $6(){try{return"object"==typeof indexedDB}catch{return!1}}class Vf extends Error{constructor(t,e,i){super(e),this.code=t,this.customData=i,this.name="FirebaseError",Object.setPrototypeOf(this,Vf.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,G6.prototype.create)}}class G6{constructor(t,e,i){this.service=t,this.serviceName=e,this.errors=i}create(t,...e){const i=e[0]||{},r=`${this.service}/${t}`,o=this.errors[t],s=o?function tye(n,t){return n.replace(nye,(e,i)=>{const r=t[i];return null!=r?String(r):`<${i}?>`})}(o,i):"Error";return new Vf(r,`${this.serviceName}: ${s} (${r}).`,i)}}const nye=/\{\$([^}]+)}/g;function cD(n,t){if(n===t)return!0;const e=Object.keys(n),i=Object.keys(t);for(const r of e){if(!i.includes(r))return!1;const o=n[r],s=t[r];if(q6(o)&&q6(s)){if(!cD(o,s))return!1}else if(o!==s)return!1}for(const r of i)if(!e.includes(r))return!1;return!0}function q6(n){return null!==n&&"object"==typeof n}function Uf(n){return n&&n._delegate?n._delegate:n}class zg{constructor(t,e,i){this.name=t,this.instanceFactory=e,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}const bu="[DEFAULT]";class dye{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){const i=new j6;if(this.instancesDeferred.set(e,i),this.isInitialized(e)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:e});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;const i=this.normalizeInstanceIdentifier(t?.identifier),r=null!==(e=t?.optional)&&void 0!==e&&e;if(!this.isInitialized(i)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:i})}catch(o){if(r)return null;throw o}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,this.shouldAutoInitialize()){if(function hye(n){return"EAGER"===n.instantiationMode}(t))try{this.getOrInitializeService({instanceIdentifier:bu})}catch{}for(const[e,i]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const o=this.getOrInitializeService({instanceIdentifier:r});i.resolve(o)}catch{}}}}clearInstance(t=bu){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){var t=this;return xe(function*(){const e=Array.from(t.instances.values());yield Promise.all([...e.filter(i=>"INTERNAL"in i).map(i=>i.INTERNAL.delete()),...e.filter(i=>"_delete"in i).map(i=>i._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(t=bu){return this.instances.has(t)}getOptions(t=bu){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:e={}}=t,i=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:i,options:e});for(const[o,s]of this.instancesDeferred.entries())i===this.normalizeInstanceIdentifier(o)&&s.resolve(r);return r}onInit(t,e){var i;const r=this.normalizeInstanceIdentifier(e),o=null!==(i=this.onInitCallbacks.get(r))&&void 0!==i?i:new Set;o.add(t),this.onInitCallbacks.set(r,o);const s=this.instances.get(r);return s&&t(s,r),()=>{o.delete(t)}}invokeOnInitCallbacks(t,e){const i=this.onInitCallbacks.get(e);if(i)for(const r of i)try{r(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(n=t,n===bu?void 0:n),options:e}),this.instances.set(t,i),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch{}var n;return i||null}normalizeInstanceIdentifier(t=bu){return this.component?this.component.multipleInstances?t:bu:t}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class fye{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const e=new dye(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}}const uD=[];var En=(()=>{return(n=En||(En={}))[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT",En;var n})();const Q6={debug:En.DEBUG,verbose:En.VERBOSE,info:En.INFO,warn:En.WARN,error:En.ERROR,silent:En.SILENT},mye=En.INFO,pye={[En.DEBUG]:"log",[En.VERBOSE]:"log",[En.INFO]:"info",[En.WARN]:"warn",[En.ERROR]:"error"},gye=(n,t,...e)=>{if(tt.some(e=>n instanceof e);let X6,Y6;const Z6=new WeakMap,hD=new WeakMap,J6=new WeakMap,fD=new WeakMap,mD=new WeakMap;let pD={get(n,t,e){if(n instanceof IDBTransaction){if("done"===t)return hD.get(n);if("objectStoreNames"===t)return n.objectStoreNames||J6.get(n);if("store"===t)return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return Zl(n[t])},set:(n,t,e)=>(n[t]=e,!0),has:(n,t)=>n instanceof IDBTransaction&&("done"===t||"store"===t)||t in n};function kye(n){return"function"==typeof n?function Cye(n){return n!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function vye(){return Y6||(Y6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(n)?function(...t){return n.apply(gD(this),t),Zl(Z6.get(this))}:function(...t){return Zl(n.apply(gD(this),t))}:function(t,...e){const i=n.call(gD(this),t,...e);return J6.set(i,t.sort?t.sort():[t]),Zl(i)}}(n):(n instanceof IDBTransaction&&function xye(n){if(hD.has(n))return;const t=new Promise((e,i)=>{const r=()=>{n.removeEventListener("complete",o),n.removeEventListener("error",s),n.removeEventListener("abort",s)},o=()=>{e(),r()},s=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",o),n.addEventListener("error",s),n.addEventListener("abort",s)});hD.set(n,t)}(n),_ye(n,function bye(){return X6||(X6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(n,pD):n)}function Zl(n){if(n instanceof IDBRequest)return function yye(n){const t=new Promise((e,i)=>{const r=()=>{n.removeEventListener("success",o),n.removeEventListener("error",s)},o=()=>{e(Zl(n.result)),r()},s=()=>{i(n.error),r()};n.addEventListener("success",o),n.addEventListener("error",s)});return t.then(e=>{e instanceof IDBCursor&&Z6.set(e,n)}).catch(()=>{}),mD.set(t,n),t}(n);if(fD.has(n))return fD.get(n);const t=kye(n);return t!==n&&(fD.set(n,t),mD.set(t,n)),t}const gD=n=>mD.get(n),Tye=["get","getKey","getAll","getAllKeys","count"],Sye=["put","add","delete","clear"],_D=new Map;function e7(n,t){if(!(n instanceof IDBDatabase)||t in n||"string"!=typeof t)return;if(_D.get(t))return _D.get(t);const e=t.replace(/FromIndex$/,""),i=t!==e,r=Sye.includes(e);if(!(e in(i?IDBIndex:IDBObjectStore).prototype)||!r&&!Tye.includes(e))return;const o=function(){var s=xe(function*(a,...c){const l=this.transaction(a,r?"readwrite":"readonly");let d=l.store;return i&&(d=d.index(c.shift())),(yield Promise.all([d[e](...c),r&&l.done]))[0]});return function(c){return s.apply(this,arguments)}}();return _D.set(t,o),o}!function wye(n){pD=n(pD)}(n=>({...n,get:(t,e,i)=>e7(t,e)||n.get(t,e,i),has:(t,e)=>!!e7(t,e)||n.has(t,e)}));class Dye{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(function Aye(n){return"VERSION"===n.getComponent()?.type}(e)){const i=e.getImmediate();return`${i.library}/${i.version}`}return null}).filter(e=>e).join(" ")}}const bD="@firebase/app",vu=new K6("@firebase/app"),cx="[DEFAULT]",txe={[bD]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},yu=new Map,lx=new Map;function nxe(n,t){try{n.container.addComponent(t)}catch(e){vu.debug(`Component ${t.name} failed to register with FirebaseApp ${n.name}`,e)}}function dx(n){const t=n.name;if(lx.has(t))return vu.debug(`There were multiple attempts to register component ${t}.`),!1;lx.set(t,n);for(const e of yu.values())nxe(e,n);return!0}const qc=new G6("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class rxe{constructor(t,e,i){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new zg("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw qc.create("app-deleted",{appName:this._name})}}function i7(n,t={}){let e=n;"object"!=typeof t&&(t={name:t});const i=Object.assign({name:cx,automaticDataCollectionEnabled:!1},t),r=i.name;if("string"!=typeof r||!r)throw qc.create("bad-app-name",{appName:String(r)});if(e||(e=z6()),!e)throw qc.create("no-options");const o=yu.get(r);if(o){if(cD(e,o.options)&&cD(i,o.config))return o;throw qc.create("duplicate-app",{appName:r})}const s=new fye(r);for(const c of lx.values())s.addComponent(c);const a=new rxe(e,i,s);return yu.set(r,a),a}function Hf(n,t,e){var i;let r=null!==(i=txe[n])&&void 0!==i?i:n;e&&(r+=`-${e}`);const o=r.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const a=[`Unable to register library "${r}" with version "${t}":`];return o&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void vu.warn(a.join(" "))}dx(new zg(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}const axe="firebase-heartbeat-database",cxe=1,jg="firebase-heartbeat-store";let yD=null;function r7(){return yD||(yD=function Eye(n,t,{blocked:e,upgrade:i,blocking:r,terminated:o}={}){const s=indexedDB.open(n,t),a=Zl(s);return i&&s.addEventListener("upgradeneeded",c=>{i(Zl(s.result),c.oldVersion,c.newVersion,Zl(s.transaction),c)}),e&&s.addEventListener("blocked",c=>e(c.oldVersion,c.newVersion,c)),a.then(c=>{o&&c.addEventListener("close",()=>o()),r&&c.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}(axe,cxe,{upgrade:(n,t)=>{if(0===t)try{n.createObjectStore(jg)}catch(e){console.warn(e)}}}).catch(n=>{throw qc.create("idb-open",{originalErrorMessage:n.message})})),yD}function xD(){return(xD=xe(function*(n){try{const e=(yield r7()).transaction(jg),i=yield e.objectStore(jg).get(s7(n));return yield e.done,i}catch(t){if(t instanceof Vf)vu.warn(t.message);else{const e=qc.create("idb-get",{originalErrorMessage:t?.message});vu.warn(e.message)}}})).apply(this,arguments)}function o7(n,t){return wD.apply(this,arguments)}function wD(){return(wD=xe(function*(n,t){try{const i=(yield r7()).transaction(jg,"readwrite");yield i.objectStore(jg).put(t,s7(n)),yield i.done}catch(e){if(e instanceof Vf)vu.warn(e.message);else{const i=qc.create("idb-set",{originalErrorMessage:e?.message});vu.warn(i.message)}}})).apply(this,arguments)}function s7(n){return`${n.name}!${n.options.appId}`}class hxe{constructor(t){this.container=t,this._heartbeatsCache=null;const e=this.container.getProvider("app").getImmediate();this._storage=new mxe(e),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){var t=this;return xe(function*(){var e,i;const o=t.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=a7();if((null!=(null===(e=t._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||(t._heartbeatsCache=yield t._heartbeatsCachePromise,null!=(null===(i=t._heartbeatsCache)||void 0===i?void 0:i.heartbeats)))&&t._heartbeatsCache.lastSentHeartbeatDate!==s&&!t._heartbeatsCache.heartbeats.some(a=>a.date===s))return t._heartbeatsCache.heartbeats.push({date:s,agent:o}),t._heartbeatsCache.heartbeats=t._heartbeatsCache.heartbeats.filter(a=>{const c=new Date(a.date).valueOf();return Date.now()-c<=2592e6}),t._storage.overwrite(t._heartbeatsCache)})()}getHeartbeatsHeader(){var t=this;return xe(function*(){var e;if(null===t._heartbeatsCache&&(yield t._heartbeatsCachePromise),null==(null===(e=t._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===t._heartbeatsCache.heartbeats.length)return"";const i=a7(),{heartbeatsToSend:r,unsentEntries:o}=function fxe(n,t=1024){const e=[];let i=n.slice();for(const r of n){const o=e.find(s=>s.agent===r.agent);if(o){if(o.dates.push(r.date),c7(e)>t){o.dates.pop();break}}else if(e.push({agent:r.agent,dates:[r.date]}),c7(e)>t){e.pop();break}i=i.slice(1)}return{heartbeatsToSend:e,unsentEntries:i}}(t._heartbeatsCache.heartbeats),s=ox(JSON.stringify({version:2,heartbeats:r}));return t._heartbeatsCache.lastSentHeartbeatDate=i,o.length>0?(t._heartbeatsCache.heartbeats=o,yield t._storage.overwrite(t._heartbeatsCache)):(t._heartbeatsCache.heartbeats=[],t._storage.overwrite(t._heartbeatsCache)),s})()}}function a7(){return(new Date).toISOString().substring(0,10)}class mxe{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return xe(function*(){return!!$6()&&function Jve(){return new Promise((n,t)=>{try{let e=!0;const i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var o;t((null===(o=r.error)||void 0===o?void 0:o.message)||"")}}catch(e){t(e)}})}().then(()=>!0).catch(()=>!1)})()}read(){var t=this;return xe(function*(){if(yield t._canUseIndexedDBPromise){const i=yield function lxe(n){return xD.apply(this,arguments)}(t.app);return i?.heartbeats?i:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(t){var e=this;return xe(function*(){var i;if(yield e._canUseIndexedDBPromise){const o=yield e.read();return o7(e.app,{lastSentHeartbeatDate:null!==(i=t.lastSentHeartbeatDate)&&void 0!==i?i:o.lastSentHeartbeatDate,heartbeats:t.heartbeats})}})()}add(t){var e=this;return xe(function*(){var i;if(yield e._canUseIndexedDBPromise){const o=yield e.read();return o7(e.app,{lastSentHeartbeatDate:null!==(i=t.lastSentHeartbeatDate)&&void 0!==i?i:o.lastSentHeartbeatDate,heartbeats:[...o.heartbeats,...t.heartbeats]})}})()}}function c7(n){return ox(JSON.stringify({version:2,heartbeats:n})).length}!function pxe(n){dx(new zg("platform-logger",t=>new Dye(t),"PRIVATE")),dx(new zg("heartbeat",t=>new hxe(t),"PRIVATE")),Hf(bD,"0.9.29",n),Hf(bD,"0.9.29","esm2017"),Hf("fire-js","")}("");var Ze,gxe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},va={},CD=CD||{},Lt=gxe||self;function ux(n){var t=typeof n;return"array"==(t="object"!=t?t:n?Array.isArray(n)?"array":t:"null")||"object"==t&&"number"==typeof n.length}function $g(n){var t=typeof n;return"object"==t&&null!=n||"function"==t}var kD="closure_uid_"+(1e9*Math.random()>>>0),bxe=0;function vxe(n,t,e){return n.call.apply(n.bind,arguments)}function yxe(n,t,e){if(!n)throw Error();if(2{};Lt.addEventListener("test",e,t),Lt.removeEventListener("test",e,t)}catch{}return n}();function Gg(n){return/^[\s\xa0]*$/.test(n)}function fx(){var n=Lt.navigator;return n&&(n=n.userAgent)?n:""}function qa(n){return-1!=fx().indexOf(n)}function TD(n){return TD[" "](n),n}TD[" "]=function(){};var DD,n,kxe=qa("Opera"),zf=qa("Trident")||qa("MSIE"),u7=qa("Edge"),SD=u7||zf,h7=qa("Gecko")&&!(-1!=fx().toLowerCase().indexOf("webkit")&&!qa("Edge"))&&!(qa("Trident")||qa("MSIE"))&&!qa("Edge"),Exe=-1!=fx().toLowerCase().indexOf("webkit")&&!qa("Edge");function f7(){var n=Lt.document;return n?n.documentMode:void 0}e:{var AD="",ID=(n=fx(),h7?/rv:([^\);]+)(\)|;)/.exec(n):u7?/Edge\/([\d\.]+)/.exec(n):zf?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(n):Exe?/WebKit\/(\S+)/.exec(n):kxe?/(?:Version)[ \/]?(\S+)/.exec(n):void 0);if(ID&&(AD=ID?ID[1]:""),zf){var MD=f7();if(null!=MD&&MD>parseFloat(AD)){DD=String(MD);break e}}DD=AD}var Txe=Lt.document&&zf&&(f7()||parseInt(DD,10))||void 0;function Wg(n,t){if(uo.call(this,n?n.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,n){var e=this.type=n.type,i=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:null;if(this.target=n.target||n.srcElement,this.g=t,t=n.relatedTarget){if(h7){e:{try{TD(t.nodeName);var r=!0;break e}catch{}r=!1}r||(t=null)}}else"mouseover"==e?t=n.fromElement:"mouseout"==e&&(t=n.toElement);this.relatedTarget=t,i?(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0):(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0),this.button=n.button,this.key=n.key||"",this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.pointerId=n.pointerId||0,this.pointerType="string"==typeof n.pointerType?n.pointerType:Sxe[n.pointerType]||"",this.state=n.state,this.i=n,n.defaultPrevented&&Wg.$.h.call(this)}}Dr(Wg,uo);var Sxe={2:"touch",3:"pen",4:"mouse"};Wg.prototype.h=function(){Wg.$.h.call(this);var n=this.i;n.preventDefault?n.preventDefault():n.returnValue=!1};var qg="closure_listenable_"+(1e6*Math.random()|0),Dxe=0;function Axe(n,t,e,i,r){this.listener=n,this.proxy=null,this.src=t,this.type=e,this.capture=!!i,this.la=r,this.key=++Dxe,this.fa=this.ia=!1}function mx(n){n.fa=!0,n.listener=null,n.proxy=null,n.src=null,n.la=null}function FD(n,t,e){for(const i in n)t.call(e,n[i],i,n)}function p7(n){const t={};for(const e in n)t[e]=n[e];return t}const g7="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function _7(n,t){let e,i;for(let r=1;r>>0);function HD(n){return"function"==typeof n?n:(n[UD]||(n[UD]=function(t){return n.handleEvent(t)}),n[UD])}function Ar(){Jl.call(this),this.i=new px(this),this.S=this,this.J=null}function zr(n,t){var e,i=n.J;if(i)for(e=[];i;i=i.J)e.push(i);if(n=n.S,i=t.type||t,"string"==typeof t)t=new uo(t,n);else if(t instanceof uo)t.target=t.target||n;else{var r=t;_7(t=new uo(i,n),r)}if(r=!0,e)for(var o=e.length-1;0<=o;o--){var s=t.g=e[o];r=gx(s,i,!0,t)&&r}if(r=gx(s=t.g=n,i,!0,t)&&r,r=gx(s,i,!1,t)&&r,e)for(o=0;onew Nxe,n=>n.reset());class Nxe{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}function Lxe(n){var t=1;n=n.split(":");const e=[];for(;0{throw n},0)}let Qg,Kg=!1,jD=new class Oxe{constructor(){this.h=this.g=null}add(t,e){const i=C7.get();i.set(t,e),this.h?this.h.next=i:this.g=i,this.h=i}},k7=()=>{const n=Lt.Promise.resolve(void 0);Qg=()=>{n.then(Vxe)}};var Vxe=()=>{for(var n;n=Pxe();){try{n.h.call(n.g)}catch(e){Bxe(e)}var t=C7;t.j(n),100>t.h&&(t.h++,n.next=t.g,t.g=n)}Kg=!1};function _x(n,t){Ar.call(this),this.h=n||1,this.g=t||Lt,this.j=lo(this.qb,this),this.l=Date.now()}function $D(n){n.ga=!1,n.T&&(n.g.clearTimeout(n.T),n.T=null)}function GD(n,t,e){if("function"==typeof n)e&&(n=lo(n,e));else{if(!n||"function"!=typeof n.handleEvent)throw Error("Invalid listener argument");n=lo(n.handleEvent,n)}return 2147483647{n.g=null,n.i&&(n.i=!1,E7(n))},n.j);const t=n.h;n.h=null,n.m.apply(null,t)}Dr(_x,Ar),(Ze=_x.prototype).ga=!1,Ze.T=null,Ze.qb=function(){if(this.ga){var n=Date.now()-this.l;0i.length)){var r=i[1];if(Array.isArray(r)&&!(1>r.length)){var o=r[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var s=1;st.length?XD:(t=t.slice(i,i+e),n.o=i+e,t))}function t_(n){n.Y=Date.now()+n.P,H7(n,n.P)}function H7(n,t){if(null!=n.C)throw Error("WatchDog timer not null");n.C=Zg(lo(n.lb,n),t)}function wx(n){n.C&&(Lt.clearTimeout(n.C),n.C=null)}function n_(n){0==n.l.H||n.J||m9(n.l,n)}function wu(n){wx(n);var t=n.M;t&&"function"==typeof t.sa&&t.sa(),n.M=null,$D(n.V),D7(n.U),n.g&&(t=n.g,n.g=null,t.abort(),t.sa())}function ZD(n,t){try{var e=n.l;if(0!=e.H&&(e.g==n||JD(e.i,n)))if(!n.K&&JD(e.i,n)&&3==e.H){try{var i=e.Ja.g.parse(t)}catch{i=null}if(Array.isArray(i)&&3==i.length){var r=i;if(0==r[0]){e:if(!e.u){if(e.g){if(!(e.g.G+3e3r[2]&&e.G&&0==e.A&&!e.v&&(e.v=Zg(lo(e.ib,e),6e3));if(1>=Y7(e.i)&&e.oa){try{e.oa()}catch{}e.oa=void 0}}else ku(e,11)}else if((n.K||e.g==n)&&Mx(e),!Gg(t))for(r=e.Ja.g.parse(t),t=0;td)&&(3!=d||SD||this.g&&(this.h.h||this.g.ja()||s9(this.g)))){this.J||4!=d||7==t||Yg(),wx(this);var e=this.g.da();this.ca=e;t:if(V7(this)){var i=s9(this.g);n="";var r=i.length,o=4==Qa(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){wu(this),n_(this);var s="";break t}this.h.i=new Lt.TextDecoder}for(t=0;tt)throw Error("Bad port number "+t);n.m=t}else n.m=null}function $7(n,t,e){t instanceof o_?(n.i=t,function t1e(n,t){t&&!n.j&&(ed(n),n.i=null,n.g.forEach(function(e,i){var r=i.toLowerCase();i!=r&&(W7(this,i),Q7(this,r,e))},n)),n.j=t}(n.i,n.h)):(e||(t=r_(t,Jxe)),n.i=new o_(t,n.h))}function mi(n,t,e){n.i.set(t,e)}function Ex(n){return mi(n,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),n}function i_(n,t){return n?t?decodeURI(n.replace(/%25/g,"%2525")):decodeURIComponent(n):""}function r_(n,t,e){return"string"==typeof n?(n=encodeURI(n).replace(t,Xxe),e&&(n=n.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n):null}function Xxe(n){return"%"+((n=n.charCodeAt(0))>>4&15).toString(16)+(15&n).toString(16)}Cu.prototype.toString=function(){var n=[],t=this.j;t&&n.push(r_(t,G7,!0),":");var e=this.g;return(e||"file"==t)&&(n.push("//"),(t=this.s)&&n.push(r_(t,G7,!0),"@"),n.push(encodeURIComponent(String(e)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.m)&&n.push(":",String(e))),(e=this.l)&&(this.g&&"/"!=e.charAt(0)&&n.push("/"),n.push(r_(e,"/"==e.charAt(0)?Zxe:Yxe,!0))),(e=this.i.toString())&&n.push("?",e),(e=this.o)&&n.push("#",r_(e,e1e)),n.join("")};var G7=/[#\/\?@]/g,Yxe=/[#\?:]/g,Zxe=/[#\?]/g,Jxe=/[#\?@]/g,e1e=/#/g;function o_(n,t){this.h=this.g=null,this.i=n||null,this.j=!!t}function ed(n){n.g||(n.g=new Map,n.h=0,n.i&&function Kxe(n,t){if(n){n=n.split("&");for(var e=0;e=n.j}function Y7(n){return n.h?1:n.g?n.g.size:0}function JD(n,t){return n.h?n.h==t:!!n.g&&n.g.has(t)}function e2(n,t){n.g?n.g.add(t):n.h=t}function Z7(n,t){n.h&&n.h==t?n.h=null:n.g&&n.g.has(t)&&n.g.delete(t)}function J7(n){if(null!=n.h)return n.i.concat(n.h.F);if(null!=n.g&&0!==n.g.size){let t=n.i;for(const e of n.g.values())t=t.concat(e.F);return t}return ED(n.i)}K7.prototype.cancel=function(){if(this.i=J7(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const n of this.g.values())n.cancel();this.g.clear()}};var r1e=class{stringify(n){return Lt.JSON.stringify(n,void 0)}parse(n){return Lt.JSON.parse(n,void 0)}};function o1e(){this.g=new r1e}function s1e(n,t,e){const i=e||"";try{z7(n,function(r,o){let s=r;$g(r)&&(s=zD(r)),t.push(i+o+"="+encodeURIComponent(s))})}catch(r){throw t.push(i+"type="+encodeURIComponent("_badmap")),r}}function Tx(n,t,e,i,r){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,r(i)}catch{}}function s_(n){this.l=n.ec||null,this.j=n.ob||!1}function Sx(n,t){Ar.call(this),this.F=n,this.u=t,this.m=void 0,this.readyState=t2,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Dr(s_,WD),s_.prototype.g=function(){return new Sx(this.l,this.j)},s_.prototype.i=function(n){return function(){return n}}({}),Dr(Sx,Ar);var t2=0;function e9(n){n.j.read().then(n.Xa.bind(n)).catch(n.ka.bind(n))}function a_(n){n.readyState=4,n.l=null,n.j=null,n.A=null,c_(n)}function c_(n){n.onreadystatechange&&n.onreadystatechange.call(n)}(Ze=Sx.prototype).open=function(n,t){if(this.readyState!=t2)throw this.abort(),Error("Error reopening a connection");this.C=n,this.B=t,this.readyState=1,c_(this)},Ze.send=function(n){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};n&&(t.body=n),(this.F||Lt).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},Ze.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,a_(this)),this.readyState=t2},Ze.$a=function(n){if(this.g&&(this.l=n,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=n.headers,this.readyState=2,c_(this)),this.g&&(this.readyState=3,c_(this),this.g)))if("arraybuffer"===this.responseType)n.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof Lt.ReadableStream<"u"&&"body"in n){if(this.j=n.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;e9(this)}else n.text().then(this.Za.bind(this),this.ka.bind(this))},Ze.Xa=function(n){if(this.g){if(this.u&&n.value)this.response.push(n.value);else if(!this.u){var t=n.value?n.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!n.done}))&&(this.response=this.responseText+=t)}n.done?a_(this):c_(this),3==this.readyState&&e9(this)}},Ze.Za=function(n){this.g&&(this.response=this.responseText=n,a_(this))},Ze.Ya=function(n){this.g&&(this.response=n,a_(this))},Ze.ka=function(){this.g&&a_(this)},Ze.setRequestHeader=function(n,t){this.v.append(n,t)},Ze.getResponseHeader=function(n){return this.h&&this.h.get(n.toLowerCase())||""},Ze.getAllResponseHeaders=function(){if(!this.h)return"";const n=[],t=this.h.entries();for(var e=t.next();!e.done;)n.push((e=e.value)[0]+": "+e[1]),e=t.next();return n.join("\r\n")},Object.defineProperty(Sx.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(n){this.m=n?"include":"same-origin"}});var c1e=Lt.JSON.parse;function Ri(n){Ar.call(this),this.headers=new Map,this.u=n||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=t9,this.L=this.M=!1}Dr(Ri,Ar);var t9="",l1e=/^https?$/i,d1e=["POST","PUT"];function n9(n,t){n.h=!1,n.g&&(n.l=!0,n.g.abort(),n.l=!1),n.j=t,n.m=5,i9(n),Dx(n)}function i9(n){n.F||(n.F=!0,zr(n,"complete"),zr(n,"error"))}function r9(n){if(n.h&&typeof CD<"u"&&(!n.C[1]||4!=Qa(n)||2!=n.da()))if(n.v&&4==Qa(n))GD(n.La,0,n);else if(zr(n,"readystatechange"),4==Qa(n)){n.h=!1;try{const s=n.da();e:switch(s){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var e;if(!(e=t)){var i;if(i=0===s){var r=String(n.I).match(j7)[1]||null;!r&&Lt.self&&Lt.self.location&&(r=Lt.self.location.protocol.slice(0,-1)),i=!l1e.test(r?r.toLowerCase():"")}e=i}if(e)zr(n,"complete"),zr(n,"success");else{n.m=6;try{var o=2{}:null;n.g=null,n.C=null,t||zr(n,"ready");try{e.onreadystatechange=i}catch{}}}function o9(n){n.g&&n.L&&(n.g.ontimeout=null),n.A&&(Lt.clearTimeout(n.A),n.A=null)}function Qa(n){return n.g?n.g.readyState:0}function s9(n){try{if(!n.g)return null;if("response"in n.g)return n.g.response;switch(n.K){case t9:case"text":return n.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in n.g)return n.g.mozResponseArrayBuffer}return null}catch{return null}}function a9(n){let t="";return FD(n,function(e,i){t+=i,t+=":",t+=e,t+="\r\n"}),t}function n2(n,t,e){e:{for(i in e){var i=!1;break e}i=!0}i||(e=a9(e),"string"==typeof n?null!=e&&encodeURIComponent(String(e)):mi(n,t,e))}function l_(n,t,e){return e&&e.internalChannelParams&&e.internalChannelParams[n]||t}function c9(n){this.Ga=0,this.j=[],this.l=new bx,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=l_("failFast",!1,n),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=l_("baseRetryDelayMs",5e3,n),this.hb=l_("retryDelaySeedMs",1e4,n),this.eb=l_("forwardChannelMaxRetries",2,n),this.xa=l_("forwardChannelRequestTimeoutMs",2e4,n),this.va=n&&n.xmlHttpFactory||void 0,this.Ha=n&&n.useFetchStreams||!1,this.L=void 0,this.J=n&&n.supportsCrossDomainXhr||!1,this.K="",this.i=new K7(n&&n.concurrentRequestLimit),this.Ja=new o1e,this.P=n&&n.fastHandshake||!1,this.O=n&&n.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=n&&n.bc||!1,n&&n.Ea&&this.l.Ea(),n&&n.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&n&&n.detectBufferingProxy||!1,this.qa=void 0,n&&n.longPollingTimeout&&0l)o=Math.max(0,r[c].g-100),a=!1;else try{s1e(d,s,"req"+l+"_")}catch{i&&i(d)}}if(a){i=s.join("&");break e}}}return n=n.j.splice(0,e),t.F=n,i}function h9(n){if(!n.g&&!n.u){n.ba=1;var t=n.Ma;Qg||k7(),Kg||(Qg(),Kg=!0),jD.add(t,n),n.A=0}}function o2(n){return!(n.g||n.u||3<=n.A||(n.ba++,n.u=Zg(lo(n.Ma,n),p9(n,n.A)),n.A++,0))}function s2(n){null!=n.B&&(Lt.clearTimeout(n.B),n.B=null)}function f9(n){n.g=new e_(n,n.l,"rpc",n.ba),null===n.o&&(n.g.I=n.s),n.g.O=0;var t=Qc(n.wa);mi(t,"RID","rpc"),mi(t,"SID",n.K),mi(t,"AID",n.V),mi(t,"CI",n.G?"0":"1"),!n.G&&n.qa&&mi(t,"TO",n.qa),mi(t,"TYPE","xmlhttp"),d_(n,t),n.o&&n.s&&n2(t,n.o,n.s),n.L&&n.g.setTimeout(n.L);var e=n.g;n=n.pa,e.L=1,e.A=Ex(Qc(t)),e.u=null,e.S=!0,B7(e,n)}function Mx(n){null!=n.v&&(Lt.clearTimeout(n.v),n.v=null)}function m9(n,t){var e=null;if(n.g==t){Mx(n),s2(n),n.g=null;var i=2}else{if(!JD(n.i,t))return;e=t.F,Z7(n.i,t),i=1}if(0!=n.H)if(t.i)if(1==i){e=t.u?t.u.length:0,t=Date.now()-t.G;var r=n.C;zr(i=vx(),new R7(i,e)),Ix(n)}else h9(n);else if(3==(r=t.s)||0==r&&0=n.i.j-(n.m?1:0)||(n.m?(n.j=t.F.concat(n.j),0):1==n.H||2==n.H||n.C>=(n.cb?0:n.eb)||(n.m=Zg(lo(n.Na,n,t),p9(n,n.C)),n.C++,0)))}(n,t)||2==i&&o2(n)))switch(e&&0r;++r)i[r]=t.charCodeAt(e++)|t.charCodeAt(e++)<<8|t.charCodeAt(e++)<<16|t.charCodeAt(e++)<<24;else for(r=0;16>r;++r)i[r]=t[e++]|t[e++]<<8|t[e++]<<16|t[e++]<<24;var o=n.g[3],s=(t=n.g[0])+(o^(e=n.g[1])&((r=n.g[2])^o))+i[0]+3614090360&4294967295;s=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=(e=(r=(o=(t=e+(s<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[1]+3905402710&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[2]+606105819&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[3]+3250441966&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^e&(r^o))+i[4]+4118548399&4294967295)<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[5]+1200080426&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[6]+2821735955&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[7]+4249261313&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^e&(r^o))+i[8]+1770035416&4294967295)<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[9]+2336552879&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[10]+4294925233&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[11]+2304563134&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^e&(r^o))+i[12]+1804603682&4294967295)<<7&4294967295|s>>>25))+((s=o+(r^t&(e^r))+i[13]+4254626195&4294967295)<<12&4294967295|s>>>20))+((s=r+(e^o&(t^e))+i[14]+2792965006&4294967295)<<17&4294967295|s>>>15))+((s=e+(t^r&(o^t))+i[15]+1236535329&4294967295)<<22&4294967295|s>>>10))+((s=t+(r^o&(e^r))+i[1]+4129170786&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[6]+3225465664&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[11]+643717713&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[0]+3921069994&4294967295)<<20&4294967295|s>>>12))+((s=t+(r^o&(e^r))+i[5]+3593408605&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[10]+38016083&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[15]+3634488961&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[4]+3889429448&4294967295)<<20&4294967295|s>>>12))+((s=t+(r^o&(e^r))+i[9]+568446438&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[14]+3275163606&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[3]+4107603335&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[8]+1163531501&4294967295)<<20&4294967295|s>>>12))+((s=t+(r^o&(e^r))+i[13]+2850285829&4294967295)<<5&4294967295|s>>>27))+((s=o+(e^r&(t^e))+i[2]+4243563512&4294967295)<<9&4294967295|s>>>23))+((s=r+(t^e&(o^t))+i[7]+1735328473&4294967295)<<14&4294967295|s>>>18))+((s=e+(o^t&(r^o))+i[12]+2368359562&4294967295)<<20&4294967295|s>>>12))+((s=t+(e^r^o)+i[5]+4294588738&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[8]+2272392833&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[11]+1839030562&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[14]+4259657740&4294967295)<<23&4294967295|s>>>9))+((s=t+(e^r^o)+i[1]+2763975236&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[4]+1272893353&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[7]+4139469664&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[10]+3200236656&4294967295)<<23&4294967295|s>>>9))+((s=t+(e^r^o)+i[13]+681279174&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[0]+3936430074&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[3]+3572445317&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[6]+76029189&4294967295)<<23&4294967295|s>>>9))+((s=t+(e^r^o)+i[9]+3654602809&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^e^r)+i[12]+3873151461&4294967295)<<11&4294967295|s>>>21))+((s=r+(o^t^e)+i[15]+530742520&4294967295)<<16&4294967295|s>>>16))+((s=e+(r^o^t)+i[2]+3299628645&4294967295)<<23&4294967295|s>>>9))+((s=t+(r^(e|~o))+i[0]+4096336452&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[7]+1126891415&4294967295)<<10&4294967295|s>>>22))+((s=r+(t^(o|~e))+i[14]+2878612391&4294967295)<<15&4294967295|s>>>17))+((s=e+(o^(r|~t))+i[5]+4237533241&4294967295)<<21&4294967295|s>>>11))+((s=t+(r^(e|~o))+i[12]+1700485571&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[3]+2399980690&4294967295)<<10&4294967295|s>>>22))+((s=r+(t^(o|~e))+i[10]+4293915773&4294967295)<<15&4294967295|s>>>17))+((s=e+(o^(r|~t))+i[1]+2240044497&4294967295)<<21&4294967295|s>>>11))+((s=t+(r^(e|~o))+i[8]+1873313359&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[15]+4264355552&4294967295)<<10&4294967295|s>>>22))+((s=r+(t^(o|~e))+i[6]+2734768916&4294967295)<<15&4294967295|s>>>17))+((s=e+(o^(r|~t))+i[13]+1309151649&4294967295)<<21&4294967295|s>>>11))+((o=(t=e+((s=t+(r^(e|~o))+i[4]+4149444226&4294967295)<<6&4294967295|s>>>26))+((s=o+(e^(t|~r))+i[11]+3174756917&4294967295)<<10&4294967295|s>>>22))^((r=o+((s=r+(t^(o|~e))+i[2]+718787259&4294967295)<<15&4294967295|s>>>17))|~t))+i[9]+3951481745&4294967295,n.g[0]=n.g[0]+t&4294967295,n.g[1]=n.g[1]+(r+(s<<21&4294967295|s>>>11))&4294967295,n.g[2]=n.g[2]+r&4294967295,n.g[3]=n.g[3]+o&4294967295}function Gn(n,t){this.h=t;for(var e=[],i=!0,r=n.length-1;0<=r;r--){var o=0|n[r];i&&o==t||(e[r]=o,i=!1)}this.g=e}(Ze=Ri.prototype).Oa=function(n){this.M=n},Ze.ha=function(n,t,e,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+n);t=t?t.toUpperCase():"GET",this.I=n,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():KD.g(),this.C=function P7(n){return n.h||(n.h=n.i())}(this.u?this.u:KD),this.g.onreadystatechange=lo(this.La,this);try{this.G=!0,this.g.open(t,String(n),!0),this.G=!1}catch(o){return void n9(this,o)}if(n=e||"",e=new Map(this.headers),i)if(Object.getPrototypeOf(i)===Object.prototype)for(var r in i)e.set(r,i[r]);else{if("function"!=typeof i.keys||"function"!=typeof i.get)throw Error("Unknown input type for opt_headers: "+String(i));for(const o of i.keys())e.set(o,i.get(o))}i=Array.from(e.keys()).find(o=>"content-type"==o.toLowerCase()),r=Lt.FormData&&n instanceof Lt.FormData,!(0<=l7(d1e,t))||i||r||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[o,s]of e)this.g.setRequestHeader(o,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{o9(this),0=this.S)){var n=2*this.S;this.l.info("BP detection timer enabled: "+n),this.B=Zg(lo(this.jb,this),n)}},Ze.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Oo(10),Ax(this),f9(this))},Ze.ib=function(){null!=this.v&&(this.v=null,Ax(this),o2(this),Oo(19))},Ze.pb=function(n){n?(this.l.info("Successfully pinged google.com"),Oo(2)):(this.l.info("Failed to ping google.com"),Oo(1))},Ze.isActive=function(){return!!this.h&&this.h.isActive(this)},(Ze=v9.prototype).Ba=function(){},Ze.Aa=function(){},Ze.za=function(){},Ze.ya=function(){},Ze.isActive=function(){return!0},Ze.Va=function(){},Rx.prototype.g=function(n,t){return new _s(n,t)},Dr(_s,Ar),_s.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var n=this.g,t=this.l,e=this.h||void 0;Oo(0),n.Y=t,n.na=e||{},n.G=n.aa,n.I=_9(n,null,n.Y),Ix(n)},_s.prototype.close=function(){r2(this.g)},_s.prototype.u=function(n){var t=this.g;if("string"==typeof n){var e={};e.__data__=n,n=e}else this.v&&((e={}).__data__=zD(n),n=e);t.j.push(new class{constructor(n,t){this.g=n,this.map=t}}(t.fb++,n)),3==t.H&&Ix(t)},_s.prototype.N=function(){this.g.h=null,delete this.j,r2(this.g),delete this.g,_s.$.N.call(this)},Dr(y9,qD),Dr(x9,QD),Dr(Gf,v9),Gf.prototype.Ba=function(){zr(this.g,"a")},Gf.prototype.Aa=function(n){zr(this.g,new y9(n))},Gf.prototype.za=function(n){zr(this.g,new x9)},Gf.prototype.ya=function(){zr(this.g,"b")},Dr(ya,function m1e(){this.blockSize=-1}),ya.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},ya.prototype.j=function(n,t){void 0===t&&(t=n.length);for(var e=t-this.blockSize,i=this.m,r=this.h,o=0;othis.h?this.blockSize:2*this.blockSize)-this.h);n[0]=128;for(var t=1;tt;++t)for(var i=0;32>i;i+=8)n[e++]=this.g[t]>>>i&255;return n};var p1e={};function c2(n){return-128<=n&&128>n?function Cxe(n,t){var e=p1e;return Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=t(n)}(n,function(t){return new Gn([0|t],0>t?-1:0)}):new Gn([0|n],0>n?-1:0)}function Ka(n){if(isNaN(n)||!isFinite(n))return Wf;if(0>n)return jr(Ka(-n));for(var t=[],e=1,i=0;n>=e;i++)t[i]=n/e|0,e*=l2;return new Gn(t,0)}var l2=4294967296,Wf=c2(0),d2=c2(1),C9=c2(16777216);function Kc(n){if(0!=n.h)return!1;for(var t=0;t>>16,n[t]&=65535,t++}function u_(n,t){this.g=n,this.h=t}function Ox(n,t){if(Kc(t))throw Error("division by zero");if(Kc(n))return new u_(Wf,Wf);if(Hs(n))return t=Ox(jr(n),t),new u_(jr(t.g),jr(t.h));if(Hs(t))return t=Ox(n,jr(t)),new u_(jr(t.g),t.h);if(30=i.X(n);)e=k9(e),i=k9(i);var r=qf(e,1),o=qf(i,1);for(i=qf(i,2),e=qf(e,2);!Kc(i);){var s=o.add(i);0>=s.X(n)&&(r=r.add(e),o=s),i=qf(i,1),e=qf(e,1)}return t=Fx(n,r.R(t)),new u_(r,t)}for(r=Wf;0<=n.X(t);){for(e=Math.max(1,Math.floor(n.ea()/t.ea())),i=48>=(i=Math.ceil(Math.log(e)/Math.LN2))?1:Math.pow(2,i-48),s=(o=Ka(e)).R(t);Hs(s)||0>>31;return new Gn(e,n.h)}function qf(n,t){var e=t>>5;t%=32;for(var i=n.g.length-e,r=[],o=0;o>>t|n.D(o+e+1)<<32-t:n.D(o+e);return new Gn(r,n.h)}(Ze=Gn.prototype).ea=function(){if(Hs(this))return-jr(this).ea();for(var n=0,t=1,e=0;e(n=n||10)||36>>0).toString(n);if(Kc(e=r))return o+i;for(;6>o.length;)o="0"+o;i=o+i}},Ze.D=function(n){return 0>n?0:n>>16)+(this.D(r)>>>16)+(n.D(r)>>>16);i=s>>>16,e[r]=(s&=65535)<<16|(o&=65535)}return new Gn(e,-2147483648&e[e.length-1]?-1:0)},Ze.R=function(n){if(Kc(this)||Kc(n))return Wf;if(Hs(this))return Hs(n)?jr(this).R(jr(n)):jr(jr(this).R(n));if(Hs(n))return jr(this.R(jr(n)));if(0>this.X(C9)&&0>n.X(C9))return Ka(this.ea()*n.ea());for(var t=this.g.length+n.g.length,e=[],i=0;i<2*t;i++)e[i]=0;for(i=0;i>>16,s=65535&this.D(i),a=n.D(r)>>>16,c=65535&n.D(r);e[2*i+2*r]+=s*c,Px(e,2*i+2*r),e[2*i+2*r+1]+=o*c,Px(e,2*i+2*r+1),e[2*i+2*r+1]+=s*a,Px(e,2*i+2*r+1),e[2*i+2*r+2]+=o*a,Px(e,2*i+2*r+2)}for(i=0;i(t=t||10)||36o?(o=Ka(Math.pow(t,o)),i=i.R(o).add(Ka(s))):i=(i=i.R(e)).add(Ka(s))}return i};var g1e=va.createWebChannelTransport=function(){return new Rx},_1e=va.getStatEventTarget=function(){return vx()},u2=va.ErrorCode=yx,b1e=va.EventType=F7,v1e=va.Event=xu,E9=va.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},Nx=(va.FetchXmlHttpFactory=s_,va.WebChannel=O7),y1e=va.XhrIo=Ri,x1e=va.Md5=ya,Qf=va.Integer=Gn;const T9="@firebase/firestore";class Ir{constructor(t){this.uid=t}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}Ir.UNAUTHENTICATED=new Ir(null),Ir.GOOGLE_CREDENTIALS=new Ir("google-credentials-uid"),Ir.FIRST_PARTY=new Ir("first-party-uid"),Ir.MOCK_USER=new Ir("mock-user");let Kf="10.9.0";const td=new K6("@firebase/firestore");function Xf(){return td.logLevel}function Ee(n,...t){if(td.logLevel<=En.DEBUG){const e=t.map(h2);td.debug(`Firestore (${Kf}): ${n}`,...e)}}function zi(n,...t){if(td.logLevel<=En.ERROR){const e=t.map(h2);td.error(`Firestore (${Kf}): ${n}`,...e)}}function bs(n,...t){if(td.logLevel<=En.WARN){const e=t.map(h2);td.warn(`Firestore (${Kf}): ${n}`,...e)}}function h2(n){if("string"==typeof n)return n;try{return JSON.stringify(n)}catch{return n}}function at(n="Unexpected state"){const t=`FIRESTORE (${Kf}) INTERNAL ASSERTION FAILED: `+n;throw zi(t),new Error(t)}function ft(n,t){n||at()}function je(n,t){return n}const oe={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Te extends Vf{constructor(t,e){super(t,e),this.code=t,this.message=e,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class _r{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}class S9{constructor(t,e){this.user=e,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}}class w1e{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,e){t.enqueueRetryable(()=>e(Ir.UNAUTHENTICATED))}shutdown(){}}class C1e{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,e){this.changeListener=e,t.enqueueRetryable(()=>e(this.token.user))}shutdown(){this.changeListener=null}}class k1e{constructor(t){this.t=t,this.currentUser=Ir.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,e){var i=this;let r=this.i;const o=l=>this.i!==r?(r=this.i,e(l)):Promise.resolve();let s=new _r;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new _r,t.enqueueRetryable(()=>o(this.currentUser))};const a=()=>{const l=s;t.enqueueRetryable(xe(function*(){yield l.promise,yield o(i.currentUser)}))},c=l=>{Ee("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),a()};this.t.onInit(l=>c(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?c(l):(Ee("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new _r)}},0),a()}getToken(){const t=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then(i=>this.i!==t?(Ee("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):i?(ft("string"==typeof i.accessToken),new S9(i.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const t=this.auth&&this.auth.getUid();return ft(null===t||"string"==typeof t),new Ir(t)}}class E1e{constructor(t,e,i){this.l=t,this.h=e,this.P=i,this.type="FirstParty",this.user=Ir.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const t=this.T();return t&&this.I.set("Authorization",t),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class T1e{constructor(t,e,i){this.l=t,this.h=e,this.P=i}getToken(){return Promise.resolve(new E1e(this.l,this.h,this.P))}start(t,e){t.enqueueRetryable(()=>e(Ir.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class D9{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class S1e{constructor(t){this.A=t,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(t,e){const i=o=>{null!=o.error&&Ee("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);const s=o.token!==this.R;return this.R=o.token,Ee("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?e(o.token):Promise.resolve()};this.o=o=>{t.enqueueRetryable(()=>i(o))};const r=o=>{Ee("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.appCheck.addTokenListener(this.o)};this.A.onInit(o=>r(o)),setTimeout(()=>{if(!this.appCheck){const o=this.A.getImmediate({optional:!0});o?r(o):Ee("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then(e=>e?(ft("string"==typeof e.token),this.R=e.token,new D9(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function D1e(n){const t=typeof self<"u"&&(self.crypto||self.msCrypto),e=new Uint8Array(n);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(e);else for(let i=0;it?1:0}function Yf(n,t,e){return n.length===t.length&&n.every((i,r)=>e(i,t[r]))}class _i{constructor(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new Te(oe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new Te(oe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new Te(oe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Te(oe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return _i.fromMillis(Date.now())}static fromDate(t){return _i.fromMillis(t.getTime())}static fromMillis(t){const e=Math.floor(t/1e3),i=Math.floor(1e6*(t-1e3*e));return new _i(e,i)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?Ot(this.nanoseconds,t.nanoseconds):Ot(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class _t{constructor(t){this.timestamp=t}static fromTimestamp(t){return new _t(t)}static min(){return new _t(new _i(0,0))}static max(){return new _t(new _i(253402300799,999999999))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class h_{constructor(t,e,i){void 0===e?e=0:e>t.length&&at(),void 0===i?i=t.length-e:i>t.length-e&&at(),this.segments=t,this.offset=e,this.len=i}get length(){return this.len}isEqual(t){return 0===h_.comparator(this,t)}child(t){const e=this.segments.slice(this.offset,this.limit());return t instanceof h_?t.forEach(i=>{e.push(i)}):e.push(t),this.construct(e)}limit(){return this.offset+this.length}popFirst(t){return this.construct(this.segments,this.offset+(t=void 0===t?1:t),this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return 0===this.length}isPrefixOf(t){if(t.lengths)return 1}return t.lengthe.length?1:0}}class gn extends h_{construct(t,e,i){return new gn(t,e,i)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){const e=[];for(const i of t){if(i.indexOf("//")>=0)throw new Te(oe.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);e.push(...i.split("/").filter(r=>r.length>0))}return new gn(e)}static emptyPath(){return new gn([])}}const A1e=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class bi extends h_{construct(t,e,i){return new bi(t,e,i)}static isValidIdentifier(t){return A1e.test(t)}canonicalString(){return this.toArray().map(t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),bi.isValidIdentifier(t)||(t="`"+t+"`"),t)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new bi(["__name__"])}static fromServerFormat(t){const e=[];let i="",r=0;const o=()=>{if(0===i.length)throw new Te(oe.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(i),i=""};let s=!1;for(;r=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return null!==t&&0===gn.comparator(this.path,t.path)}toString(){return this.path.toString()}static comparator(t,e){return gn.comparator(t.path,e.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new Ge(new gn(t.slice()))}}function R9(n){return new vs(n.readTime,n.key,-1)}class vs{constructor(t,e,i){this.readTime=t,this.documentKey=e,this.largestBatchId=i}static min(){return new vs(_t.min(),Ge.empty(),-1)}static max(){return new vs(_t.max(),Ge.empty(),-1)}}function m2(n,t){let e=n.readTime.compareTo(t.readTime);return 0!==e?e:(e=Ge.comparator(n.documentKey,t.documentKey),0!==e?e:Ot(n.largestBatchId,t.largestBatchId))}const F9="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class R1e{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(t=>t())}}function nd(n){return p2.apply(this,arguments)}function p2(){return p2=xe(function*(n){if(n.code!==oe.FAILED_PRECONDITION||n.message!==F9)throw n;Ee("LocalStore","Unexpectedly lost primary lease")}),p2.apply(this,arguments)}class K{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(t){return this.next(void 0,t)}next(t,e){return this.callbackAttached&&at(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(t,this.result):new K((i,r)=>{this.nextCallback=o=>{this.wrapSuccess(t,o).next(i,r)},this.catchCallback=o=>{this.wrapFailure(e,o).next(i,r)}})}toPromise(){return new Promise((t,e)=>{this.next(t,e)})}wrapUserFunction(t){try{const e=t();return e instanceof K?e:K.resolve(e)}catch(e){return K.reject(e)}}wrapSuccess(t,e){return t?this.wrapUserFunction(()=>t(e)):K.resolve(e)}wrapFailure(t,e){return t?this.wrapUserFunction(()=>t(e)):K.reject(e)}static resolve(t){return new K((e,i)=>{e(t)})}static reject(t){return new K((e,i)=>{i(t)})}static waitFor(t){return new K((e,i)=>{let r=0,o=0,s=!1;t.forEach(a=>{++r,a.next(()=>{++o,s&&o===r&&e()},c=>i(c))}),s=!0,o===r&&e()})}static or(t){let e=K.resolve(!1);for(const i of t)e=e.next(r=>r?K.resolve(r):i());return e}static forEach(t,e){const i=[];return t.forEach((r,o)=>{i.push(e.call(this,r,o))}),this.waitFor(i)}static mapArray(t,e){return new K((i,r)=>{const o=t.length,s=new Array(o);let a=0;for(let c=0;c{s[l]=d,++a,a===o&&i(s)},d=>r(d))}})}static doWhile(t,e){return new K((i,r)=>{const o=()=>{!0===t()?e().next(()=>{o()},r):i()};o()})}}class Lx{constructor(t,e){this.action=t,this.transaction=e,this.aborted=!1,this.V=new _r,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{e.error?this.V.reject(new f_(t,e.error)):this.V.resolve()},this.transaction.onerror=i=>{const r=g2(i.target.error);this.V.reject(new f_(t,r))}}static open(t,e,i,r){try{return new Lx(e,t.transaction(r,i))}catch(o){throw new f_(e,o)}}get m(){return this.V.promise}abort(t){t&&this.V.reject(t),this.aborted||(Ee("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){const t=this.transaction;this.aborted||"function"!=typeof t.commit||t.commit()}store(t){const e=this.transaction.objectStore(t);return new P1e(e)}}class zs{constructor(t,e,i){this.name=t,this.version=e,this.p=i,12.2===zs.S(Yl())&&zi("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return Ee("SimpleDb","Removing database:",t),Su(window.indexedDB.deleteDatabase(t)).toPromise()}static D(){if(!$6())return!1;if(zs.C())return!0;const t=Yl(),e=zs.S(t),i=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||i||o)}static C(){var t;return typeof process<"u"&&"YES"===(null===(t=process.__PRIVATE_env)||void 0===t?void 0:t.F)}static M(t,e){return t.store(e)}static S(t){const e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),i=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(i)}static v(t){const e=t.match(/Android ([\d.]+)/i),i=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(i)}O(t){var e=this;return xe(function*(){return e.db||(Ee("SimpleDb","Opening database:",e.name),e.db=yield new Promise((i,r)=>{const o=indexedDB.open(e.name,e.version);o.onsuccess=s=>{i(s.target.result)},o.onblocked=()=>{r(new f_(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},o.onerror=s=>{const a=s.target.error;r("VersionError"===a.name?new Te(oe.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh."):"InvalidStateError"===a.name?new Te(oe.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+a):new f_(t,a))},o.onupgradeneeded=s=>{Ee("SimpleDb",'Database "'+e.name+'" requires upgrade from version:',s.oldVersion),e.p.N(s.target.result,o.transaction,s.oldVersion,e.version).next(()=>{Ee("SimpleDb","Database upgrade to version "+e.version+" complete")})}})),e.L&&(e.db.onversionchange=i=>e.L(i)),e.db})()}B(t){this.L=t,this.db&&(this.db.onversionchange=e=>t(e))}runTransaction(t,e,i,r){var o=this;return xe(function*(){const s="readonly"===e;let a=0;for(;;){++a;try{o.db=yield o.O(t);const c=Lx.open(o.db,t,s?"readonly":"readwrite",i),l=r(c).next(d=>(c.g(),d)).catch(d=>(c.abort(d),K.reject(d))).toPromise();return l.catch(()=>{}),yield c.m,l}catch(c){const l=c,d="FirebaseError"!==l.name&&a<3;if(Ee("SimpleDb","Transaction failed with error:",l.message,"Retrying:",d),o.close(),!d)return Promise.reject(l)}}})()}close(){this.db&&this.db.close(),this.db=void 0}}class F1e{constructor(t){this.k=t,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(t){this.k=t}done(){this.q=!0}U(t){this.K=t}delete(){return Su(this.k.delete())}}class f_ extends Te{constructor(t,e){super(oe.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${e}`),this.name="IndexedDbTransactionError"}}function id(n){return"IndexedDbTransactionError"===n.name}class P1e{constructor(t){this.store=t}put(t,e){let i;return void 0!==e?(Ee("SimpleDb","PUT",this.store.name,t,e),i=this.store.put(e,t)):(Ee("SimpleDb","PUT",this.store.name,"",t),i=this.store.put(t)),Su(i)}add(t){return Ee("SimpleDb","ADD",this.store.name,t,t),Su(this.store.add(t))}get(t){return Su(this.store.get(t)).next(e=>(void 0===e&&(e=null),Ee("SimpleDb","GET",this.store.name,t,e),e))}delete(t){return Ee("SimpleDb","DELETE",this.store.name,t),Su(this.store.delete(t))}count(){return Ee("SimpleDb","COUNT",this.store.name),Su(this.store.count())}W(t,e){const i=this.options(t,e),r=i.index?this.store.index(i.index):this.store;if("function"==typeof r.getAll){const o=r.getAll(i.range);return new K((s,a)=>{o.onerror=c=>{a(c.target.error)},o.onsuccess=c=>{s(c.target.result)}})}{const o=this.cursor(i),s=[];return this.G(o,(a,c)=>{s.push(c)}).next(()=>s)}}j(t,e){const i=this.store.getAll(t,null===e?void 0:e);return new K((r,o)=>{i.onerror=s=>{o(s.target.error)},i.onsuccess=s=>{r(s.target.result)}})}H(t,e){Ee("SimpleDb","DELETE ALL",this.store.name);const i=this.options(t,e);i.J=!1;const r=this.cursor(i);return this.G(r,(o,s,a)=>a.delete())}Y(t,e){let i;e?i=t:(i={},e=t);const r=this.cursor(i);return this.G(r,e)}Z(t){const e=this.cursor({});return new K((i,r)=>{e.onerror=o=>{const s=g2(o.target.error);r(s)},e.onsuccess=o=>{const s=o.target.result;s?t(s.primaryKey,s.value).next(a=>{a?s.continue():i()}):i()}})}G(t,e){const i=[];return new K((r,o)=>{t.onerror=s=>{o(s.target.error)},t.onsuccess=s=>{const a=s.target.result;if(!a)return void r();const c=new F1e(a),l=e(a.primaryKey,a.value,c);if(l instanceof K){const d=l.catch(u=>(c.done(),K.reject(u)));i.push(d)}c.isDone?r():null===c.$?a.continue():a.continue(c.$)}}).next(()=>K.waitFor(i))}options(t,e){let i;return void 0!==t&&("string"==typeof t?i=t:e=t),{index:i,range:e}}cursor(t){let e="next";if(t.reverse&&(e="prev"),t.index){const i=this.store.index(t.index);return t.J?i.openKeyCursor(t.range,e):i.openCursor(t.range,e)}return this.store.openCursor(t.range,e)}}function Su(n){return new K((t,e)=>{n.onsuccess=i=>{t(i.target.result)},n.onerror=i=>{const r=g2(i.target.error);e(r)}})}let P9=!1;function g2(n){const t=zs.S(Yl());if(t>=12.2&&t<13){const e="An internal error was encountered in the Indexed Database server";if(n.message.indexOf(e)>=0){const i=new Te("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return P9||(P9=!0,setTimeout(()=>{throw i},0)),i}}return n}let ys=(()=>{class n{constructor(e,i){this.previousValue=e,i&&(i.sequenceNumberHandler=r=>this.se(r),this.oe=r=>i.writeSequenceNumber(r))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.oe&&this.oe(e),e}}return n._e=-1,n})();function m_(n){return null==n}function p_(n){return 0===n&&1/n==-1/0}function z9(n){let t=0;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t++;return t}function rd(n,t){for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t(e,n[e])}function j9(n){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}class ci{constructor(t,e){this.comparator=t,this.root=e||$r.EMPTY}insert(t,e){return new ci(this.comparator,this.root.insert(t,e,this.comparator).copy(null,null,$r.BLACK,null,null))}remove(t){return new ci(this.comparator,this.root.remove(t,this.comparator).copy(null,null,$r.BLACK,null,null))}get(t){let e=this.root;for(;!e.isEmpty();){const i=this.comparator(t,e.key);if(0===i)return e.value;i<0?e=e.left:i>0&&(e=e.right)}return null}indexOf(t){let e=0,i=this.root;for(;!i.isEmpty();){const r=this.comparator(t,i.key);if(0===r)return e+i.left.size;r<0?i=i.left:(e+=i.left.size+1,i=i.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal((e,i)=>(t(e,i),!1))}toString(){const t=[];return this.inorderTraversal((e,i)=>(t.push(`${e}:${i}`),!1)),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new Vx(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new Vx(this.root,t,this.comparator,!1)}getReverseIterator(){return new Vx(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new Vx(this.root,t,this.comparator,!0)}}class Vx{constructor(t,e,i,r){this.isReverse=r,this.nodeStack=[];let o=1;for(;!t.isEmpty();)if(o=e?i(t.key,e):1,e&&r&&(o*=-1),o<0)t=this.isReverse?t.left:t.right;else{if(0===o){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class $r{constructor(t,e,i,r,o){this.key=t,this.value=e,this.color=i??$r.RED,this.left=r??$r.EMPTY,this.right=o??$r.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,e,i,r,o){return new $r(t??this.key,e??this.value,i??this.color,r??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,e,i){let r=this;const o=i(t,r.key);return r=o<0?r.copy(null,null,null,r.left.insert(t,e,i),null):0===o?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,i)),r.fixUp()}removeMin(){if(this.left.isEmpty())return $r.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,e){let i,r=this;if(e(t,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(t,e),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===e(t,r.key)){if(r.right.isEmpty())return $r.EMPTY;i=r.right.min(),r=r.copy(i.key,i.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(t,e))}return r.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,$r.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,$r.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw at();const t=this.left.check();if(t!==this.right.check())throw at();return t+(this.isRed()?0:1)}}$r.EMPTY=null,$r.RED=!0,$r.BLACK=!1,$r.EMPTY=new class{constructor(){this.size=0}get key(){throw at()}get value(){throw at()}get color(){throw at()}get left(){throw at()}get right(){throw at()}copy(t,e,i,r,o){return this}insert(t,e,i){return new $r(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class ei{constructor(t){this.comparator=t,this.data=new ci(this.comparator)}has(t){return null!==this.data.get(t)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal((e,i)=>(t(e),!1))}forEachInRange(t,e){const i=this.data.getIteratorFrom(t[0]);for(;i.hasNext();){const r=i.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}}forEachWhile(t,e){let i;for(i=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();i.hasNext();)if(!t(i.getNext().key))return}firstAfterOrEqual(t){const e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null}getIterator(){return new $9(this.data.getIterator())}getIteratorFrom(t){return new $9(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let e=this;return e.size{e=e.add(i)}),e}isEqual(t){if(!(t instanceof ei)||this.size!==t.size)return!1;const e=this.data.getIterator(),i=t.data.getIterator();for(;e.hasNext();){const r=e.getNext().key,o=i.getNext().key;if(0!==this.comparator(r,o))return!1}return!0}toArray(){const t=[];return this.forEach(e=>{t.push(e)}),t}toString(){const t=[];return this.forEach(e=>t.push(e)),"SortedSet("+t.toString()+")"}copy(t){const e=new ei(this.comparator);return e.data=t,e}}class $9{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class Ko{constructor(t){this.fields=t,t.sort(bi.comparator)}static empty(){return new Ko([])}unionWith(t){let e=new ei(bi.comparator);for(const i of this.fields)e=e.add(i);for(const i of t)e=e.add(i);return new Ko(e.toArray())}covers(t){for(const e of this.fields)if(e.isPrefixOf(t))return!0;return!1}isEqual(t){return Yf(this.fields,t.fields,(e,i)=>e.isEqual(i))}}class G9 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class br{constructor(t){this.binaryString=t}static fromBase64String(t){const e=function(r){try{return atob(r)}catch(o){throw typeof DOMException<"u"&&o instanceof DOMException?new G9("Invalid base64 string: "+o):o}}(t);return new br(e)}static fromUint8Array(t){const e=function(r){let o="";for(let s=0;stYa(e,t))}function cd(n,t){if(n===t)return 0;const e=ad(n),i=ad(t);if(e!==i)return Ot(e,i);switch(e){case 0:case 9007199254740991:return 0;case 1:return Ot(n.booleanValue,t.booleanValue);case 2:return function(o,s){const a=Fi(o.integerValue||o.doubleValue),c=Fi(s.integerValue||s.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(n,t);case 3:return W9(n.timestampValue,t.timestampValue);case 4:return W9(g_(n),g_(t));case 5:return Ot(n.stringValue,t.stringValue);case 6:return function(o,s){const a=Xc(o),c=Xc(s);return a.compareTo(c)}(n.bytesValue,t.bytesValue);case 7:return function(o,s){const a=o.split("/"),c=s.split("/");for(let l=0;lt.mapValue.fields[e]=v_(i)),t}if(n.arrayValue){const t={arrayValue:{values:[]}};for(let e=0;e<(n.arrayValue.values||[]).length;++e)t.arrayValue.values[e]=v_(n.arrayValue.values[e]);return t}return Object.assign({},n)}function K9(n){return"__max__"===(((n.mapValue||{}).fields||{}).__type__||{}).stringValue}class Gr{constructor(t){this.value=t}static empty(){return new Gr({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let e=this.value;for(let i=0;i{if(!e.isImmediateParentOf(a)){const c=this.getFieldsMap(e);this.applyChanges(c,i,r),i={},r=[],e=a.popLast()}s?i[a.lastSegment()]=v_(s):r.push(a.lastSegment())});const o=this.getFieldsMap(e);this.applyChanges(o,i,r)}delete(t){const e=this.field(t.popLast());$x(e)&&e.mapValue.fields&&delete e.mapValue.fields[t.lastSegment()]}isEqual(t){return Ya(this.value,t.value)}getFieldsMap(t){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let i=0;it[r]=o);for(const r of i)delete t[r]}clone(){return new Gr(v_(this.value))}}function Z9(n){const t=[];return rd(n.fields,(e,i)=>{const r=new bi([e]);if($x(i)){const o=Z9(i.mapValue).fields;if(0===o.length)t.push(r);else for(const s of o)t.push(r.child(s))}else t.push(r)}),new Ko(t)}class pi{constructor(t,e,i,r,o,s,a){this.key=t,this.documentType=e,this.version=i,this.readTime=r,this.createTime=o,this.data=s,this.documentState=a}static newInvalidDocument(t){return new pi(t,0,_t.min(),_t.min(),_t.min(),Gr.empty(),0)}static newFoundDocument(t,e,i,r){return new pi(t,1,e,_t.min(),i,r,0)}static newNoDocument(t,e){return new pi(t,2,e,_t.min(),_t.min(),Gr.empty(),0)}static newUnknownDocument(t,e){return new pi(t,3,e,_t.min(),_t.min(),Gr.empty(),2)}convertToFoundDocument(t,e){return!this.createTime.isEqual(_t.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=t),this.version=t,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=Gr.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=Gr.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=_t.min(),this}setReadTime(t){return this.readTime=t,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(t){return t instanceof pi&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new pi(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class ld{constructor(t,e){this.position=t,this.inclusive=e}}function J9(n,t,e){let i=0;for(let r=0;r":return t>0;case">=":return t>=0;default:return at()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Wn extends tU{constructor(t,e){super(),this.filters=t,this.op=e,this.ue=null}static create(t,e){return new Wn(t,e)}matches(t){return nm(this)?void 0===this.filters.find(e=>!e.matches(t)):void 0!==this.filters.find(e=>e.matches(t))}getFlattenedFilters(){return null!==this.ue||(this.ue=this.filters.reduce((t,e)=>t.concat(e.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function nm(n){return"and"===n.op}function x2(n){return function nU(n){for(const t of n.filters)if(t instanceof Wn)return!1;return!0}(n)&&nm(n)}function w2(n){if(n instanceof _n)return n.field.canonicalString()+n.op.toString()+tm(n.value);if(x2(n))return n.filters.map(t=>w2(t)).join(",");{const t=n.filters.map(e=>w2(e)).join(",");return`${n.op}(${t})`}}function iU(n,t){return n instanceof _n?(i=n,(r=t)instanceof _n&&i.op===r.op&&i.field.isEqual(r.field)&&Ya(i.value,r.value)):n instanceof Wn?function(i,r){return r instanceof Wn&&i.op===r.op&&i.filters.length===r.filters.length&&i.filters.reduce((o,s,a)=>o&&iU(s,r.filters[a]),!0)}(n,t):void at();var i,r}function oU(n){return n instanceof _n?`${(e=n).field.canonicalString()} ${e.op} ${tm(e.value)}`:n instanceof Wn?function(e){return e.op.toString()+" {"+e.getFilters().map(oU).join(" ,")+"}"}(n):"Filter";var e}class swe extends _n{constructor(t,e,i){super(t,e,i),this.key=Ge.fromName(i.referenceValue)}matches(t){const e=Ge.comparator(t.key,this.key);return this.matchesComparison(e)}}class awe extends _n{constructor(t,e){super(t,"in",e),this.keys=sU(0,e)}matches(t){return this.keys.some(e=>e.isEqual(t.key))}}class cwe extends _n{constructor(t,e){super(t,"not-in",e),this.keys=sU(0,e)}matches(t){return!this.keys.some(e=>e.isEqual(t.key))}}function sU(n,t){var e;return((null===(e=t.arrayValue)||void 0===e?void 0:e.values)||[]).map(i=>Ge.fromName(i.referenceValue))}class lwe extends _n{constructor(t,e){super(t,"array-contains",e)}matches(t){const e=t.data.field(this.field);return b_(e)&&__(e.arrayValue,this.value)}}class aU extends _n{constructor(t,e){super(t,"in",e)}matches(t){const e=t.data.field(this.field);return null!==e&&__(this.value.arrayValue,e)}}class dwe extends _n{constructor(t,e){super(t,"not-in",e)}matches(t){if(__(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const e=t.data.field(this.field);return null!==e&&!__(this.value.arrayValue,e)}}class uwe extends _n{constructor(t,e){super(t,"array-contains-any",e)}matches(t){const e=t.data.field(this.field);return!(!b_(e)||!e.arrayValue.values)&&e.arrayValue.values.some(i=>__(this.value.arrayValue,i))}}class hwe{constructor(t,e=null,i=[],r=[],o=null,s=null,a=null){this.path=t,this.collectionGroup=e,this.orderBy=i,this.filters=r,this.limit=o,this.startAt=s,this.endAt=a,this.ce=null}}function C2(n,t=null,e=[],i=[],r=null,o=null,s=null){return new hwe(n,t,e,i,r,o,s)}function Iu(n){const t=je(n);if(null===t.ce){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map(i=>w2(i)).join(","),e+="|ob:",e+=t.orderBy.map(i=>{return(o=i).field.canonicalString()+o.dir;var o}).join(","),m_(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map(i=>tm(i)).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map(i=>tm(i)).join(",")),t.ce=e}return t.ce}function x_(n,t){if(n.limit!==t.limit||n.orderBy.length!==t.orderBy.length)return!1;for(let e=0;e0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";(function(s){let a=new ei(bi.comparator);return s.filters.forEach(c=>{c.getFlattenedFilters().forEach(l=>{l.isInequality()&&(a=a.add(l.field))})}),a})(t).forEach(o=>{e.has(o.canonicalString())||o.isKeyField()||t.le.push(new y_(o,i))}),e.has(bi.keyField().canonicalString())||t.le.push(new y_(bi.keyField(),i))}return t.le}function No(n){const t=je(n);return t.he||(t.he=function hU(n,t){if("F"===n.limitType)return C2(n.path,n.collectionGroup,t,n.filters,n.limit,n.startAt,n.endAt);{t=t.map(r=>new y_(r.field,"desc"===r.dir?"asc":"desc"));const e=n.endAt?new ld(n.endAt.position,n.endAt.inclusive):null,i=n.startAt?new ld(n.startAt.position,n.startAt.inclusive):null;return C2(n.path,n.collectionGroup,t,n.filters,n.limit,e,i)}}(t,rm(n))),t.he}function E2(n,t){const e=n.filters.concat([t]);return new Yc(n.path,n.collectionGroup,n.explicitOrderBy.slice(),e,n.limit,n.limitType,n.startAt,n.endAt)}function qx(n,t,e){return new Yc(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),t,e,n.startAt,n.endAt)}function w_(n,t){return x_(No(n),No(t))&&n.limitType===t.limitType}function fU(n){return`${Iu(No(n))}|lt:${n.limitType}`}function om(n){return`Query(target=${function(e){let i=e.path.canonicalString();return null!==e.collectionGroup&&(i+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(i+=`, filters: [${e.filters.map(r=>oU(r)).join(", ")}]`),m_(e.limit)||(i+=", limit: "+e.limit),e.orderBy.length>0&&(i+=`, orderBy: [${e.orderBy.map(r=>{return`${(s=r).field.canonicalString()} (${s.dir})`;var s}).join(", ")}]`),e.startAt&&(i+=", startAt: ",i+=e.startAt.inclusive?"b:":"a:",i+=e.startAt.position.map(r=>tm(r)).join(",")),e.endAt&&(i+=", endAt: ",i+=e.endAt.inclusive?"a:":"b:",i+=e.endAt.position.map(r=>tm(r)).join(",")),`Target(${i})`}(No(n))}; limitType=${n.limitType})`}function C_(n,t){return t.isFoundDocument()&&function(i,r){const o=r.key.path;return null!==i.collectionGroup?r.key.hasCollectionId(i.collectionGroup)&&i.path.isPrefixOf(o):Ge.isDocumentKey(i.path)?i.path.isEqual(o):i.path.isImmediateParentOf(o)}(n,t)&&function(i,r){for(const o of rm(i))if(!o.field.isKeyField()&&null===r.data.field(o.field))return!1;return!0}(n,t)&&function(i,r){for(const o of i.filters)if(!o.matches(r))return!1;return!0}(n,t)&&(r=t,!((i=n).startAt&&!function(s,a,c){const l=J9(s,a,c);return s.inclusive?l<=0:l<0}(i.startAt,rm(i),r)||i.endAt&&!function(s,a,c){const l=J9(s,a,c);return s.inclusive?l>=0:l>0}(i.endAt,rm(i),r)));var i,r}function pU(n){return(t,e)=>{let i=!1;for(const r of rm(n)){const o=fwe(r,t,e);if(0!==o)return o;i=i||r.field.isKeyField()}return 0}}function fwe(n,t,e){const i=n.field.isKeyField()?Ge.comparator(t.key,e.key):function(o,s,a){const c=s.data.field(o),l=a.data.field(o);return null!==c&&null!==l?cd(c,l):at()}(n.field,t,e);switch(n.dir){case"asc":return i;case"desc":return-1*i;default:return at()}}class Zc{constructor(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={},this.innerSize=0}get(t){const e=this.mapKeyFn(t),i=this.inner[e];if(void 0!==i)for(const[r,o]of i)if(this.equalsFn(r,t))return o}has(t){return void 0!==this.get(t)}set(t,e){const i=this.mapKeyFn(t),r=this.inner[i];if(void 0===r)return this.inner[i]=[[t,e]],void this.innerSize++;for(let o=0;o{for(const[r,o]of i)t(r,o)})}isEmpty(){return j9(this.inner)}size(){return this.innerSize}}const mwe=new ci(Ge.comparator);function Xo(){return mwe}const gU=new ci(Ge.comparator);function k_(...n){let t=gU;for(const e of n)t=t.insert(e.key,e);return t}function _U(n){let t=gU;return n.forEach((e,i)=>t=t.insert(e,i.overlayedDocument)),t}function Za(){return E_()}function bU(){return E_()}function E_(){return new Zc(n=>n.toString(),(n,t)=>n.isEqual(t))}const pwe=new ci(Ge.comparator),gwe=new ei(Ge.comparator);function Kt(...n){let t=gwe;for(const e of n)t=t.add(e);return t}const _we=new ei(Ot);function vU(n,t){if(n.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:p_(t)?"-0":t}}function yU(n){return{integerValue:""+n}}function xU(n,t){return function O9(n){return"number"==typeof n&&Number.isInteger(n)&&!p_(n)&&n<=Number.MAX_SAFE_INTEGER&&n>=Number.MIN_SAFE_INTEGER}(t)?yU(t):vU(n,t)}class Qx{constructor(){this._=void 0}}function bwe(n,t,e){return n instanceof sm?function(r,o){const s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return o&&Ux(o)&&(o=Hx(o)),o&&(s.fields.__previous_value__=o),{mapValue:s}}(e,t):n instanceof Mu?CU(n,t):n instanceof Ru?kU(n,t):function(r,o){const s=wU(r,o),a=EU(s)+EU(r.Ie);return v2(s)&&v2(r.Ie)?yU(a):vU(r.serializer,a)}(n,t)}function vwe(n,t,e){return n instanceof Mu?CU(n,t):n instanceof Ru?kU(n,t):e}function wU(n,t){return n instanceof am?v2(i=t)||(o=i)&&"doubleValue"in o?t:{integerValue:0}:null;var i,o}class sm extends Qx{}class Mu extends Qx{constructor(t){super(),this.elements=t}}function CU(n,t){const e=TU(t);for(const i of n.elements)e.some(r=>Ya(r,i))||e.push(i);return{arrayValue:{values:e}}}class Ru extends Qx{constructor(t){super(),this.elements=t}}function kU(n,t){let e=TU(t);for(const i of n.elements)e=e.filter(r=>!Ya(r,i));return{arrayValue:{values:e}}}class am extends Qx{constructor(t,e){super(),this.serializer=t,this.Ie=e}}function EU(n){return Fi(n.integerValue||n.doubleValue)}function TU(n){return b_(n)&&n.arrayValue.values?n.arrayValue.values.slice():[]}class xwe{constructor(t,e){this.version=t,this.transformResults=e}}class vi{constructor(t,e){this.updateTime=t,this.exists=e}static none(){return new vi}static exists(t){return new vi(void 0,t)}static updateTime(t){return new vi(t)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function Kx(n,t){return void 0!==n.updateTime?t.isFoundDocument()&&t.version.isEqual(n.updateTime):void 0===n.exists||n.exists===t.isFoundDocument()}class Xx{}function SU(n,t){if(!n.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return n.isNoDocument()?new lm(n.key,vi.none()):new cm(n.key,n.data,vi.none());{const e=n.data,i=Gr.empty();let r=new ei(bi.comparator);for(let o of t.fields)if(!r.has(o)){let s=e.field(o);null===s&&o.length>1&&(o=o.popLast(),s=e.field(o)),null===s?i.delete(o):i.set(o,s),r=r.add(o)}return new Jc(n.key,i,new Ko(r.toArray()),vi.none())}}function wwe(n,t,e){n instanceof cm?function(r,o,s){const a=r.value.clone(),c=IU(r.fieldTransforms,o,s.transformResults);a.setAll(c),o.convertToFoundDocument(s.version,a).setHasCommittedMutations()}(n,t,e):n instanceof Jc?function(r,o,s){if(!Kx(r.precondition,o))return void o.convertToUnknownDocument(s.version);const a=IU(r.fieldTransforms,o,s.transformResults),c=o.data;c.setAll(AU(r)),c.setAll(a),o.convertToFoundDocument(s.version,c).setHasCommittedMutations()}(n,t,e):t.convertToNoDocument(e.version).setHasCommittedMutations()}function S_(n,t,e,i){return n instanceof cm?function(o,s,a,c){if(!Kx(o.precondition,s))return a;const l=o.value.clone(),d=MU(o.fieldTransforms,c,s);return l.setAll(d),s.convertToFoundDocument(s.version,l).setHasLocalMutations(),null}(n,t,e,i):n instanceof Jc?function(o,s,a,c){if(!Kx(o.precondition,s))return a;const l=MU(o.fieldTransforms,c,s),d=s.data;return d.setAll(AU(o)),d.setAll(l),s.convertToFoundDocument(s.version,d).setHasLocalMutations(),null===a?null:a.unionWith(o.fieldMask.fields).unionWith(o.fieldTransforms.map(u=>u.field))}(n,t,e,i):(a=e,Kx(n.precondition,s=t)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):a);var s,a}function Cwe(n,t){let e=null;for(const i of n.fieldTransforms){const r=t.data.field(i.field),o=wU(i.transform,r||null);null!=o&&(null===e&&(e=Gr.empty()),e.set(i.field,o))}return e||null}function DU(n,t){return n.type===t.type&&!!n.key.isEqual(t.key)&&!!n.precondition.isEqual(t.precondition)&&(r=t.fieldTransforms,!!(void 0===(i=n.fieldTransforms)&&void 0===r||i&&r&&Yf(i,r,(o,s)=>function ywe(n,t){return n.field.isEqual(t.field)&&(r=t.transform,(i=n.transform)instanceof Mu&&r instanceof Mu||i instanceof Ru&&r instanceof Ru?Yf(i.elements,r.elements,Ya):i instanceof am&&r instanceof am?Ya(i.Ie,r.Ie):i instanceof sm&&r instanceof sm);var i,r}(o,s))))&&(0===n.type?n.value.isEqual(t.value):1!==n.type||n.data.isEqual(t.data)&&n.fieldMask.isEqual(t.fieldMask));var i,r}class cm extends Xx{constructor(t,e,i,r=[]){super(),this.key=t,this.value=e,this.precondition=i,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Jc extends Xx{constructor(t,e,i,r,o=[]){super(),this.key=t,this.data=e,this.fieldMask=i,this.precondition=r,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function AU(n){const t=new Map;return n.fieldMask.fields.forEach(e=>{if(!e.isEmpty()){const i=n.data.field(e);t.set(e,i)}}),t}function IU(n,t,e){const i=new Map;ft(n.length===e.length);for(let r=0;r{const o=t.get(r.key),s=o.overlayedDocument;let a=this.applyToLocalView(s,o.mutatedFields);a=e.has(r.key)?null:a;const c=SU(s,a);null!==c&&i.set(r.key,c),s.isValidDocument()||s.convertToNoDocument(_t.min())}),i}keys(){return this.mutations.reduce((t,e)=>t.add(e.key),Kt())}isEqual(t){return this.batchId===t.batchId&&Yf(this.mutations,t.mutations,(e,i)=>DU(e,i))&&Yf(this.baseMutations,t.baseMutations,(e,i)=>DU(e,i))}}class A2{constructor(t,e,i,r){this.batch=t,this.commitVersion=e,this.mutationResults=i,this.docVersions=r}static from(t,e,i){ft(t.mutations.length===i.length);let r=pwe;const o=t.mutations;for(let s=0;s=8)throw new D_(`Invalid padding: ${e}`);if(i<0)throw new D_(`Invalid hash count: ${i}`);if(t.length>0&&0===this.hashCount)throw new D_(`Invalid hash count: ${i}`);if(0===t.length&&0!==e)throw new D_(`Invalid padding when bitmap length is 0: ${e}`);this.Te=8*t.length-e,this.Ee=Qf.fromNumber(this.Te)}de(t,e,i){let r=t.add(e.multiply(Qf.fromNumber(i)));return 1===r.compare(Twe)&&(r=new Qf([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Ee).toNumber()}Ae(t){return 0!=(this.bitmap[Math.floor(t/8)]&1<s.insert(a)),s}insert(t){if(0===this.Te)return;const e=OU(t),[i,r]=NU(e);for(let o=0;o0&&(this.Se=!0,this.ye=t)}ve(){let t=Kt(),e=Kt(),i=Kt();return this.pe.forEach((r,o)=>{switch(o){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:i=i.add(r);break;default:at()}}),new I_(this.ye,this.we,t,e,i)}Fe(){this.Se=!1,this.pe=HU()}Me(t,e){this.Se=!0,this.pe=this.pe.insert(t,e)}xe(t){this.Se=!0,this.pe=this.pe.remove(t)}Oe(){this.ge+=1}Ne(){this.ge-=1,ft(this.ge>=0)}Le(){this.Se=!0,this.we=!0}}class Swe{constructor(t){this.Be=t,this.ke=new Map,this.qe=Xo(),this.Qe=UU(),this.Ke=new ci(Ot)}$e(t){for(const e of t.Ve)t.me&&t.me.isFoundDocument()?this.Ue(e,t.me):this.We(e,t.key,t.me);for(const e of t.removedTargetIds)this.We(e,t.key,t.me)}Ge(t){this.forEachTarget(t,e=>{const i=this.ze(e);switch(t.state){case 0:this.je(e)&&i.Ce(t.resumeToken);break;case 1:i.Ne(),i.be||i.Fe(),i.Ce(t.resumeToken);break;case 2:i.Ne(),i.be||this.removeTarget(e);break;case 3:this.je(e)&&(i.Le(),i.Ce(t.resumeToken));break;case 4:this.je(e)&&(this.He(e),i.Ce(t.resumeToken));break;default:at()}})}forEachTarget(t,e){t.targetIds.length>0?t.targetIds.forEach(e):this.ke.forEach((i,r)=>{this.je(r)&&e(r)})}Je(t){const e=t.targetId,i=t.fe.count,r=this.Ye(e);if(r){const o=r.target;if(Gx(o))if(0===i){const s=new Ge(o.path);this.We(e,s,pi.newNoDocument(s,_t.min()))}else ft(1===i);else{const s=this.Ze(e);if(s!==i){const a=this.Xe(t),c=a?this.et(a,t,s):1;0!==c&&(this.He(e),this.Ke=this.Ke.insert(e,2===c?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Xe(t){const e=t.fe.unchangedNames;if(!e||!e.bits)return null;const{bits:{bitmap:i="",padding:r=0},hashCount:o=0}=e;let s,a;try{s=Xc(i).toUint8Array()}catch(c){if(c instanceof G9)return bs("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw c}try{a=new M2(s,r,o)}catch(c){return bs(c instanceof D_?"BloomFilter error: ":"Applying bloom filter failed: ",c),null}return 0===a.Te?null:a}et(t,e,i){return e.fe.count===i-this.rt(t,e.targetId)?0:2}rt(t,e){const i=this.Be.getRemoteKeysForTarget(e);let r=0;return i.forEach(o=>{const s=this.Be.nt(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;t.mightContain(a)||(this.We(e,o,null),r++)}),r}it(t){const e=new Map;this.ke.forEach((o,s)=>{const a=this.Ye(s);if(a){if(o.current&&Gx(a.target)){const c=new Ge(a.target.path);null!==this.qe.get(c)||this.st(s,c)||this.We(s,c,pi.newNoDocument(c,t))}o.De&&(e.set(s,o.ve()),o.Fe())}});let i=Kt();this.Qe.forEach((o,s)=>{let a=!0;s.forEachWhile(c=>{const l=this.Ye(c);return!l||"TargetPurposeLimboResolution"===l.purpose||(a=!1,!1)}),a&&(i=i.add(o))}),this.qe.forEach((o,s)=>s.setReadTime(t));const r=new A_(t,e,this.Ke,this.qe,i);return this.qe=Xo(),this.Qe=UU(),this.Ke=new ci(Ot),r}Ue(t,e){if(!this.je(t))return;const i=this.st(t,e.key)?2:0;this.ze(t).Me(e.key,i),this.qe=this.qe.insert(e.key,e),this.Qe=this.Qe.insert(e.key,this.ot(e.key).add(t))}We(t,e,i){if(!this.je(t))return;const r=this.ze(t);this.st(t,e)?r.Me(e,1):r.xe(e),this.Qe=this.Qe.insert(e,this.ot(e).delete(t)),i&&(this.qe=this.qe.insert(e,i))}removeTarget(t){this.ke.delete(t)}Ze(t){const e=this.ze(t).ve();return this.Be.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size}Oe(t){this.ze(t).Oe()}ze(t){let e=this.ke.get(t);return e||(e=new VU,this.ke.set(t,e)),e}ot(t){let e=this.Qe.get(t);return e||(e=new ei(Ot),this.Qe=this.Qe.insert(t,e)),e}je(t){const e=null!==this.Ye(t);return e||Ee("WatchChangeAggregator","Detected inactive target",t),e}Ye(t){const e=this.ke.get(t);return e&&e.be?null:this.Be._t(t)}He(t){this.ke.set(t,new VU),this.Be.getRemoteKeysForTarget(t).forEach(e=>{this.We(t,e,null)})}st(t,e){return this.Be.getRemoteKeysForTarget(t).has(e)}}function UU(){return new ci(Ge.comparator)}function HU(){return new ci(Ge.comparator)}const Dwe={asc:"ASCENDING",desc:"DESCENDING"},Awe={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Iwe={and:"AND",or:"OR"};class Mwe{constructor(t,e){this.databaseId=t,this.useProto3Json=e}}function R2(n,t){return n.useProto3Json||m_(t)?t:{value:t}}function dm(n,t){return n.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function zU(n,t){return n.useProto3Json?t.toBase64():t.toUint8Array()}function Rwe(n,t){return dm(n,t.toTimestamp())}function ji(n){return ft(!!n),_t.fromTimestamp(function(e){const i=od(e);return new _i(i.seconds,i.nanos)}(n))}function F2(n,t){return P2(n,t).canonicalString()}function P2(n,t){const e=(r=n,new gn(["projects",r.projectId,"databases",r.database])).child("documents");var r;return void 0===t?e:e.child(t)}function jU(n){const t=gn.fromString(n);return ft(JU(t)),t}function M_(n,t){return F2(n.databaseId,t.path)}function Ja(n,t){const e=jU(t);if(e.get(1)!==n.databaseId.projectId)throw new Te(oe.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+e.get(1)+" vs "+n.databaseId.projectId);if(e.get(3)!==n.databaseId.database)throw new Te(oe.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+e.get(3)+" vs "+n.databaseId.database);return new Ge(WU(e))}function $U(n,t){return F2(n.databaseId,t)}function O2(n){return new gn(["projects",n.databaseId.projectId,"databases",n.databaseId.database]).canonicalString()}function WU(n){return ft(n.length>4&&"documents"===n.get(4)),n.popFirst(5)}function qU(n,t,e){return{name:M_(n,t),fields:e.value.mapValue.fields}}function KU(n,t){return{documents:[$U(n,t.path)]}}function L2(n,t){const e={structuredQuery:{}},i=t.path;let r;null!==t.collectionGroup?(r=i,e.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(r=i.popLast(),e.structuredQuery.from=[{collectionId:i.lastSegment()}]),e.parent=$U(n,r);const o=function(l){if(0!==l.length)return ZU(Wn.create(l,"and"))}(t.filters);o&&(e.structuredQuery.where=o);const s=function(l){if(0!==l.length)return l.map(d=>{return{field:dd((h=d).field),direction:Lwe(h.dir)};var h})}(t.orderBy);s&&(e.structuredQuery.orderBy=s);const a=R2(n,t.limit);return null!==a&&(e.structuredQuery.limit=a),t.startAt&&(e.structuredQuery.startAt={before:(l=t.startAt).inclusive,values:l.position}),t.endAt&&(e.structuredQuery.endAt=function(l){return{before:!l.inclusive,values:l.position}}(t.endAt)),{ut:e,parent:r};var l}function XU(n){let t=function GU(n){const t=jU(n);return 4===t.length?gn.emptyPath():WU(t)}(n.parent);const e=n.structuredQuery,i=e.from?e.from.length:0;let r=null;if(i>0){ft(1===i);const d=e.from[0];d.allDescendants?r=d.collectionId:t=t.child(d.collectionId)}let o=[];e.where&&(o=function(u){const h=YU(u);return h instanceof Wn&&x2(h)?h.getFilters():[h]}(e.where));let s=[];e.orderBy&&(s=e.orderBy.map(h=>{return new y_(um((m=h).field),function(p){switch(p){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(m.direction));var m}));let a=null;e.limit&&(a=function(u){let h;return h="object"==typeof u?u.value:u,m_(h)?null:h}(e.limit));let c=null;var u;e.startAt&&(c=new ld((u=e.startAt).values||[],!!u.before));let l=null;return e.endAt&&(l=function(u){return new ld(u.values||[],!u.before)}(e.endAt)),function dU(n,t,e,i,r,o,s,a){return new Yc(n,t,e,i,r,o,s,a)}(t,r,s,o,a,"F",c,l)}function YU(n){return void 0!==n.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const i=um(e.unaryFilter.field);return _n.create(i,"==",{doubleValue:NaN});case"IS_NULL":const r=um(e.unaryFilter.field);return _n.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const o=um(e.unaryFilter.field);return _n.create(o,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const s=um(e.unaryFilter.field);return _n.create(s,"!=",{nullValue:"NULL_VALUE"});default:return at()}}(n):void 0!==n.fieldFilter?_n.create(um((e=n).fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return at()}}(e.fieldFilter.op),e.fieldFilter.value):void 0!==n.compositeFilter?function(e){return Wn.create(e.compositeFilter.filters.map(i=>YU(i)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return at()}}(e.compositeFilter.op))}(n):at();var e}function Lwe(n){return Dwe[n]}function Bwe(n){return Awe[n]}function Vwe(n){return Iwe[n]}function dd(n){return{fieldPath:n.canonicalString()}}function um(n){return bi.fromServerFormat(n.fieldPath)}function ZU(n){return n instanceof _n?function(e){if("=="===e.op){if(Q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NAN"}};if(q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NOT_NAN"}};if(q9(e.value))return{unaryFilter:{field:dd(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:dd(e.field),op:Bwe(e.op),value:e.value}}}(n):n instanceof Wn?function(e){const i=e.getFilters().map(r=>ZU(r));return 1===i.length?i[0]:{compositeFilter:{op:Vwe(e.op),filters:i}}}(n):at()}function Uwe(n){const t=[];return n.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}function JU(n){return n.length>=4&&"projects"===n.get(0)&&"databases"===n.get(2)}class el{constructor(t,e,i,r,o=_t.min(),s=_t.min(),a=br.EMPTY_BYTE_STRING,c=null){this.target=t,this.targetId=e,this.purpose=i,this.sequenceNumber=r,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=c}withSequenceNumber(t){return new el(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,e){return new el(this.target,this.targetId,this.purpose,this.sequenceNumber,e,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new el(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new el(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}class eH{constructor(t){this.ct=t}}function B2(n){const t=XU({parent:n.parent,structuredQuery:n.structuredQuery});return"LAST"===n.limitType?qx(t,t.limit,"L"):t}class Nu{constructor(){}Pt(t,e){this.It(t,e),e.Tt()}It(t,e){if("nullValue"in t)this.Et(e,5);else if("booleanValue"in t)this.Et(e,10),e.dt(t.booleanValue?1:0);else if("integerValue"in t)this.Et(e,15),e.dt(Fi(t.integerValue));else if("doubleValue"in t){const i=Fi(t.doubleValue);isNaN(i)?this.Et(e,13):(this.Et(e,15),p_(i)?e.dt(0):e.dt(i))}else if("timestampValue"in t){const i=t.timestampValue;this.Et(e,20),"string"==typeof i?e.At(i):(e.At(`${i.seconds||""}`),e.dt(i.nanos||0))}else if("stringValue"in t)this.Rt(t.stringValue,e),this.Vt(e);else if("bytesValue"in t)this.Et(e,30),e.ft(Xc(t.bytesValue)),this.Vt(e);else if("referenceValue"in t)this.gt(t.referenceValue,e);else if("geoPointValue"in t){const i=t.geoPointValue;this.Et(e,45),e.dt(i.latitude||0),e.dt(i.longitude||0)}else"mapValue"in t?K9(t)?this.Et(e,Number.MAX_SAFE_INTEGER):(this.yt(t.mapValue,e),this.Vt(e)):"arrayValue"in t?(this.wt(t.arrayValue,e),this.Vt(e)):at()}Rt(t,e){this.Et(e,25),this.St(t,e)}St(t,e){e.At(t)}yt(t,e){const i=t.fields||{};this.Et(e,55);for(const r of Object.keys(i))this.Rt(r,e),this.It(i[r],e)}wt(t,e){const i=t.values||[];this.Et(e,50);for(const r of i)this.It(r,e)}gt(t,e){this.Et(e,37),Ge.fromName(t).path.forEach(i=>{this.Et(e,60),this.St(i,e)})}Et(t,e){t.dt(e)}Vt(t){t.dt(2)}}Nu.bt=new Nu;class Qwe{constructor(){this._n=new $2}addToCollectionParentIndex(t,e){return this._n.add(e),K.resolve()}getCollectionParents(t,e){return K.resolve(this._n.getEntries(e))}addFieldIndex(t,e){return K.resolve()}deleteFieldIndex(t,e){return K.resolve()}deleteAllFieldIndexes(t){return K.resolve()}createTargetIndexes(t,e){return K.resolve()}getDocumentsMatchingTarget(t,e){return K.resolve(null)}getIndexType(t,e){return K.resolve(0)}getFieldIndexes(t,e){return K.resolve([])}getNextCollectionGroupToUpdate(t){return K.resolve(null)}getMinOffset(t,e){return K.resolve(vs.min())}getMinOffsetFromCollectionGroup(t,e){return K.resolve(vs.min())}updateCollectionGroup(t,e,i){return K.resolve()}updateIndexEntries(t,e){return K.resolve()}}class $2{constructor(){this.index={}}add(t){const e=t.lastSegment(),i=t.popLast(),r=this.index[e]||new ei(gn.comparator),o=!r.has(i);return this.index[e]=r.add(i),o}has(t){const e=t.lastSegment(),i=t.popLast(),r=this.index[e];return r&&r.has(i)}getEntries(t){return(this.index[t]||new ei(gn.comparator)).toArray()}}new Uint8Array(0);class fo{constructor(t,e,i){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=i}static withCacheSize(t){return new fo(t,fo.DEFAULT_COLLECTION_PERCENTILE,fo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}fo.DEFAULT_COLLECTION_PERCENTILE=10,fo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,fo.DEFAULT=new fo(41943040,fo.DEFAULT_COLLECTION_PERCENTILE,fo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),fo.DISABLED=new fo(-1,0,0);class Bu{constructor(t){this.On=t}next(){return this.On+=2,this.On}static Nn(){return new Bu(0)}static Ln(){return new Bu(-1)}}class eCe{constructor(){this.changes=new Zc(t=>t.toString(),(t,e)=>t.isEqual(e)),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,e){this.assertNotApplied(),this.changes.set(t,pi.newInvalidDocument(t).setReadTime(e))}getEntry(t,e){this.assertNotApplied();const i=this.changes.get(e);return void 0!==i?K.resolve(i):this.getFromCache(t,e)}getEntries(t,e){return this.getAllFromCache(t,e)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}}class iCe{constructor(t,e){this.overlayedDocument=t,this.mutatedFields=e}}class SH{constructor(t,e,i,r){this.remoteDocumentCache=t,this.mutationQueue=e,this.documentOverlayCache=i,this.indexManager=r}getDocument(t,e){let i=null;return this.documentOverlayCache.getOverlay(t,e).next(r=>(i=r,this.remoteDocumentCache.getEntry(t,e))).next(r=>(null!==i&&S_(i.mutation,r,Ko.empty(),_i.now()),r))}getDocuments(t,e){return this.remoteDocumentCache.getEntries(t,e).next(i=>this.getLocalViewOfDocuments(t,i,Kt()).next(()=>i))}getLocalViewOfDocuments(t,e,i=Kt()){const r=Za();return this.populateOverlays(t,r,e).next(()=>this.computeViews(t,e,r,i).next(o=>{let s=k_();return o.forEach((a,c)=>{s=s.insert(a,c.overlayedDocument)}),s}))}getOverlayedDocuments(t,e){const i=Za();return this.populateOverlays(t,i,e).next(()=>this.computeViews(t,e,i,Kt()))}populateOverlays(t,e,i){const r=[];return i.forEach(o=>{e.has(o)||r.push(o)}),this.documentOverlayCache.getOverlays(t,r).next(o=>{o.forEach((s,a)=>{e.set(s,a)})})}computeViews(t,e,i,r){let o=Xo();const s=E_(),a=E_();return e.forEach((c,l)=>{const d=i.get(l.key);r.has(l.key)&&(void 0===d||d.mutation instanceof Jc)?o=o.insert(l.key,l):void 0!==d?(s.set(l.key,d.mutation.getFieldMask()),S_(d.mutation,l,d.mutation.getFieldMask(),_i.now())):s.set(l.key,Ko.empty())}),this.recalculateAndSaveOverlays(t,o).next(c=>(c.forEach((l,d)=>s.set(l,d)),e.forEach((l,d)=>{var u;return a.set(l,new iCe(d,null!==(u=s.get(l))&&void 0!==u?u:null))}),a))}recalculateAndSaveOverlays(t,e){const i=E_();let r=new ci((s,a)=>s-a),o=Kt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,e).next(s=>{for(const a of s)a.keys().forEach(c=>{const l=e.get(c);if(null===l)return;let d=i.get(c)||Ko.empty();d=a.applyToLocalView(l,d),i.set(c,d);const u=(r.get(a.batchId)||Kt()).add(c);r=r.insert(a.batchId,u)})}).next(()=>{const s=[],a=r.getReverseIterator();for(;a.hasNext();){const c=a.getNext(),l=c.key,d=c.value,u=bU();d.forEach(h=>{if(!o.has(h)){const f=SU(e.get(h),i.get(h));null!==f&&u.set(h,f),o=o.add(h)}}),s.push(this.documentOverlayCache.saveOverlays(t,l,u))}return K.waitFor(s)}).next(()=>i)}recalculateAndSaveOverlaysForDocumentKeys(t,e){return this.remoteDocumentCache.getEntries(t,e).next(i=>this.recalculateAndSaveOverlays(t,i))}getDocumentsMatchingQuery(t,e,i,r){return Ge.isDocumentKey((s=e).path)&&null===s.collectionGroup&&0===s.filters.length?this.getDocumentsMatchingDocumentQuery(t,e.path):k2(e)?this.getDocumentsMatchingCollectionGroupQuery(t,e,i,r):this.getDocumentsMatchingCollectionQuery(t,e,i,r);var s}getNextDocuments(t,e,i,r){return this.remoteDocumentCache.getAllFromCollectionGroup(t,e,i,r).next(o=>{const s=r-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,e,i.largestBatchId,r-o.size):K.resolve(Za());let a=-1,c=o;return s.next(l=>K.forEach(l,(d,u)=>(a{c=c.insert(d,h)}))).next(()=>this.populateOverlays(t,l,o)).next(()=>this.computeViews(t,c,l,Kt())).next(d=>({batchId:a,changes:_U(d)})))})}getDocumentsMatchingDocumentQuery(t,e){return this.getDocument(t,new Ge(e)).next(i=>{let r=k_();return i.isFoundDocument()&&(r=r.insert(i.key,i)),r})}getDocumentsMatchingCollectionGroupQuery(t,e,i,r){const o=e.collectionGroup;let s=k_();return this.indexManager.getCollectionParents(t,o).next(a=>K.forEach(a,c=>{const l=(u=e,h=c.child(o),new Yc(h,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt));var u,h;return this.getDocumentsMatchingCollectionQuery(t,l,i,r).next(d=>{d.forEach((u,h)=>{s=s.insert(u,h)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(t,e,i,r){let o;return this.documentOverlayCache.getOverlaysForCollection(t,e.path,i.largestBatchId).next(s=>(o=s,this.remoteDocumentCache.getDocumentsMatchingQuery(t,e,i,o,r))).next(s=>{o.forEach((c,l)=>{const d=l.getKey();null===s.get(d)&&(s=s.insert(d,pi.newInvalidDocument(d)))});let a=k_();return s.forEach((c,l)=>{const d=o.get(c);void 0!==d&&S_(d.mutation,l,Ko.empty(),_i.now()),C_(e,l)&&(a=a.insert(c,l))}),a})}}class rCe{constructor(t){this.serializer=t,this.cr=new Map,this.lr=new Map}getBundleMetadata(t,e){return K.resolve(this.cr.get(e))}saveBundleMetadata(t,e){return this.cr.set(e.id,{id:(r=e).id,version:r.version,createTime:ji(r.createTime)}),K.resolve();var r}getNamedQuery(t,e){return K.resolve(this.lr.get(e))}saveNamedQuery(t,e){return this.lr.set(e.name,{name:(r=e).name,query:B2(r.bundledQuery),readTime:ji(r.readTime)}),K.resolve();var r}}class oCe{constructor(){this.overlays=new ci(Ge.comparator),this.hr=new Map}getOverlay(t,e){return K.resolve(this.overlays.get(e))}getOverlays(t,e){const i=Za();return K.forEach(e,r=>this.getOverlay(t,r).next(o=>{null!==o&&i.set(r,o)})).next(()=>i)}saveOverlays(t,e,i){return i.forEach((r,o)=>{this.ht(t,e,o)}),K.resolve()}removeOverlaysForBatchId(t,e,i){const r=this.hr.get(i);return void 0!==r&&(r.forEach(o=>this.overlays=this.overlays.remove(o)),this.hr.delete(i)),K.resolve()}getOverlaysForCollection(t,e,i){const r=Za(),o=e.length+1,s=new Ge(e.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const c=a.getNext().value,l=c.getKey();if(!e.isPrefixOf(l.path))break;l.path.length===o&&c.largestBatchId>i&&r.set(c.getKey(),c)}return K.resolve(r)}getOverlaysForCollectionGroup(t,e,i,r){let o=new ci((l,d)=>l-d);const s=this.overlays.getIterator();for(;s.hasNext();){const l=s.getNext().value;if(l.getKey().getCollectionGroup()===e&&l.largestBatchId>i){let d=o.get(l.largestBatchId);null===d&&(d=Za(),o=o.insert(l.largestBatchId,d)),d.set(l.getKey(),l)}}const a=Za(),c=o.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((l,d)=>a.set(l,d)),!(a.size()>=r)););return K.resolve(a)}ht(t,e,i){const r=this.overlays.get(i.key);if(null!==r){const s=this.hr.get(r.largestBatchId).delete(i.key);this.hr.set(r.largestBatchId,s)}this.overlays=this.overlays.insert(i.key,new I2(e,i));let o=this.hr.get(e);void 0===o&&(o=Kt(),this.hr.set(e,o)),this.hr.set(e,o.add(i.key))}}class G2{constructor(){this.Pr=new ei(Rr.Ir),this.Tr=new ei(Rr.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(t,e){const i=new Rr(t,e);this.Pr=this.Pr.add(i),this.Tr=this.Tr.add(i)}dr(t,e){t.forEach(i=>this.addReference(i,e))}removeReference(t,e){this.Ar(new Rr(t,e))}Rr(t,e){t.forEach(i=>this.removeReference(i,e))}Vr(t){const e=new Ge(new gn([])),i=new Rr(e,t),r=new Rr(e,t+1),o=[];return this.Tr.forEachInRange([i,r],s=>{this.Ar(s),o.push(s.key)}),o}mr(){this.Pr.forEach(t=>this.Ar(t))}Ar(t){this.Pr=this.Pr.delete(t),this.Tr=this.Tr.delete(t)}gr(t){const e=new Ge(new gn([])),i=new Rr(e,t),r=new Rr(e,t+1);let o=Kt();return this.Tr.forEachInRange([i,r],s=>{o=o.add(s.key)}),o}containsKey(t){const e=new Rr(t,0),i=this.Pr.firstAfterOrEqual(e);return null!==i&&t.isEqual(i.key)}}class Rr{constructor(t,e){this.key=t,this.pr=e}static Ir(t,e){return Ge.comparator(t.key,e.key)||Ot(t.pr,e.pr)}static Er(t,e){return Ot(t.pr,e.pr)||Ge.comparator(t.key,e.key)}}class sCe{constructor(t,e){this.indexManager=t,this.referenceDelegate=e,this.mutationQueue=[],this.yr=1,this.wr=new ei(Rr.Ir)}checkEmpty(t){return K.resolve(0===this.mutationQueue.length)}addMutationBatch(t,e,i,r){const o=this.yr;this.yr++;const s=new D2(o,e,i,r);this.mutationQueue.push(s);for(const a of r)this.wr=this.wr.add(new Rr(a.key,o)),this.indexManager.addToCollectionParentIndex(t,a.key.path.popLast());return K.resolve(s)}lookupMutationBatch(t,e){return K.resolve(this.Sr(e))}getNextMutationBatchAfterBatchId(t,e){const r=this.br(e+1),o=r<0?0:r;return K.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return K.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(t){return K.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,e){const i=new Rr(e,0),r=new Rr(e,Number.POSITIVE_INFINITY),o=[];return this.wr.forEachInRange([i,r],s=>{const a=this.Sr(s.pr);o.push(a)}),K.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(t,e){let i=new ei(Ot);return e.forEach(r=>{const o=new Rr(r,0),s=new Rr(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([o,s],a=>{i=i.add(a.pr)})}),K.resolve(this.Dr(i))}getAllMutationBatchesAffectingQuery(t,e){const i=e.path,r=i.length+1;let o=i;Ge.isDocumentKey(o)||(o=o.child(""));const s=new Rr(new Ge(o),0);let a=new ei(Ot);return this.wr.forEachWhile(c=>{const l=c.key.path;return!!i.isPrefixOf(l)&&(l.length===r&&(a=a.add(c.pr)),!0)},s),K.resolve(this.Dr(a))}Dr(t){const e=[];return t.forEach(i=>{const r=this.Sr(i);null!==r&&e.push(r)}),e}removeMutationBatch(t,e){ft(0===this.Cr(e.batchId,"removed")),this.mutationQueue.shift();let i=this.wr;return K.forEach(e.mutations,r=>{const o=new Rr(r.key,e.batchId);return i=i.delete(o),this.referenceDelegate.markPotentiallyOrphaned(t,r.key)}).next(()=>{this.wr=i})}Mn(t){}containsKey(t,e){const i=new Rr(e,0),r=this.wr.firstAfterOrEqual(i);return K.resolve(e.isEqual(r&&r.key))}performConsistencyCheck(t){return K.resolve()}Cr(t,e){return this.br(t)}br(t){return 0===this.mutationQueue.length?0:t-this.mutationQueue[0].batchId}Sr(t){const e=this.br(t);return e<0||e>=this.mutationQueue.length?null:this.mutationQueue[e]}}class aCe{constructor(t){this.vr=t,this.docs=new ci(Ge.comparator),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,e){const i=e.key,r=this.docs.get(i),o=r?r.size:0,s=this.vr(e);return this.docs=this.docs.insert(i,{document:e.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(t,i.path.popLast())}removeEntry(t){const e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)}getEntry(t,e){const i=this.docs.get(e);return K.resolve(i?i.document.mutableCopy():pi.newInvalidDocument(e))}getEntries(t,e){let i=Xo();return e.forEach(r=>{const o=this.docs.get(r);i=i.insert(r,o?o.document.mutableCopy():pi.newInvalidDocument(r))}),K.resolve(i)}getDocumentsMatchingQuery(t,e,i,r){let o=Xo();const s=e.path,a=new Ge(s.child("")),c=this.docs.getIteratorFrom(a);for(;c.hasNext();){const{key:l,value:{document:d}}=c.getNext();if(!s.isPrefixOf(l.path))break;l.path.length>s.length+1||m2(R9(d),i)<=0||(r.has(d.key)||C_(e,d))&&(o=o.insert(d.key,d.mutableCopy()))}return K.resolve(o)}getAllFromCollectionGroup(t,e,i,r){at()}Fr(t,e){return K.forEach(this.docs,i=>e(i))}newChangeBuffer(t){return new cCe(this)}getSize(t){return K.resolve(this.size)}}class cCe extends eCe{constructor(t){super(),this.ar=t}applyChanges(t){const e=[];return this.changes.forEach((i,r)=>{r.isValidDocument()?e.push(this.ar.addEntry(t,r)):this.ar.removeEntry(i)}),K.waitFor(e)}getFromCache(t,e){return this.ar.getEntry(t,e)}getAllFromCache(t,e){return this.ar.getEntries(t,e)}}class lCe{constructor(t){this.persistence=t,this.Mr=new Zc(e=>Iu(e),x_),this.lastRemoteSnapshotVersion=_t.min(),this.highestTargetId=0,this.Or=0,this.Nr=new G2,this.targetCount=0,this.Lr=Bu.Nn()}forEachTarget(t,e){return this.Mr.forEach((i,r)=>e(r)),K.resolve()}getLastRemoteSnapshotVersion(t){return K.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return K.resolve(this.Or)}allocateTargetId(t){return this.highestTargetId=this.Lr.next(),K.resolve(this.highestTargetId)}setTargetsMetadata(t,e,i){return i&&(this.lastRemoteSnapshotVersion=i),e>this.Or&&(this.Or=e),K.resolve()}qn(t){this.Mr.set(t.target,t);const e=t.targetId;e>this.highestTargetId&&(this.Lr=new Bu(e),this.highestTargetId=e),t.sequenceNumber>this.Or&&(this.Or=t.sequenceNumber)}addTargetData(t,e){return this.qn(e),this.targetCount+=1,K.resolve()}updateTargetData(t,e){return this.qn(e),K.resolve()}removeTargetData(t,e){return this.Mr.delete(e.target),this.Nr.Vr(e.targetId),this.targetCount-=1,K.resolve()}removeTargets(t,e,i){let r=0;const o=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=e&&null===i.get(a.targetId)&&(this.Mr.delete(s),o.push(this.removeMatchingKeysForTargetId(t,a.targetId)),r++)}),K.waitFor(o).next(()=>r)}getTargetCount(t){return K.resolve(this.targetCount)}getTargetData(t,e){const i=this.Mr.get(e)||null;return K.resolve(i)}addMatchingKeys(t,e,i){return this.Nr.dr(e,i),K.resolve()}removeMatchingKeys(t,e,i){this.Nr.Rr(e,i);const r=this.persistence.referenceDelegate,o=[];return r&&e.forEach(s=>{o.push(r.markPotentiallyOrphaned(t,s))}),K.waitFor(o)}removeMatchingKeysForTargetId(t,e){return this.Nr.Vr(e),K.resolve()}getMatchingKeysForTargetId(t,e){const i=this.Nr.gr(e);return K.resolve(i)}containsKey(t,e){return K.resolve(this.Nr.containsKey(e))}}class W2{constructor(t,e){this.Br={},this.overlays={},this.kr=new ys(0),this.qr=!1,this.qr=!0,this.referenceDelegate=t(this),this.Qr=new lCe(this),this.indexManager=new Qwe,this.remoteDocumentCache=new aCe(i=>this.referenceDelegate.Kr(i)),this.serializer=new eH(e),this.$r=new rCe(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let e=this.overlays[t.toKey()];return e||(e=new oCe,this.overlays[t.toKey()]=e),e}getMutationQueue(t,e){let i=this.Br[t.toKey()];return i||(i=new sCe(e,this.referenceDelegate),this.Br[t.toKey()]=i),i}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(t,e,i){Ee("MemoryPersistence","Starting transaction:",t);const r=new dCe(this.kr.next());return this.referenceDelegate.Ur(),i(r).next(o=>this.referenceDelegate.Wr(r).next(()=>o)).toPromise().then(o=>(r.raiseOnCommittedEvent(),o))}Gr(t,e){return K.or(Object.values(this.Br).map(i=>()=>i.containsKey(t,e)))}}class dCe extends R1e{constructor(t){super(),this.currentSequenceNumber=t}}class a1{constructor(t){this.persistence=t,this.zr=new G2,this.jr=null}static Hr(t){return new a1(t)}get Jr(){if(this.jr)return this.jr;throw at()}addReference(t,e,i){return this.zr.addReference(i,e),this.Jr.delete(i.toString()),K.resolve()}removeReference(t,e,i){return this.zr.removeReference(i,e),this.Jr.add(i.toString()),K.resolve()}markPotentiallyOrphaned(t,e){return this.Jr.add(e.toString()),K.resolve()}removeTarget(t,e){this.zr.Vr(e.targetId).forEach(r=>this.Jr.add(r.toString()));const i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(t,e.targetId).next(r=>{r.forEach(o=>this.Jr.add(o.toString()))}).next(()=>i.removeTargetData(t,e))}Ur(){this.jr=new Set}Wr(t){const e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return K.forEach(this.Jr,i=>{const r=Ge.fromPath(i);return this.Yr(t,r).next(o=>{o||e.removeEntry(r,_t.min())})}).next(()=>(this.jr=null,e.apply(t)))}updateLimboDocument(t,e){return this.Yr(t,e).next(i=>{i?this.Jr.delete(e.toString()):this.Jr.add(e.toString())})}Kr(t){return 0}Yr(t,e){return K.or([()=>K.resolve(this.zr.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(t,e),()=>this.persistence.Gr(t,e)])}}class X2{constructor(t,e,i,r){this.targetId=t,this.fromCache=e,this.qi=i,this.Qi=r}static Ki(t,e){let i=Kt(),r=Kt();for(const o of e.docChanges)switch(o.type){case 0:i=i.add(o.doc.key);break;case 1:r=r.add(o.doc.key)}return new X2(t,e.fromCache,i,r)}}class hCe{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(t){this._documentReadCount+=t}}class AH{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function Zve(){return!function Yve(){var n;const t=null===(n=sx())||void 0===n?void 0:n.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}()?8:zs.v(Yl())>0?6:4}initialize(t,e){this.zi=t,this.indexManager=e,this.$i=!0}getDocumentsMatchingQuery(t,e,i,r){const o={result:null};return this.ji(t,e).next(s=>{o.result=s}).next(()=>{if(!o.result)return this.Hi(t,e,r,i).next(s=>{o.result=s})}).next(()=>{if(o.result)return;const s=new hCe;return this.Ji(t,e,s).next(a=>{if(o.result=a,this.Ui)return this.Yi(t,e,s,a.size)})}).next(()=>o.result)}Yi(t,e,i,r){return i.documentReadCountthis.Gi*r?(Xf()<=En.DEBUG&&Ee("QueryEngine","The SDK decides to create cache indexes for query:",om(e),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(t,No(e))):K.resolve())}ji(t,e){if(uU(e))return K.resolve(null);let i=No(e);return this.indexManager.getIndexType(t,i).next(r=>0===r?null:(null!==e.limit&&1===r&&(e=qx(e,null,"F"),i=No(e)),this.indexManager.getDocumentsMatchingTarget(t,i).next(o=>{const s=Kt(...o);return this.zi.getDocuments(t,s).next(a=>this.indexManager.getMinOffset(t,i).next(c=>{const l=this.Zi(e,a);return this.Xi(e,l,s,c.readTime)?this.ji(t,qx(e,null,"F")):this.es(t,l,e,c)}))})))}Hi(t,e,i,r){return uU(e)||r.isEqual(_t.min())?K.resolve(null):this.zi.getDocuments(t,i).next(o=>{const s=this.Zi(e,o);return this.Xi(e,s,i,r)?K.resolve(null):(Xf()<=En.DEBUG&&Ee("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),om(e)),this.es(t,s,e,function M9(n,t){const e=n.toTimestamp().seconds,i=n.toTimestamp().nanoseconds+1,r=_t.fromTimestamp(1e9===i?new _i(e+1,0):new _i(e,i));return new vs(r,Ge.empty(),t)}(r,-1)).next(a=>a))})}Zi(t,e){let i=new ei(pU(t));return e.forEach((r,o)=>{C_(t,o)&&(i=i.add(o))}),i}Xi(t,e,i,r){if(null===t.limit)return!1;if(i.size!==e.size)return!0;const o="F"===t.limitType?e.last():e.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(r)>0)}Ji(t,e,i){return Xf()<=En.DEBUG&&Ee("QueryEngine","Using full collection scan to execute query:",om(e)),this.zi.getDocumentsMatchingQuery(t,e,vs.min(),i)}es(t,e,i,r){return this.zi.getDocumentsMatchingQuery(t,i,r).next(o=>(e.forEach(s=>{o=o.insert(s.key,s)}),o))}}class fCe{constructor(t,e,i,r){this.persistence=t,this.ts=e,this.serializer=r,this.ns=new ci(Ot),this.rs=new Zc(o=>Iu(o),x_),this.ss=new Map,this.os=t.getRemoteDocumentCache(),this.Qr=t.getTargetCache(),this.$r=t.getBundleCache(),this._s(i)}_s(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new SH(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",e=>t.collect(e,this.ns))}}function MH(n,t){return Y2.apply(this,arguments)}function Y2(){return Y2=xe(function*(n,t){const e=je(n);return yield e.persistence.runTransaction("Handle user change","readonly",i=>{let r;return e.mutationQueue.getAllMutationBatches(i).next(o=>(r=o,e._s(t),e.mutationQueue.getAllMutationBatches(i))).next(o=>{const s=[],a=[];let c=Kt();for(const l of r){s.push(l.batchId);for(const d of l.mutations)c=c.add(d.key)}for(const l of o){a.push(l.batchId);for(const d of l.mutations)c=c.add(d.key)}return e.localDocuments.getDocuments(i,c).next(l=>({us:l,removedBatchIds:s,addedBatchIds:a}))})})}),Y2.apply(this,arguments)}function RH(n){const t=je(n);return t.persistence.runTransaction("Get last remote snapshot version","readonly",e=>t.Qr.getLastRemoteSnapshotVersion(e))}function gCe(n,t){const e=je(n);return e.persistence.runTransaction("Get next mutation batch","readonly",i=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(i,t)))}function _m(n,t,e){return Z2.apply(this,arguments)}function Z2(){return Z2=xe(function*(n,t,e){const i=je(n),r=i.ns.get(t),o=e?"readwrite":"readwrite-primary";try{e||(yield i.persistence.runTransaction("Release target",o,s=>i.persistence.referenceDelegate.removeTarget(s,r)))}catch(s){if(!id(s))throw s;Ee("LocalStore",`Failed to update sequence numbers for target ${t}: ${s}`)}i.ns=i.ns.remove(t),i.rs.delete(r.target)}),Z2.apply(this,arguments)}function d1(n,t,e){const i=je(n);let r=_t.min(),o=Kt();return i.persistence.runTransaction("Execute query","readwrite",s=>function(c,l,d){const u=je(c),h=u.rs.get(d);return void 0!==h?K.resolve(u.ns.get(h)):u.Qr.getTargetData(l,d)}(i,s,No(t)).next(a=>{if(a)return r=a.lastLimboFreeSnapshotVersion,i.Qr.getMatchingKeysForTargetId(s,a.targetId).next(c=>{o=c})}).next(()=>i.ts.getDocumentsMatchingQuery(s,t,e?r:_t.min(),e?o:Kt())).next(a=>(function NH(n,t,e){let i=n.ss.get(t)||_t.min();e.forEach((r,o)=>{o.readTime.compareTo(i)>0&&(i=o.readTime)}),n.ss.set(t,i)}(i,function mU(n){return n.collectionGroup||(n.path.length%2==1?n.path.lastSegment():n.path.get(n.path.length-2))}(t),a),{documents:a,hs:o})))}class iA{constructor(){this.activeTargetIds=function T2(){return _we}()}As(t){this.activeTargetIds=this.activeTargetIds.add(t)}Rs(t){this.activeTargetIds=this.activeTargetIds.delete(t)}ds(){const t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}}class VH{constructor(){this.no=new iA,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,e,i){}addLocalQueryTarget(t){return this.no.As(t),this.ro[t]||"not-current"}updateQueryState(t,e,i){this.ro[t]=e}removeLocalQueryTarget(t){this.no.Rs(t)}isLocalQueryTarget(t){return this.no.activeTargetIds.has(t)}clearQueryState(t){delete this.ro[t]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(t){return this.no.activeTargetIds.has(t)}start(){return this.no=new iA,Promise.resolve()}handleUserChange(t,e,i){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}}class vCe{io(t){}shutdown(){}}class UH{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(t){this.uo.push(t)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Ee("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const t of this.uo)t(0)}ao(){Ee("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const t of this.uo)t(1)}static D(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let f1=null;function oA(){return null===f1?f1=268435456+Math.round(2147483648*Math.random()):f1++,"0x"+f1.toString(16)}const yCe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class xCe{constructor(t){this.lo=t.lo,this.ho=t.ho}Po(t){this.Io=t}To(t){this.Eo=t}onMessage(t){this.Ao=t}close(){this.ho()}send(t){this.lo(t)}Ro(){this.Io()}Vo(t){this.Eo(t)}mo(t){this.Ao(t)}}const mo="WebChannelConnection";class wCe extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const i=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.fo=i+"://"+e.host,this.po=`projects/${r}/databases/${o}`,this.yo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${o}`}get wo(){return!1}So(e,i,r,o,s){const a=oA(),c=this.bo(e,i.toUriEncodedString());Ee("RestConnection",`Sending RPC '${e}' ${a}:`,c,r);const l={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(l,o,s),this.Co(e,c,l,r).then(d=>(Ee("RestConnection",`Received RPC '${e}' ${a}: `,d),d),d=>{throw bs("RestConnection",`RPC '${e}' ${a} failed with error: `,d,"url: ",c,"request:",r),d})}vo(e,i,r,o,s,a){return this.So(e,i,r,o,s)}Do(e,i,r){e["X-Goog-Api-Client"]="gl-js/ fire/"+Kf,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),i&&i.headers.forEach((o,s)=>e[s]=o),r&&r.headers.forEach((o,s)=>e[s]=o)}bo(e,i){return`${this.fo}/v1/${i}:${yCe[e]}`}terminate(){}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}Co(t,e,i,r){const o=oA();return new Promise((s,a)=>{const c=new y1e;c.setWithCredentials(!0),c.listenOnce(b1e.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case u2.NO_ERROR:const d=c.getResponseJson();Ee(mo,`XHR for RPC '${t}' ${o} received:`,JSON.stringify(d)),s(d);break;case u2.TIMEOUT:Ee(mo,`RPC '${t}' ${o} timed out`),a(new Te(oe.DEADLINE_EXCEEDED,"Request time out"));break;case u2.HTTP_ERROR:const u=c.getStatus();if(Ee(mo,`RPC '${t}' ${o} failed with status:`,u,"response text:",c.getResponseText()),u>0){let h=c.getResponseJson();Array.isArray(h)&&(h=h[0]);const f=h?.error;if(f&&f.status&&f.message){const m=function(p){const b=p.toLowerCase().replace(/_/g,"-");return Object.values(oe).indexOf(b)>=0?b:oe.UNKNOWN}(f.status);a(new Te(m,f.message))}else a(new Te(oe.UNKNOWN,"Server responded with status "+c.getStatus()))}else a(new Te(oe.UNAVAILABLE,"Connection failed."));break;default:at()}}finally{Ee(mo,`RPC '${t}' ${o} completed.`)}});const l=JSON.stringify(r);Ee(mo,`RPC '${t}' ${o} sending request:`,r),c.send(e,"POST",l,i,15)})}Fo(t,e,i){const r=oA(),o=[this.fo,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=g1e(),a=_1e(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(c.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(c.useFetchStreams=!0),this.Do(c.initMessageHeaders,e,i),c.encodeInitMessageHeaders=!0;const d=o.join("");Ee(mo,`Creating RPC '${t}' stream ${r}: ${d}`,c);const u=s.createWebChannel(d,c);let h=!1,f=!1;const m=new xCe({lo:p=>{f?Ee(mo,`Not sending because RPC '${t}' stream ${r} is closed:`,p):(h||(Ee(mo,`Opening RPC '${t}' stream ${r} transport.`),u.open(),h=!0),Ee(mo,`RPC '${t}' stream ${r} sending:`,p),u.send(p))},ho:()=>u.close()}),g=(p,b,k)=>{p.listen(b,w=>{try{k(w)}catch(D){setTimeout(()=>{throw D},0)}})};return g(u,Nx.EventType.OPEN,()=>{f||Ee(mo,`RPC '${t}' stream ${r} transport opened.`)}),g(u,Nx.EventType.CLOSE,()=>{f||(f=!0,Ee(mo,`RPC '${t}' stream ${r} transport closed`),m.Vo())}),g(u,Nx.EventType.ERROR,p=>{f||(f=!0,bs(mo,`RPC '${t}' stream ${r} transport errored:`,p),m.Vo(new Te(oe.UNAVAILABLE,"The operation could not be completed")))}),g(u,Nx.EventType.MESSAGE,p=>{var b;if(!f){const k=p.data[0];ft(!!k);const D=k.error||(null===(b=k[0])||void 0===b?void 0:b.error);if(D){Ee(mo,`RPC '${t}' stream ${r} received error:`,D);const j=D.status;let P=function(V){const q=ir[V];if(void 0!==q)return FU(q)}(j),S=D.message;void 0===P&&(P=oe.INTERNAL,S="Unknown error status: "+j+" with message "+D.message),f=!0,m.Vo(new Te(P,S)),u.close()}else Ee(mo,`RPC '${t}' stream ${r} received:`,k),m.mo(k)}}),g(a,v1e.STAT_EVENT,p=>{p.stat===E9.PROXY?Ee(mo,`RPC '${t}' stream ${r} detected buffering proxy`):p.stat===E9.NOPROXY&&Ee(mo,`RPC '${t}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{m.Ro()},0),m}}function m1(){return typeof document<"u"?document:null}function U_(n){return new Mwe(n,!0)}class sA{constructor(t,e,i=1e3,r=1.5,o=6e4){this.oi=t,this.timerId=e,this.Mo=i,this.xo=r,this.Oo=o,this.No=0,this.Lo=null,this.Bo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(t){this.cancel();const e=Math.floor(this.No+this.Qo()),i=Math.max(0,Date.now()-this.Bo),r=Math.max(0,e-i);r>0&&Ee("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.No} ms, delay with jitter: ${e} ms, last attempt: ${i} ms ago)`),this.Lo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Bo=Date.now(),t())),this.No*=this.xo,this.Nothis.Oo&&(this.No=this.Oo)}Ko(){null!==this.Lo&&(this.Lo.skipDelay(),this.Lo=null)}cancel(){null!==this.Lo&&(this.Lo.cancel(),this.Lo=null)}Qo(){return(Math.random()-.5)*this.No}}class zH{constructor(t,e,i,r,o,s,a,c){this.oi=t,this.$o=i,this.Uo=r,this.connection=o,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=c,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new sA(t,e)}Ho(){return 1===this.state||5===this.state||this.Jo()}Jo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Yo()}stop(){var t=this;return xe(function*(){t.Ho()&&(yield t.close(0))})()}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&null===this.Go&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(t){this.n_(),this.stream.send(t)}e_(){var t=this;return xe(function*(){if(t.Jo())return t.close(0)})()}n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}close(t,e){var i=this;return xe(function*(){i.n_(),i.r_(),i.jo.cancel(),i.Wo++,4!==t?i.jo.reset():e&&e.code===oe.RESOURCE_EXHAUSTED?(zi(e.toString()),zi("Using maximum backoff delay to prevent overloading the backend."),i.jo.ko()):e&&e.code===oe.UNAUTHENTICATED&&3!==i.state&&(i.authCredentialsProvider.invalidateToken(),i.appCheckCredentialsProvider.invalidateToken()),null!==i.stream&&(i.i_(),i.stream.close(),i.stream=null),i.state=t,yield i.listener.To(e)})()}i_(){}auth(){this.state=1;const t=this.s_(this.Wo),e=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([i,r])=>{this.Wo===e&&this.o_(i,r)},i=>{t(()=>{const r=new Te(oe.UNKNOWN,"Fetching auth token failed: "+i.message);return this.__(r)})})}o_(t,e){const i=this.s_(this.Wo);this.stream=this.a_(t,e),this.stream.Po(()=>{i(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(r=>{i(()=>this.__(r))}),this.stream.onMessage(r=>{i(()=>this.onMessage(r))})}Yo(){var t=this;this.state=5,this.jo.qo(xe(function*(){t.state=0,t.start()}))}__(t){return Ee("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}s_(t){return e=>{this.oi.enqueueAndForget(()=>this.Wo===t?e():(Ee("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class CCe extends zH{constructor(t,e,i,r,o,s){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,i,r,s),this.serializer=o}a_(t,e){return this.connection.Fo("Listen",t,e)}onMessage(t){this.jo.reset();const e=function Pwe(n,t){let e;if("targetChange"in t){const i="NO_CHANGE"===(l=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===l?1:"REMOVE"===l?2:"CURRENT"===l?3:"RESET"===l?4:at(),r=t.targetChange.targetIds||[],o=function(l,d){return l.useProto3Json?(ft(void 0===d||"string"==typeof d),br.fromBase64String(d||"")):(ft(void 0===d||d instanceof Uint8Array),br.fromUint8Array(d||new Uint8Array))}(n,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(l){const d=void 0===l.code?oe.UNKNOWN:FU(l.code);return new Te(d,l.message||"")}(s);e=new BU(i,r,o,a||null)}else if("documentChange"in t){const i=t.documentChange,r=Ja(n,i.document.name),o=ji(i.document.updateTime),s=i.document.createTime?ji(i.document.createTime):_t.min(),a=new Gr({mapValue:{fields:i.document.fields}}),c=pi.newFoundDocument(r,o,s,a);e=new Zx(i.targetIds||[],i.removedTargetIds||[],c.key,c)}else if("documentDelete"in t){const i=t.documentDelete,r=Ja(n,i.document),o=i.readTime?ji(i.readTime):_t.min(),s=pi.newNoDocument(r,o);e=new Zx([],i.removedTargetIds||[],s.key,s)}else if("documentRemove"in t){const i=t.documentRemove,r=Ja(n,i.document);e=new Zx([],i.removedTargetIds||[],r,null)}else{if(!("filter"in t))return at();{const i=t.filter,{count:r=0,unchangedNames:o}=i,s=new Ewe(r,o);e=new LU(i.targetId,s)}}var l;return e}(this.serializer,t),i=function(o){if(!("targetChange"in o))return _t.min();const s=o.targetChange;return s.targetIds&&s.targetIds.length?_t.min():s.readTime?ji(s.readTime):_t.min()}(t);return this.listener.u_(e,i)}c_(t){const e={};e.database=O2(this.serializer),e.addTarget=function(o,s){let a;const c=s.target;if(a=Gx(c)?{documents:KU(o,c)}:{query:L2(o,c).ut},a.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){a.resumeToken=zU(o,s.resumeToken);const l=R2(o,s.expectedCount);null!==l&&(a.expectedCount=l)}else if(s.snapshotVersion.compareTo(_t.min())>0){a.readTime=dm(o,s.snapshotVersion.toTimestamp());const l=R2(o,s.expectedCount);null!==l&&(a.expectedCount=l)}return a}(this.serializer,t);const i=function Nwe(n,t){const e=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return at()}}(t.purpose);return null==e?null:{"goog-listen-tags":e}}(0,t);i&&(e.labels=i),this.t_(e)}l_(t){const e={};e.database=O2(this.serializer),e.removeTarget=t,this.t_(e)}}class kCe extends zH{constructor(t,e,i,r,o,s){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,i,r,s),this.serializer=o,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(t,e){return this.connection.Fo("Write",t,e)}onMessage(t){if(ft(!!t.streamToken),this.lastStreamToken=t.streamToken,this.h_){this.jo.reset();const e=function Owe(n,t){return n&&n.length>0?(ft(void 0!==t),n.map(e=>function(r,o){let s=ji(r.updateTime?r.updateTime:o);return s.isEqual(_t.min())&&(s=ji(o)),new xwe(s,r.transformResults||[])}(e,t))):[]}(t.writeResults,t.commitTime),i=ji(t.commitTime);return this.listener.T_(i,e)}return ft(!t.writeResults||0===t.writeResults.length),this.h_=!0,this.listener.E_()}d_(){const t={};t.database=O2(this.serializer),this.t_(t)}I_(t){const e={streamToken:this.lastStreamToken,writes:t.map(i=>function R_(n,t){let e;if(t instanceof cm)e={update:qU(n,t.key,t.value)};else if(t instanceof lm)e={delete:M_(n,t.key)};else if(t instanceof Jc)e={update:qU(n,t.key,t.data),updateMask:Uwe(t.fieldMask)};else{if(!(t instanceof S2))return at();e={verify:M_(n,t.key)}}return t.fieldTransforms.length>0&&(e.updateTransforms=t.fieldTransforms.map(i=>function(o,s){const a=s.transform;if(a instanceof sm)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Mu)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof Ru)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof am)return{fieldPath:s.field.canonicalString(),increment:a.Ie};throw at()}(0,i))),t.precondition.isNone||(e.currentDocument=void 0!==(o=t.precondition).updateTime?{updateTime:Rwe(n,o.updateTime)}:void 0!==o.exists?{exists:o.exists}:at()),e;var o}(this.serializer,i))};this.t_(e)}}class ECe extends class{}{constructor(t,e,i,r){super(),this.authCredentials=t,this.appCheckCredentials=e,this.connection=i,this.serializer=r,this.A_=!1}R_(){if(this.A_)throw new Te(oe.FAILED_PRECONDITION,"The client has already been terminated.")}So(t,e,i,r){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.So(t,P2(e,i),r,o,s)).catch(o=>{throw"FirebaseError"===o.name?(o.code===oe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Te(oe.UNKNOWN,o.toString())})}vo(t,e,i,r,o){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(t,P2(e,i),r,s,a,o)).catch(s=>{throw"FirebaseError"===s.name?(s.code===oe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Te(oe.UNKNOWN,s.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class SCe{constructor(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){0===this.m_&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(t){"Online"===this.state?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.y_("Offline")))}set(t){this.b_(),this.m_=0,"Online"===t&&(this.g_=!1),this.y_(t)}y_(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}w_(t){const e=`Could not reach Cloud Firestore backend. ${t}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.g_?(zi(e),this.g_=!1):Ee("OnlineStateTracker",e)}b_(){null!==this.f_&&(this.f_.cancel(),this.f_=null)}}class DCe{constructor(t,e,i,r,o){var s=this;this.localStore=t,this.datastore=e,this.asyncQueue=i,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=o,this.M_.io(a=>{i.enqueueAndForget(xe(function*(){var c;md(s)&&(Ee("RemoteStore","Restarting streams for network reachability change."),yield(c=xe(function*(d){const u=je(d);u.v_.add(4),yield bm(u),u.x_.set("Unknown"),u.v_.delete(4),yield H_(u)}),function l(d){return c.apply(this,arguments)})(s))}))}),this.x_=new SCe(i,r)}}function H_(n){return cA.apply(this,arguments)}function cA(){return cA=xe(function*(n){if(md(n))for(const t of n.F_)yield t(!0)}),cA.apply(this,arguments)}function bm(n){return lA.apply(this,arguments)}function lA(){return lA=xe(function*(n){for(const t of n.F_)yield t(!1)}),lA.apply(this,arguments)}function p1(n,t){const e=je(n);e.C_.has(t.targetId)||(e.C_.set(t.targetId,t),hA(e)?uA(e):xm(e).Jo()&&dA(e,t))}function vm(n,t){const e=je(n),i=xm(e);e.C_.delete(t),i.Jo()&&jH(e,t),0===e.C_.size&&(i.Jo()?i.Xo():md(e)&&e.x_.set("Unknown"))}function dA(n,t){if(n.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(_t.min())>0){const e=n.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(e)}xm(n).c_(t)}function jH(n,t){n.O_.Oe(t),xm(n).l_(t)}function uA(n){n.O_=new Swe({getRemoteKeysForTarget:t=>n.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>n.C_.get(t)||null,nt:()=>n.datastore.serializer.databaseId}),xm(n).start(),n.x_.p_()}function hA(n){return md(n)&&!xm(n).Ho()&&n.C_.size>0}function md(n){return 0===je(n).v_.size}function $H(n){n.O_=void 0}function ACe(n){return fA.apply(this,arguments)}function fA(){return fA=xe(function*(n){n.C_.forEach((t,e)=>{dA(n,t)})}),fA.apply(this,arguments)}function ICe(n,t){return mA.apply(this,arguments)}function mA(){return mA=xe(function*(n,t){$H(n),hA(n)?(n.x_.S_(t),uA(n)):n.x_.set("Unknown")}),mA.apply(this,arguments)}function MCe(n,t,e){return pA.apply(this,arguments)}function pA(){return pA=xe(function*(n,t,e){if(n.x_.set("Online"),t instanceof BU&&2===t.state&&t.cause)try{yield(i=xe(function*(o,s){const a=s.cause;for(const c of s.targetIds)o.C_.has(c)&&(yield o.remoteSyncer.rejectListen(c,a),o.C_.delete(c),o.O_.removeTarget(c))}),function r(o,s){return i.apply(this,arguments)})(n,t)}catch(i){Ee("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),i),yield g1(n,i)}else if(t instanceof Zx?n.O_.$e(t):t instanceof LU?n.O_.Je(t):n.O_.Ge(t),!e.isEqual(_t.min()))try{const i=yield RH(n.localStore);e.compareTo(i)>=0&&(yield function(o,s){const a=o.O_.it(s);return a.targetChanges.forEach((c,l)=>{if(c.resumeToken.approximateByteSize()>0){const d=o.C_.get(l);d&&o.C_.set(l,d.withResumeToken(c.resumeToken,s))}}),a.targetMismatches.forEach((c,l)=>{const d=o.C_.get(c);if(!d)return;o.C_.set(c,d.withResumeToken(br.EMPTY_BYTE_STRING,d.snapshotVersion)),jH(o,c);const u=new el(d.target,c,l,d.sequenceNumber);dA(o,u)}),o.remoteSyncer.applyRemoteEvent(a)}(n,e))}catch(i){Ee("RemoteStore","Failed to raise snapshot:",i),yield g1(n,i)}var i}),pA.apply(this,arguments)}function g1(n,t,e){return gA.apply(this,arguments)}function gA(){return gA=xe(function*(n,t,e){if(!id(t))throw t;n.v_.add(1),yield bm(n),n.x_.set("Offline"),e||(e=()=>RH(n.localStore)),n.asyncQueue.enqueueRetryable(xe(function*(){Ee("RemoteStore","Retrying IndexedDB access"),yield e(),n.v_.delete(1),yield H_(n)}))}),gA.apply(this,arguments)}function GH(n,t){return t().catch(e=>g1(n,e,t))}function ym(n){return _A.apply(this,arguments)}function _A(){return _A=xe(function*(n){const t=je(n),e=pd(t);let i=t.D_.length>0?t.D_[t.D_.length-1].batchId:-1;for(;RCe(t);)try{const r=yield gCe(t.localStore,i);if(null===r){0===t.D_.length&&e.Xo();break}i=r.batchId,FCe(t,r)}catch(r){yield g1(t,r)}WH(t)&&qH(t)}),_A.apply(this,arguments)}function RCe(n){return md(n)&&n.D_.length<10}function FCe(n,t){n.D_.push(t);const e=pd(n);e.Jo()&&e.P_&&e.I_(t.mutations)}function WH(n){return md(n)&&!pd(n).Ho()&&n.D_.length>0}function qH(n){pd(n).start()}function PCe(n){return bA.apply(this,arguments)}function bA(){return bA=xe(function*(n){pd(n).d_()}),bA.apply(this,arguments)}function OCe(n){return vA.apply(this,arguments)}function vA(){return vA=xe(function*(n){const t=pd(n);for(const e of n.D_)t.I_(e.mutations)}),vA.apply(this,arguments)}function NCe(n,t,e){return yA.apply(this,arguments)}function yA(){return yA=xe(function*(n,t,e){const i=n.D_.shift(),r=A2.from(i,t,e);yield GH(n,()=>n.remoteSyncer.applySuccessfulWrite(r)),yield ym(n)}),yA.apply(this,arguments)}function LCe(n,t){return xA.apply(this,arguments)}function xA(){return xA=xe(function*(n,t){var e;t&&pd(n).P_&&(yield(e=xe(function*(r,o){if(function RU(n){switch(n){default:return at();case oe.CANCELLED:case oe.UNKNOWN:case oe.DEADLINE_EXCEEDED:case oe.RESOURCE_EXHAUSTED:case oe.INTERNAL:case oe.UNAVAILABLE:case oe.UNAUTHENTICATED:return!1;case oe.INVALID_ARGUMENT:case oe.NOT_FOUND:case oe.ALREADY_EXISTS:case oe.PERMISSION_DENIED:case oe.FAILED_PRECONDITION:case oe.ABORTED:case oe.OUT_OF_RANGE:case oe.UNIMPLEMENTED:case oe.DATA_LOSS:return!0}}(a=o.code)&&a!==oe.ABORTED){const s=r.D_.shift();pd(r).Zo(),yield GH(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,o)),yield ym(r)}var a}),function i(r,o){return e.apply(this,arguments)})(n,t)),WH(n)&&qH(n)}),xA.apply(this,arguments)}function QH(n,t){return wA.apply(this,arguments)}function wA(){return wA=xe(function*(n,t){const e=je(n);e.asyncQueue.verifyOperationInProgress(),Ee("RemoteStore","RemoteStore received new credentials");const i=md(e);e.v_.add(3),yield bm(e),i&&e.x_.set("Unknown"),yield e.remoteSyncer.handleCredentialChange(t),e.v_.delete(3),yield H_(e)}),wA.apply(this,arguments)}function kA(){return kA=xe(function*(n,t){const e=je(n);t?(e.v_.delete(2),yield H_(e)):t||(e.v_.add(2),yield bm(e),e.x_.set("Unknown"))}),kA.apply(this,arguments)}function xm(n){return n.N_||(n.N_=function(e,i,r){const o=je(e);return o.R_(),new CCe(i,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(n.datastore,n.asyncQueue,{Po:ACe.bind(null,n),To:ICe.bind(null,n),u_:MCe.bind(null,n)}),n.F_.push(function(){var t=xe(function*(e){e?(n.N_.Zo(),hA(n)?uA(n):n.x_.set("Unknown")):(yield n.N_.stop(),$H(n))});return function(e){return t.apply(this,arguments)}}())),n.N_}function pd(n){return n.L_||(n.L_=function(e,i,r){const o=je(e);return o.R_(),new kCe(i,o.connection,o.authCredentials,o.appCheckCredentials,o.serializer,r)}(n.datastore,n.asyncQueue,{Po:PCe.bind(null,n),To:LCe.bind(null,n),E_:OCe.bind(null,n),T_:NCe.bind(null,n)}),n.F_.push(function(){var t=xe(function*(e){e?(n.L_.Zo(),yield ym(n)):(yield n.L_.stop(),n.D_.length>0&&(Ee("RemoteStore",`Stopping write stream with ${n.D_.length} pending writes`),n.D_=[]))});return function(e){return t.apply(this,arguments)}}())),n.L_}class EA{constructor(t,e,i,r,o){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=i,this.op=r,this.removalCallback=o,this.deferred=new _r,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(t,e,i,r,o){const s=Date.now()+i,a=new EA(t,e,s,r,o);return a.start(i),a}start(t){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Te(oe.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(t=>this.deferred.resolve(t))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function wm(n,t){if(zi("AsyncQueue",`${t}: ${n}`),id(n))return new Te(oe.UNAVAILABLE,`${t}: ${n}`);throw n}class Cm{constructor(t){this.comparator=t?(e,i)=>t(e,i)||Ge.comparator(e.key,i.key):(e,i)=>Ge.comparator(e.key,i.key),this.keyedMap=k_(),this.sortedSet=new ci(this.comparator)}static emptySet(t){return new Cm(t.comparator)}has(t){return null!=this.keyedMap.get(t)}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal((e,i)=>(t(e),!1))}add(t){const e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))}delete(t){const e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this}isEqual(t){if(!(t instanceof Cm)||this.size!==t.size)return!1;const e=this.sortedSet.getIterator(),i=t.sortedSet.getIterator();for(;e.hasNext();){const r=e.getNext().key,o=i.getNext().key;if(!r.isEqual(o))return!1}return!0}toString(){const t=[];return this.forEach(e=>{t.push(e.toString())}),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"}copy(t,e){const i=new Cm;return i.comparator=this.comparator,i.keyedMap=t,i.sortedSet=e,i}}class KH{constructor(){this.B_=new ci(Ge.comparator)}track(t){const e=t.doc.key,i=this.B_.get(e);i?0!==t.type&&3===i.type?this.B_=this.B_.insert(e,t):3===t.type&&1!==i.type?this.B_=this.B_.insert(e,{type:i.type,doc:t.doc}):2===t.type&&2===i.type?this.B_=this.B_.insert(e,{type:2,doc:t.doc}):2===t.type&&0===i.type?this.B_=this.B_.insert(e,{type:0,doc:t.doc}):1===t.type&&0===i.type?this.B_=this.B_.remove(e):1===t.type&&2===i.type?this.B_=this.B_.insert(e,{type:1,doc:i.doc}):0===t.type&&1===i.type?this.B_=this.B_.insert(e,{type:2,doc:t.doc}):at():this.B_=this.B_.insert(e,t)}k_(){const t=[];return this.B_.inorderTraversal((e,i)=>{t.push(i)}),t}}class km{constructor(t,e,i,r,o,s,a,c,l){this.query=t,this.docs=e,this.oldDocs=i,this.docChanges=r,this.mutatedKeys=o,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=c,this.hasCachedResults=l}static fromInitialDocuments(t,e,i,r,o){const s=[];return e.forEach(a=>{s.push({type:0,doc:a})}),new km(t,e,Cm.emptySet(e),s,i,r,!0,!1,o)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&w_(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const e=this.docChanges,i=t.docChanges;if(e.length!==i.length)return!1;for(let r=0;rt.U_())}}class VCe{constructor(){this.queries=new Zc(t=>fU(t),w_),this.onlineState="Unknown",this.W_=new Set}}function SA(){return SA=xe(function*(n,t){const e=je(n);let i=3;const r=t.query;let o=e.queries.get(r);o?!o.K_()&&t.U_()&&(i=2):(o=new BCe,i=t.U_()?0:1);try{switch(i){case 0:o.q_=yield e.onListen(r,!0);break;case 1:o.q_=yield e.onListen(r,!1);break;case 2:yield e.onFirstRemoteStoreListen(r)}}catch(s){const a=wm(s,`Initialization of query '${om(t.query)}' failed`);return void t.onError(a)}e.queries.set(r,o),o.Q_.push(t),t.G_(e.onlineState),o.q_&&t.z_(o.q_)&&IA(e)}),SA.apply(this,arguments)}function AA(){return AA=xe(function*(n,t){const e=je(n),i=t.query;let r=3;const o=e.queries.get(i);if(o){const s=o.Q_.indexOf(t);s>=0&&(o.Q_.splice(s,1),0===o.Q_.length?r=t.U_()?0:1:!o.K_()&&t.U_()&&(r=2))}switch(r){case 0:return e.queries.delete(i),e.onUnlisten(i,!0);case 1:return e.queries.delete(i),e.onUnlisten(i,!1);case 2:return e.onLastRemoteStoreUnlisten(i);default:return}}),AA.apply(this,arguments)}function UCe(n,t){const e=je(n);let i=!1;for(const r of t){const s=e.queries.get(r.query);if(s){for(const a of s.Q_)a.z_(r)&&(i=!0);s.q_=r}}i&&IA(e)}function HCe(n,t,e){const i=je(n),r=i.queries.get(t);if(r)for(const o of r.Q_)o.onError(e);i.queries.delete(t)}function IA(n){n.W_.forEach(t=>{t.next()})}var MA,XH;(XH=MA||(MA={})).j_="default",XH.Cache="cache";class RA{constructor(t,e,i){this.query=t,this.H_=e,this.J_=!1,this.Y_=null,this.onlineState="Unknown",this.options=i||{}}z_(t){if(!this.options.includeMetadataChanges){const i=[];for(const r of t.docChanges)3!==r.type&&i.push(r);t=new km(t.query,t.docs,t.oldDocs,i,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let e=!1;return this.J_?this.Z_(t)&&(this.H_.next(t),e=!0):this.X_(t,this.onlineState)&&(this.ea(t),e=!0),this.Y_=t,e}onError(t){this.H_.error(t)}G_(t){this.onlineState=t;let e=!1;return this.Y_&&!this.J_&&this.X_(this.Y_,t)&&(this.ea(this.Y_),e=!0),e}X_(t,e){return!t.fromCache||!this.U_()||(!this.options.ta||!("Offline"!==e))&&(!t.docs.isEmpty()||t.hasCachedResults||"Offline"===e)}Z_(t){return t.docChanges.length>0||!!(t.syncStateChanged||this.Y_&&this.Y_.hasPendingWrites!==t.hasPendingWrites)&&!0===this.options.includeMetadataChanges}ea(t){t=km.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.J_=!0,this.H_.next(t)}U_(){return this.options.source!==MA.Cache}}class JH{constructor(t){this.key=t}}class ez{constructor(t){this.key=t}}class tz{constructor(t,e){this.query=t,this.ua=e,this.ca=null,this.hasCachedResults=!1,this.current=!1,this.la=Kt(),this.mutatedKeys=Kt(),this.ha=pU(t),this.Pa=new Cm(this.ha)}get Ia(){return this.ua}Ta(t,e){const i=e?e.Ea:new KH,r=e?e.Pa:this.Pa;let o=e?e.mutatedKeys:this.mutatedKeys,s=r,a=!1;const c="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(t.inorderTraversal((d,u)=>{const h=r.get(d),f=C_(this.query,u)?u:null,m=!!h&&this.mutatedKeys.has(h.key),g=!!f&&(f.hasLocalMutations||this.mutatedKeys.has(f.key)&&f.hasCommittedMutations);let p=!1;h&&f?h.data.isEqual(f.data)?m!==g&&(i.track({type:3,doc:f}),p=!0):this.da(h,f)||(i.track({type:2,doc:f}),p=!0,(c&&this.ha(f,c)>0||l&&this.ha(f,l)<0)&&(a=!0)):!h&&f?(i.track({type:0,doc:f}),p=!0):h&&!f&&(i.track({type:1,doc:h}),p=!0,(c||l)&&(a=!0)),p&&(f?(s=s.add(f),o=g?o.add(d):o.delete(d)):(s=s.delete(d),o=o.delete(d)))}),null!==this.query.limit)for(;s.size>this.query.limit;){const d="F"===this.query.limitType?s.last():s.first();s=s.delete(d.key),o=o.delete(d.key),i.track({type:1,doc:d})}return{Pa:s,Ea:i,Xi:a,mutatedKeys:o}}da(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(t,e,i,r){const o=this.Pa;this.Pa=t.Pa,this.mutatedKeys=t.mutatedKeys;const s=t.Ea.k_();s.sort((d,u)=>function(f,m){const g=p=>{switch(p){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return at()}};return g(f)-g(m)}(d.type,u.type)||this.ha(d.doc,u.doc)),this.Aa(i),r=null!=r&&r;const a=e&&!r?this.Ra():[],c=0===this.la.size&&this.current&&!r?1:0,l=c!==this.ca;return this.ca=c,0!==s.length||l?{snapshot:new km(this.query,t.Pa,o,s,t.mutatedKeys,0===c,l,!1,!!i&&i.resumeToken.approximateByteSize()>0),Va:a}:{Va:a}}G_(t){return this.current&&"Offline"===t?(this.current=!1,this.applyChanges({Pa:this.Pa,Ea:new KH,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{Va:[]}}ma(t){return!this.ua.has(t)&&!!this.Pa.has(t)&&!this.Pa.get(t).hasLocalMutations}Aa(t){t&&(t.addedDocuments.forEach(e=>this.ua=this.ua.add(e)),t.modifiedDocuments.forEach(e=>{}),t.removedDocuments.forEach(e=>this.ua=this.ua.delete(e)),this.current=t.current)}Ra(){if(!this.current)return[];const t=this.la;this.la=Kt(),this.Pa.forEach(i=>{this.ma(i.key)&&(this.la=this.la.add(i.key))});const e=[];return t.forEach(i=>{this.la.has(i)||e.push(new ez(i))}),this.la.forEach(i=>{t.has(i)||e.push(new JH(i))}),e}fa(t){this.ua=t.hs,this.la=Kt();const e=this.Ta(t.documents);return this.applyChanges(e,!0)}ga(){return km.fromInitialDocuments(this.query,this.Pa,this.mutatedKeys,0===this.ca,this.hasCachedResults)}}class $Ce{constructor(t,e,i){this.query=t,this.targetId=e,this.view=i}}class GCe{constructor(t){this.key=t,this.pa=!1}}class WCe{constructor(t,e,i,r,o,s){this.localStore=t,this.remoteStore=e,this.eventManager=i,this.sharedClientState=r,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.ya={},this.wa=new Zc(a=>fU(a),w_),this.Sa=new Map,this.ba=new Set,this.Da=new ci(Ge.comparator),this.Ca=new Map,this.va=new G2,this.Fa={},this.Ma=new Map,this.xa=Bu.Ln(),this.onlineState="Unknown",this.Oa=void 0}get isPrimaryClient(){return!0===this.Oa}}function qCe(n,t){return FA.apply(this,arguments)}function FA(){return FA=xe(function*(n,t,e=!0){const i=_1(n);let r;const o=i.wa.get(t);return o?(i.sharedClientState.addLocalQueryTarget(o.targetId),r=o.view.ga()):r=yield nz(i,t,e,!0),r}),FA.apply(this,arguments)}function QCe(n,t){return PA.apply(this,arguments)}function PA(){return PA=xe(function*(n,t){const e=_1(n);yield nz(e,t,!0,!1)}),PA.apply(this,arguments)}function nz(n,t,e,i){return OA.apply(this,arguments)}function OA(){return OA=xe(function*(n,t,e,i){const r=yield function gm(n,t){const e=je(n);return e.persistence.runTransaction("Allocate target","readwrite",i=>{let r;return e.Qr.getTargetData(i,t).next(o=>o?(r=o,K.resolve(r)):e.Qr.allocateTargetId(i).next(s=>(r=new el(t,s,"TargetPurposeListen",i.currentSequenceNumber),e.Qr.addTargetData(i,r).next(()=>r))))}).then(i=>{const r=e.ns.get(i.targetId);return(null===r||i.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(e.ns=e.ns.insert(i.targetId,i),e.rs.set(t,i.targetId)),i})}(n.localStore,No(t)),o=r.targetId,s=e?n.sharedClientState.addLocalQueryTarget(o):"not-current";let a;return i&&(a=yield function NA(n,t,e,i,r){return LA.apply(this,arguments)}(n,t,o,"current"===s,r.resumeToken)),n.isPrimaryClient&&e&&p1(n.remoteStore,r),a}),OA.apply(this,arguments)}function LA(){return LA=xe(function*(n,t,e,i,r){n.Na=(u,h,f)=>{return(m=xe(function*(p,b,k,w){let D=b.view.Ta(k);D.Xi&&(D=yield d1(p.localStore,b.query,!1).then(({documents:U})=>b.view.Ta(U,D)));const j=w&&w.targetChanges.get(b.targetId),P=w&&null!=w.targetMismatches.get(b.targetId),S=b.view.applyChanges(D,p.isPrimaryClient,j,P);return QA(p,b.targetId,S.Va),S.snapshot}),function g(p,b,k,w){return m.apply(this,arguments)})(n,u,h,f);var m};const o=yield d1(n.localStore,t,!0),s=new tz(t,o.hs),a=s.Ta(o.documents),c=I_.createSynthesizedTargetChangeForCurrentChange(e,i&&"Offline"!==n.onlineState,r),l=s.applyChanges(a,n.isPrimaryClient,c);QA(n,e,l.Va);const d=new $Ce(t,e,s);return n.wa.set(t,d),n.Sa.has(e)?n.Sa.get(e).push(t):n.Sa.set(e,[t]),l.snapshot}),LA.apply(this,arguments)}function KCe(n,t,e){return BA.apply(this,arguments)}function BA(){return BA=xe(function*(n,t,e){const i=je(n),r=i.wa.get(t),o=i.Sa.get(r.targetId);if(o.length>1)return i.Sa.set(r.targetId,o.filter(s=>!w_(s,t))),void i.wa.delete(t);i.isPrimaryClient?(i.sharedClientState.removeLocalQueryTarget(r.targetId),i.sharedClientState.isActiveQueryTarget(r.targetId)||(yield _m(i.localStore,r.targetId,!1).then(()=>{i.sharedClientState.clearQueryState(r.targetId),e&&vm(i.remoteStore,r.targetId),Em(i,r.targetId)}).catch(nd))):(Em(i,r.targetId),yield _m(i.localStore,r.targetId,!0))}),BA.apply(this,arguments)}function XCe(n,t){return VA.apply(this,arguments)}function VA(){return VA=xe(function*(n,t){const e=je(n),i=e.wa.get(t),r=e.Sa.get(i.targetId);e.isPrimaryClient&&1===r.length&&(e.sharedClientState.removeLocalQueryTarget(i.targetId),vm(e.remoteStore,i.targetId))}),VA.apply(this,arguments)}function UA(){return UA=xe(function*(n,t,e){const i=function oI(n){const t=je(n);return t.remoteStore.remoteSyncer.applySuccessfulWrite=JCe.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=eke.bind(null,t),t}(n);try{const r=yield function(s,a){const c=je(s),l=_i.now(),d=a.reduce((f,m)=>f.add(m.key),Kt());let u,h;return c.persistence.runTransaction("Locally write mutations","readwrite",f=>{let m=Xo(),g=Kt();return c.os.getEntries(f,d).next(p=>{m=p,m.forEach((b,k)=>{k.isValidDocument()||(g=g.add(b))})}).next(()=>c.localDocuments.getOverlayedDocuments(f,m)).next(p=>{u=p;const b=[];for(const k of a){const w=Cwe(k,u.get(k.key).overlayedDocument);null!=w&&b.push(new Jc(k.key,w,Z9(w.value.mapValue),vi.exists(!0)))}return c.mutationQueue.addMutationBatch(f,l,b,a)}).next(p=>{h=p;const b=p.applyToLocalDocumentSet(u,g);return c.documentOverlayCache.saveOverlays(f,p.batchId,b)})}).then(()=>({batchId:h.batchId,changes:_U(u)}))}(i.localStore,t);i.sharedClientState.addPendingMutation(r.batchId),function(s,a,c){let l=s.Fa[s.currentUser.toKey()];l||(l=new ci(Ot)),l=l.insert(a,c),s.Fa[s.currentUser.toKey()]=l}(i,r.batchId,e),yield tl(i,r.changes),yield ym(i.remoteStore)}catch(r){const o=wm(r,"Failed to persist write");e.reject(o)}}),UA.apply(this,arguments)}function iz(n,t){return HA.apply(this,arguments)}function HA(){return HA=xe(function*(n,t){const e=je(n);try{const i=yield function pCe(n,t){const e=je(n),i=t.snapshotVersion;let r=e.ns;return e.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const s=e.os.newChangeBuffer({trackRemovals:!0});r=e.ns;const a=[];t.targetChanges.forEach((d,u)=>{const h=r.get(u);if(!h)return;a.push(e.Qr.removeMatchingKeys(o,d.removedDocuments,u).next(()=>e.Qr.addMatchingKeys(o,d.addedDocuments,u)));let f=h.withSequenceNumber(o.currentSequenceNumber);var g,p,b;null!==t.targetMismatches.get(u)?f=f.withResumeToken(br.EMPTY_BYTE_STRING,_t.min()).withLastLimboFreeSnapshotVersion(_t.min()):d.resumeToken.approximateByteSize()>0&&(f=f.withResumeToken(d.resumeToken,i)),r=r.insert(u,f),p=f,b=d,(0===(g=h).resumeToken.approximateByteSize()||p.snapshotVersion.toMicroseconds()-g.snapshotVersion.toMicroseconds()>=3e8||b.addedDocuments.size+b.modifiedDocuments.size+b.removedDocuments.size>0)&&a.push(e.Qr.updateTargetData(o,f))});let c=Xo(),l=Kt();if(t.documentUpdates.forEach(d=>{t.resolvedLimboDocuments.has(d)&&a.push(e.persistence.referenceDelegate.updateLimboDocument(o,d))}),a.push(function FH(n,t,e){let i=Kt(),r=Kt();return e.forEach(o=>i=i.add(o)),t.getEntries(n,i).next(o=>{let s=Xo();return e.forEach((a,c)=>{const l=o.get(a);c.isFoundDocument()!==l.isFoundDocument()&&(r=r.add(a)),c.isNoDocument()&&c.version.isEqual(_t.min())?(t.removeEntry(a,c.readTime),s=s.insert(a,c)):!l.isValidDocument()||c.version.compareTo(l.version)>0||0===c.version.compareTo(l.version)&&l.hasPendingWrites?(t.addEntry(c),s=s.insert(a,c)):Ee("LocalStore","Ignoring outdated watch update for ",a,". Current version:",l.version," Watch version:",c.version)}),{cs:s,ls:r}})}(o,s,t.documentUpdates).next(d=>{c=d.cs,l=d.ls})),!i.isEqual(_t.min())){const d=e.Qr.getLastRemoteSnapshotVersion(o).next(u=>e.Qr.setTargetsMetadata(o,o.currentSequenceNumber,i));a.push(d)}return K.waitFor(a).next(()=>s.apply(o)).next(()=>e.localDocuments.getLocalViewOfDocuments(o,c,l)).next(()=>c)}).then(o=>(e.ns=r,o))}(e.localStore,t);t.targetChanges.forEach((r,o)=>{const s=e.Ca.get(o);s&&(ft(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?s.pa=!0:r.modifiedDocuments.size>0?ft(s.pa):r.removedDocuments.size>0&&(ft(s.pa),s.pa=!1))}),yield tl(e,i,t)}catch(i){yield nd(i)}}),HA.apply(this,arguments)}function rz(n,t,e){const i=je(n);if(i.isPrimaryClient&&0===e||!i.isPrimaryClient&&1===e){const r=[];i.wa.forEach((o,s)=>{const a=s.view.G_(t);a.snapshot&&r.push(a.snapshot)}),function(s,a){const c=je(s);c.onlineState=a;let l=!1;c.queries.forEach((d,u)=>{for(const h of u.Q_)h.G_(a)&&(l=!0)}),l&&IA(c)}(i.eventManager,t),r.length&&i.ya.u_(r),i.onlineState=t,i.isPrimaryClient&&i.sharedClientState.setOnlineState(t)}}function ZCe(n,t,e){return zA.apply(this,arguments)}function zA(){return zA=xe(function*(n,t,e){const i=je(n);i.sharedClientState.updateQueryState(t,"rejected",e);const r=i.Ca.get(t),o=r&&r.key;if(o){let s=new ci(Ge.comparator);s=s.insert(o,pi.newNoDocument(o,_t.min()));const a=Kt().add(o),c=new A_(_t.min(),new Map,new ci(Ot),s,a);yield iz(i,c),i.Da=i.Da.remove(o),i.Ca.delete(t),KA(i)}else yield _m(i.localStore,t,!1).then(()=>Em(i,t,e)).catch(nd)}),zA.apply(this,arguments)}function JCe(n,t){return jA.apply(this,arguments)}function jA(){return jA=xe(function*(n,t){const e=je(n),i=t.batch.batchId;try{const r=yield function mCe(n,t){const e=je(n);return e.persistence.runTransaction("Acknowledge batch","readwrite-primary",i=>{const r=t.batch.keys(),o=e.os.newChangeBuffer({trackRemovals:!0});return function(a,c,l,d){const u=l.batch,h=u.keys();let f=K.resolve();return h.forEach(m=>{f=f.next(()=>d.getEntry(c,m)).next(g=>{const p=l.docVersions.get(m);ft(null!==p),g.version.compareTo(p)<0&&(u.applyToRemoteDocument(g,l),g.isValidDocument()&&(g.setReadTime(l.commitVersion),d.addEntry(g)))})}),f.next(()=>a.mutationQueue.removeMutationBatch(c,u))}(e,i,t,o).next(()=>o.apply(i)).next(()=>e.mutationQueue.performConsistencyCheck(i)).next(()=>e.documentOverlayCache.removeOverlaysForBatchId(i,r,t.batch.batchId)).next(()=>e.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(i,function(a){let c=Kt();for(let l=0;l0&&(c=c.add(a.batch.mutations[l].key));return c}(t))).next(()=>e.localDocuments.getDocuments(i,r))})}(e.localStore,t);qA(e,i,null),WA(e,i),e.sharedClientState.updateMutationState(i,"acknowledged"),yield tl(e,r)}catch(r){yield nd(r)}}),jA.apply(this,arguments)}function eke(n,t,e){return $A.apply(this,arguments)}function $A(){return $A=xe(function*(n,t,e){const i=je(n);try{const r=yield function(s,a){const c=je(s);return c.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let d;return c.mutationQueue.lookupMutationBatch(l,a).next(u=>(ft(null!==u),d=u.keys(),c.mutationQueue.removeMutationBatch(l,u))).next(()=>c.mutationQueue.performConsistencyCheck(l)).next(()=>c.documentOverlayCache.removeOverlaysForBatchId(l,d,a)).next(()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,d)).next(()=>c.localDocuments.getDocuments(l,d))})}(i.localStore,t);qA(i,t,e),WA(i,t),i.sharedClientState.updateMutationState(t,"rejected",e),yield tl(i,r)}catch(r){yield nd(r)}}),$A.apply(this,arguments)}function WA(n,t){(n.Ma.get(t)||[]).forEach(e=>{e.resolve()}),n.Ma.delete(t)}function qA(n,t,e){const i=je(n);let r=i.Fa[i.currentUser.toKey()];if(r){const o=r.get(t);o&&(e?o.reject(e):o.resolve(),r=r.remove(t)),i.Fa[i.currentUser.toKey()]=r}}function Em(n,t,e=null){n.sharedClientState.removeLocalQueryTarget(t);for(const i of n.Sa.get(t))n.wa.delete(i),e&&n.ya.La(i,e);n.Sa.delete(t),n.isPrimaryClient&&n.va.Vr(t).forEach(i=>{n.va.containsKey(i)||oz(n,i)})}function oz(n,t){n.ba.delete(t.path.canonicalString());const e=n.Da.get(t);null!==e&&(vm(n.remoteStore,e),n.Da=n.Da.remove(t),n.Ca.delete(e),KA(n))}function QA(n,t,e){for(const i of e)i instanceof JH?(n.va.addReference(i.key,t),nke(n,i)):i instanceof ez?(Ee("SyncEngine","Document no longer in limbo: "+i.key),n.va.removeReference(i.key,t),n.va.containsKey(i.key)||oz(n,i.key)):at()}function nke(n,t){const e=t.key,i=e.path.canonicalString();n.Da.get(e)||n.ba.has(i)||(Ee("SyncEngine","New document in limbo: "+e),n.ba.add(i),KA(n))}function KA(n){for(;n.ba.size>0&&n.Da.size{s.push(i.Na(c,t,e).then(l=>{if((l||e)&&i.isPrimaryClient&&i.sharedClientState.updateQueryState(c.targetId,l?.fromCache?"not-current":"current"),l){r.push(l);const d=X2.Ki(c.targetId,l);o.push(d)}}))}),yield Promise.all(s),i.ya.u_(r),yield(a=xe(function*(l,d){const u=je(l);try{yield u.persistence.runTransaction("notifyLocalViewChanges","readwrite",h=>K.forEach(d,f=>K.forEach(f.qi,m=>u.persistence.referenceDelegate.addReference(h,f.targetId,m)).next(()=>K.forEach(f.Qi,m=>u.persistence.referenceDelegate.removeReference(h,f.targetId,m)))))}catch(h){if(!id(h))throw h;Ee("LocalStore","Failed to update sequence numbers: "+h)}for(const h of d){const f=h.targetId;if(!h.fromCache){const m=u.ns.get(f),p=m.withLastLimboFreeSnapshotVersion(m.snapshotVersion);u.ns=u.ns.insert(f,p)}}}),function c(l,d){return a.apply(this,arguments)})(i.localStore,o))}),XA.apply(this,arguments)}function ike(n,t){return YA.apply(this,arguments)}function YA(){return YA=xe(function*(n,t){const e=je(n);if(!e.currentUser.isEqual(t)){Ee("SyncEngine","User change. New user:",t.toKey());const i=yield MH(e.localStore,t);e.currentUser=t,(o=e).Ma.forEach(a=>{a.forEach(c=>{c.reject(new Te(oe.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),o.Ma.clear(),e.sharedClientState.handleUserChange(t,i.removedBatchIds,i.addedBatchIds),yield tl(e,i.us)}var o}),YA.apply(this,arguments)}function rke(n,t){const e=je(n),i=e.Ca.get(t);if(i&&i.pa)return Kt().add(i.key);{let r=Kt();const o=e.Sa.get(t);if(!o)return r;for(const s of o){const a=e.wa.get(s);r=r.unionWith(a.view.Ia)}return r}}function _1(n){const t=je(n);return t.remoteStore.remoteSyncer.applyRemoteEvent=iz.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=rke.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=ZCe.bind(null,t),t.ya.u_=UCe.bind(null,t.eventManager),t.ya.La=HCe.bind(null,t.eventManager),t}class b1{constructor(){this.synchronizeTabs=!1}initialize(t){var e=this;return xe(function*(){e.serializer=U_(t.databaseInfo.databaseId),e.sharedClientState=e.createSharedClientState(t),e.persistence=e.createPersistence(t),yield e.persistence.start(),e.localStore=e.createLocalStore(t),e.gcScheduler=e.createGarbageCollectionScheduler(t,e.localStore),e.indexBackfillerScheduler=e.createIndexBackfillerScheduler(t,e.localStore)})()}createGarbageCollectionScheduler(t,e){return null}createIndexBackfillerScheduler(t,e){return null}createLocalStore(t){return function IH(n,t,e,i){return new fCe(n,t,e,i)}(this.persistence,new AH,t.initialUser,this.serializer)}createPersistence(t){return new W2(a1.Hr,this.serializer)}createSharedClientState(t){return new VH}terminate(){var t=this;return xe(function*(){var e,i;null===(e=t.gcScheduler)||void 0===e||e.stop(),null===(i=t.indexBackfillerScheduler)||void 0===i||i.stop(),t.sharedClientState.shutdown(),yield t.persistence.shutdown()})()}}class Tm{initialize(t,e){var i=this;return xe(function*(){i.localStore||(i.localStore=t.localStore,i.sharedClientState=t.sharedClientState,i.datastore=i.createDatastore(e),i.remoteStore=i.createRemoteStore(e),i.eventManager=i.createEventManager(e),i.syncEngine=i.createSyncEngine(e,!t.synchronizeTabs),i.sharedClientState.onlineStateHandler=r=>rz(i.syncEngine,r,1),i.remoteStore.remoteSyncer.handleCredentialChange=ike.bind(null,i.syncEngine),yield function CA(n,t){return kA.apply(this,arguments)}(i.remoteStore,i.syncEngine.isPrimaryClient))})()}createEventManager(t){return new VCe}createDatastore(t){const e=U_(t.databaseInfo.databaseId),i=new wCe(t.databaseInfo);return new ECe(t.authCredentials,t.appCheckCredentials,i,e)}createRemoteStore(t){return i=this.localStore,r=this.datastore,o=t.asyncQueue,s=e=>rz(this.syncEngine,e,0),a=UH.D()?new UH:new vCe,new DCe(i,r,o,s,a);var i,r,o,s,a}createSyncEngine(t,e){return function(r,o,s,a,c,l,d){const u=new WCe(r,o,s,a,c,l);return d&&(u.Oa=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,e)}terminate(){var t=this;return xe(function*(){var e,i;yield(i=xe(function*(o){const s=je(o);Ee("RemoteStore","RemoteStore shutting down."),s.v_.add(5),yield bm(s),s.M_.shutdown(),s.x_.set("Unknown")}),function r(o){return i.apply(this,arguments)})(t.remoteStore),null===(e=t.datastore)||void 0===e||e.terminate()})()}}class v1{constructor(t){this.observer=t,this.muted=!1}next(t){this.observer.next&&this.qa(this.observer.next,t)}error(t){this.observer.error?this.qa(this.observer.error,t):zi("Uncaught Error in snapshot listener:",t.toString())}Qa(){this.muted=!0}qa(t,e){this.muted||setTimeout(()=>{this.muted||t(e)},0)}}class _ke{constructor(t,e,i,r){var o=this;this.authCredentials=t,this.appCheckCredentials=e,this.asyncQueue=i,this.databaseInfo=r,this.user=Ir.UNAUTHENTICATED,this.clientId=A9.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(i,function(){var s=xe(function*(a){Ee("FirestoreClient","Received user=",a.uid),yield o.authCredentialListener(a),o.user=a});return function(a){return s.apply(this,arguments)}}()),this.appCheckCredentials.start(i,s=>(Ee("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Te(oe.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var t=this;this.asyncQueue.enterRestrictedMode();const e=new _r;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(xe(function*(){try{t._onlineComponents&&(yield t._onlineComponents.terminate()),t._offlineComponents&&(yield t._offlineComponents.terminate()),t.authCredentials.shutdown(),t.appCheckCredentials.shutdown(),e.resolve()}catch(i){const r=wm(i,"Failed to shutdown persistence");e.reject(r)}})),e.promise}}function y1(n,t){return sI.apply(this,arguments)}function sI(){return sI=xe(function*(n,t){n.asyncQueue.verifyOperationInProgress(),Ee("FirestoreClient","Initializing OfflineComponentProvider");const e=n.configuration;yield t.initialize(e);let i=e.initialUser;n.setCredentialChangeListener(function(){var r=xe(function*(o){i.isEqual(o)||(yield MH(t.localStore,o),i=o)});return function(o){return r.apply(this,arguments)}}()),t.persistence.setDatabaseDeletedListener(()=>n.terminate()),n._offlineComponents=t}),sI.apply(this,arguments)}function aI(n,t){return cI.apply(this,arguments)}function cI(){return cI=xe(function*(n,t){n.asyncQueue.verifyOperationInProgress();const e=yield function lI(n){return dI.apply(this,arguments)}(n);Ee("FirestoreClient","Initializing OnlineComponentProvider"),yield t.initialize(e,n.configuration),n.setCredentialChangeListener(i=>QH(t.remoteStore,i)),n.setAppCheckTokenChangeListener((i,r)=>QH(t.remoteStore,r)),n._onlineComponents=t}),cI.apply(this,arguments)}function dI(){return dI=xe(function*(n){if(!n._offlineComponents)if(n._uninitializedComponentsProvider){Ee("FirestoreClient","Using user provided OfflineComponentProvider");try{yield y1(n,n._uninitializedComponentsProvider._offline)}catch(t){const e=t;if(!function uz(n){return"FirebaseError"===n.name?n.code===oe.FAILED_PRECONDITION||n.code===oe.UNIMPLEMENTED:!(typeof DOMException<"u"&&n instanceof DOMException)||22===n.code||20===n.code||11===n.code}(e))throw e;bs("Error using user provided cache. Falling back to memory cache: "+e),yield y1(n,new b1)}}else Ee("FirestoreClient","Using default OfflineComponentProvider"),yield y1(n,new b1);return n._offlineComponents}),dI.apply(this,arguments)}function x1(n){return uI.apply(this,arguments)}function uI(){return uI=xe(function*(n){return n._onlineComponents||(n._uninitializedComponentsProvider?(Ee("FirestoreClient","Using user provided OnlineComponentProvider"),yield aI(n,n._uninitializedComponentsProvider._online)):(Ee("FirestoreClient","Using default OnlineComponentProvider"),yield aI(n,new Tm))),n._onlineComponents}),uI.apply(this,arguments)}function fI(){return fI=xe(function*(n){const t=yield x1(n),e=t.eventManager;return e.onListen=qCe.bind(null,t.syncEngine),e.onUnlisten=KCe.bind(null,t.syncEngine),e.onFirstRemoteStoreListen=QCe.bind(null,t.syncEngine),e.onLastRemoteStoreUnlisten=XCe.bind(null,t.syncEngine),e}),fI.apply(this,arguments)}function gz(n,t,e={}){const i=new _r;return n.asyncQueue.enqueueAndForget(xe(function*(){return function(o,s,a,c,l){const d=new v1({next:h=>{s.enqueueAndForget(()=>function DA(n,t){return AA.apply(this,arguments)}(o,u)),h.fromCache&&"server"===c.source?l.reject(new Te(oe.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(h)},error:h=>l.reject(h)}),u=new RA(a,d,{includeMetadataChanges:!0,ta:!0});return function TA(n,t){return SA.apply(this,arguments)}(o,u)}(yield function Dm(n){return fI.apply(this,arguments)}(n),n.asyncQueue,t,e,i)})),i.promise}function _z(n){const t={};return void 0!==n.timeoutSeconds&&(t.timeoutSeconds=n.timeoutSeconds),t}const bz=new Map;function mI(n,t,e){if(!e)throw new Te(oe.INVALID_ARGUMENT,`Function ${n}() cannot be called with an empty ${t}.`)}function vz(n){if(!Ge.isDocumentKey(n))throw new Te(oe.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${n} has ${n.length}.`)}function yz(n){if(Ge.isDocumentKey(n))throw new Te(oe.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${n} has ${n.length}.`)}function w1(n){if(void 0===n)return"undefined";if(null===n)return"null";if("string"==typeof n)return n.length>20&&(n=`${n.substring(0,20)}...`),JSON.stringify(n);if("number"==typeof n||"boolean"==typeof n)return""+n;if("object"==typeof n){if(n instanceof Array)return"an array";{const t=(i=n).constructor?i.constructor.name:null;return t?`a custom ${t} object`:"an object"}}var i;return"function"==typeof n?"a function":at()}function bn(n,t){if("_delegate"in n&&(n=n._delegate),!(n instanceof t)){if(t.name===n.constructor.name)throw new Te(oe.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const e=w1(n);throw new Te(oe.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${e}`)}}return n}class wz{constructor(t){var e,i;if(void 0===t.host){if(void 0!==t.ssl)throw new Te(oe.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Te(oe.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}(function Dke(n,t,e,i){if(!0===t&&!0===i)throw new Te(oe.INVALID_ARGUMENT,`${n} and ${e} cannot be used together.`)})("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==t.experimentalAutoDetectLongPolling&&!t.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=_z(null!==(i=t.experimentalLongPollingOptions)&&void 0!==i?i:{}),function(o){if(void 0!==o.timeoutSeconds){if(isNaN(o.timeoutSeconds))throw new Te(oe.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (must not be NaN)`);if(o.timeoutSeconds<5)throw new Te(oe.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (minimum allowed value is 5)`);if(o.timeoutSeconds>30)throw new Te(oe.INVALID_ARGUMENT,`invalid long polling timeout: ${o.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===t.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}}class z_{constructor(t,e,i,r){this._authCredentials=t,this._appCheckCredentials=e,this._databaseId=i,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new wz({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Te(oe.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(t){if(this._settingsFrozen)throw new Te(oe.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new wz(t),void 0!==t.credentials&&(this._authCredentials=function(i){if(!i)return new w1e;switch(i.type){case"firstParty":return new T1e(i.sessionIndex||"0",i.iamToken||null,i.authTokenFactory||null);case"provider":return i.client;default:throw new Te(oe.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const i=bz.get(e);i&&(Ee("ComponentProvider","Removing Datastore"),bz.delete(e),i.terminate())}(this),Promise.resolve()}}class Wr{constructor(t,e,i){this.converter=e,this._query=i,this.type="query",this.firestore=t}withConverter(t){return new Wr(this.firestore,t,this._query)}}class $i{constructor(t,e,i){this.converter=e,this._key=i,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ec(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new $i(this.firestore,t,this._key)}}class ec extends Wr{constructor(t,e,i){super(t,e,im(i)),this._path=i,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new $i(this.firestore,null,new Ge(t))}withConverter(t){return new ec(this.firestore,t,this._path)}}function Cz(n,t,...e){if(n=Uf(n),mI("collection","path",t),n instanceof z_){const i=gn.fromString(t,...e);return yz(i),new ec(n,null,i)}{if(!(n instanceof $i||n instanceof ec))throw new Te(oe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=n._path.child(gn.fromString(t,...e));return yz(i),new ec(n.firestore,null,i)}}class Mke{constructor(){this.nu=Promise.resolve(),this.ru=[],this.iu=!1,this.su=[],this.ou=null,this._u=!1,this.au=!1,this.uu=[],this.jo=new sA(this,"async_queue_retry"),this.cu=()=>{const e=m1();e&&Ee("AsyncQueue","Visibility state changed to "+e.visibilityState),this.jo.Ko()};const t=m1();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.cu)}get isShuttingDown(){return this.iu}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.lu(),this.hu(t)}enterRestrictedMode(t){if(!this.iu){this.iu=!0,this.au=t||!1;const e=m1();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.cu)}}enqueue(t){if(this.lu(),this.iu)return new Promise(()=>{});const e=new _r;return this.hu(()=>this.iu&&this.au?Promise.resolve():(t().then(e.resolve,e.reject),e.promise)).then(()=>e.promise)}enqueueRetryable(t){this.enqueueAndForget(()=>(this.ru.push(t),this.Pu()))}Pu(){var t=this;return xe(function*(){if(0!==t.ru.length){try{yield t.ru[0](),t.ru.shift(),t.jo.reset()}catch(e){if(!id(e))throw e;Ee("AsyncQueue","Operation failed with retryable error: "+e)}t.ru.length>0&&t.jo.qo(()=>t.Pu())}})()}hu(t){const e=this.nu.then(()=>(this._u=!0,t().catch(i=>{throw this.ou=i,this._u=!1,zi("INTERNAL UNHANDLED ERROR: ",function(s){let a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+"\n"+s.stack),a}(i)),i}).then(i=>(this._u=!1,i))));return this.nu=e,e}enqueueAfterDelay(t,e,i){this.lu(),this.uu.indexOf(t)>-1&&(e=0);const r=EA.createAndSchedule(this,t,e,i,o=>this.Iu(o));return this.su.push(r),r}lu(){this.ou&&at()}verifyOperationInProgress(){}Tu(){var t=this;return xe(function*(){let e;do{e=t.nu,yield e}while(e!==t.nu)})()}Eu(t){for(const e of this.su)if(e.timerId===t)return!0;return!1}du(t){return this.Tu().then(()=>{this.su.sort((e,i)=>e.targetTimeMs-i.targetTimeMs);for(const e of this.su)if(e.skipDelay(),"all"!==t&&e.timerId===t)break;return this.Tu()})}Au(t){this.uu.push(t)}Iu(t){const e=this.su.indexOf(t);this.su.splice(e,1)}}class li extends z_{constructor(t,e,i,r){super(t,e,i,r),this.type="firestore",this._queue=new Mke,this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||Ez(this),this._firestoreClient.terminate()}}function Fke(n,t){const e="object"==typeof n?n:function sxe(n=cx){const t=yu.get(n);if(!t&&n===cx&&z6())return i7();if(!t)throw qc.create("no-app",{appName:n});return t}(),i="string"==typeof n?n:t||"(default)",r=function n7(n,t){const e=n.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),n.container.getProvider(t)}(e,"firestore").getImmediate({identifier:i});if(!r._initialized){const o=Kve("firestore");o&&function Ake(n,t,e,i={}){var r;const o=(n=bn(n,z_))._getSettings(),s=`${t}:${e}`;if("firestore.googleapis.com"!==o.host&&o.host!==s&&bs("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),n._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),i.mockUserToken){let a,c;if("string"==typeof i.mockUserToken)a=i.mockUserToken,c=Ir.MOCK_USER;else{a=function Xve(n,t){if(n.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const i=t||"demo-project",r=n.iat||0,o=n.sub||n.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const s=Object.assign({iss:`https://securetoken.google.com/${i}`,aud:i,iat:r,exp:r+3600,auth_time:r,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},n);return[ox(JSON.stringify({alg:"none",type:"JWT"})),ox(JSON.stringify(s)),""].join(".")}(i.mockUserToken,null===(r=n._app)||void 0===r?void 0:r.options.projectId);const l=i.mockUserToken.sub||i.mockUserToken.user_id;if(!l)throw new Te(oe.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Ir(l)}n._authCredentials=new C1e(new S9(a,c))}}(r,...o)}return r}function Gi(n){return n._firestoreClient||Ez(n),n._firestoreClient.verifyNotTerminated(),n._firestoreClient}function Ez(n){var t,e,i;const r=n._freezeSettings(),o=(c=(null===(t=n._app)||void 0===t?void 0:t.options.appId)||"",new nwe(n._databaseId,c,n._persistenceKey,(d=r).host,d.ssl,d.experimentalForceLongPolling,d.experimentalAutoDetectLongPolling,_z(d.experimentalLongPollingOptions),d.useFetchStreams));var c,d;n._firestoreClient=new _ke(n._authCredentials,n._appCheckCredentials,n._queue,o),null!==(e=r.localCache)&&void 0!==e&&e._offlineComponentProvider&&null!==(i=r.localCache)&&void 0!==i&&i._onlineComponentProvider&&(n._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}class Uu{constructor(t){this._byteString=t}static fromBase64String(t){try{return new Uu(br.fromBase64String(t))}catch(e){throw new Te(oe.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(t){return new Uu(br.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}}class Am{constructor(...t){for(let e=0;e90)throw new Te(oe.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new Te(oe.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return Ot(this._lat,t._lat)||Ot(this._long,t._long)}}const Oke=/^__.*__$/;class Nke{constructor(t,e,i){this.data=t,this.fieldMask=e,this.fieldTransforms=i}toMutation(t,e){return null!==this.fieldMask?new Jc(t,this.data,this.fieldMask,e,this.fieldTransforms):new cm(t,this.data,e,this.fieldTransforms)}}function Iz(n){switch(n){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw at()}}class C1{constructor(t,e,i,r,o,s){this.settings=t,this.databaseId=e,this.serializer=i,this.ignoreUndefinedProperties=r,void 0===o&&this.Ru(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get Vu(){return this.settings.Vu}mu(t){return new C1(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}fu(t){var e;const i=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.mu({path:i,gu:!1});return r.pu(t),r}yu(t){var e;const i=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.mu({path:i,gu:!1});return r.Ru(),r}wu(t){return this.mu({path:void 0,gu:!0})}Su(t){return E1(t,this.settings.methodName,this.settings.bu||!1,this.path,this.settings.Du)}contains(t){return void 0!==this.fieldMask.find(e=>t.isPrefixOf(e))||void 0!==this.fieldTransforms.find(e=>t.isPrefixOf(e.field))}Ru(){if(this.path)for(let t=0;tc.covers(u.field))}else c=null,l=s.fieldTransforms;return new Nke(new Gr(a),c,l)}function Hu(n,t){if(Nz(n=Uf(n)))return wI("Unsupported field value:",t,n),Oz(n,t);if(n instanceof Dz)return function(i,r){if(!Iz(r.Vu))throw r.Su(`${i._methodName}() can only be used with update() and set()`);if(!r.path)throw r.Su(`${i._methodName}() is not currently supported inside arrays`);const o=i._toFieldTransform(r);o&&r.fieldTransforms.push(o)}(n,t),null;if(void 0===n&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),n instanceof Array){if(t.settings.gu&&4!==t.Vu)throw t.Su("Nested arrays are not supported");return function(i,r){const o=[];let s=0;for(const a of i){let c=Hu(a,r.wu(s));null==c&&(c={nullValue:"NULL_VALUE"}),o.push(c),s++}return{arrayValue:{values:o}}}(n,t)}return function(i,r){if(null===(i=Uf(i)))return{nullValue:"NULL_VALUE"};if("number"==typeof i)return xU(r.serializer,i);if("boolean"==typeof i)return{booleanValue:i};if("string"==typeof i)return{stringValue:i};if(i instanceof Date){const o=_i.fromDate(i);return{timestampValue:dm(r.serializer,o)}}if(i instanceof _i){const o=new _i(i.seconds,1e3*Math.floor(i.nanoseconds/1e3));return{timestampValue:dm(r.serializer,o)}}if(i instanceof gI)return{geoPointValue:{latitude:i.latitude,longitude:i.longitude}};if(i instanceof Uu)return{bytesValue:zU(r.serializer,i._byteString)};if(i instanceof $i){const o=r.databaseId,s=i.firestore._databaseId;if(!s.isEqual(o))throw r.Su(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${o.projectId}/${o.database}`);return{referenceValue:F2(i.firestore._databaseId||r.databaseId,i._key.path)}}throw r.Su(`Unsupported field value: ${w1(i)}`)}(n,t)}function Oz(n,t){const e={};return j9(n)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):rd(n,(i,r)=>{const o=Hu(r,t.fu(i));null!=o&&(e[i]=o)}),{mapValue:{fields:e}}}function Nz(n){return!("object"!=typeof n||null===n||n instanceof Array||n instanceof Date||n instanceof _i||n instanceof gI||n instanceof Uu||n instanceof $i||n instanceof Dz)}function wI(n,t,e){if(!Nz(e)||"object"!=typeof(r=e)||null===r||Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r)){const i=w1(e);throw t.Su("an object"===i?n+" a custom object":n+" "+i)}var r}function G_(n,t,e){if((t=Uf(t))instanceof Am)return t._internalPath;if("string"==typeof t)return k1(n,t);throw E1("Field path arguments must be of type string or ",n,!1,void 0,e)}const Bke=new RegExp("[~\\*/\\[\\]]");function k1(n,t,e){if(t.search(Bke)>=0)throw E1(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,n,!1,void 0,e);try{return new Am(...t.split("."))._internalPath}catch{throw E1(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,n,!1,void 0,e)}}function E1(n,t,e,i,r){const o=i&&!i.isEmpty(),s=void 0!==r;let a=`Function ${t}() called with invalid data`;e&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(o||s)&&(c+=" (found",o&&(c+=` in field ${i}`),s&&(c+=` in document ${r}`),c+=")"),new Te(oe.INVALID_ARGUMENT,a+n+c)}function Lz(n,t){return n.some(e=>e.isEqual(t))}class CI{constructor(t,e,i,r,o){this._firestore=t,this._userDataWriter=e,this._key=i,this._document=r,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new $i(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const t=new Vke(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const e=this._document.data.field(T1("DocumentSnapshot.get",t));if(null!==e)return this._userDataWriter.convertValue(e)}}}class Vke extends CI{data(){return super.data()}}function T1(n,t){return"string"==typeof t?k1(n,t):t instanceof Am?t._internalPath:t._delegate._internalPath}class kI{}class EI extends kI{}class W_ extends EI{constructor(t,e,i){super(),this._field=t,this._op=e,this._value=i,this.type="where"}static _create(t,e,i){return new W_(t,e,i)}_apply(t){const e=this._parse(t);return zz(t._query,e),new Wr(t.firestore,t.converter,E2(t._query,e))}_parse(t){const e=Im(t.firestore);return function(o,s,a,c,l,d,u){let h;if(l.isKeyField()){if("array-contains"===d||"array-contains-any"===d)throw new Te(oe.INVALID_ARGUMENT,`Invalid Query. You can't perform '${d}' queries on documentId().`);if("in"===d||"not-in"===d){Hz(u,d);const f=[];for(const m of u)f.push(Uz(c,o,m));h={arrayValue:{values:f}}}else h=Uz(c,o,u)}else"in"!==d&&"not-in"!==d&&"array-contains-any"!==d||Hz(u,d),h=function Pz(n,t,e,i=!1){return Hu(e,n.Cu(i?4:3,t))}(a,"where",u,"in"===d||"not-in"===d);return _n.create(l,d,h)}(t._query,0,e,t.firestore._databaseId,this._field,this._op,this._value)}}class Mm extends kI{constructor(t,e){super(),this.type=t,this._queryConstraints=e}static _create(t,e){return new Mm(t,e)}_parse(t){const e=this._queryConstraints.map(i=>i._parse(t)).filter(i=>i.getFilters().length>0);return 1===e.length?e[0]:Wn.create(e,this._getOperator())}_apply(t){const e=this._parse(t);return 0===e.getFilters().length?t:(function(r,o){let s=r;const a=o.getFlattenedFilters();for(const c of a)zz(s,c),s=E2(s,c)}(t._query,e),new Wr(t.firestore,t.converter,E2(t._query,e)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class TI extends EI{constructor(t,e){super(),this._field=t,this._direction=e,this.type="orderBy"}static _create(t,e){return new TI(t,e)}_apply(t){const e=function(r,o,s){if(null!==r.startAt)throw new Te(oe.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==r.endAt)throw new Te(oe.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new y_(o,s)}(t._query,this._field,this._direction);return new Wr(t.firestore,t.converter,function(r,o){const s=r.explicitOrderBy.concat([o]);return new Yc(r.path,r.collectionGroup,s,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(t._query,e))}}class S1 extends EI{constructor(t,e,i){super(),this.type=t,this._limit=e,this._limitType=i}static _create(t,e,i){return new S1(t,e,i)}_apply(t){return new Wr(t.firestore,t.converter,qx(t._query,this._limit,this._limitType))}}function Uz(n,t,e){if("string"==typeof(e=Uf(e))){if(""===e)throw new Te(oe.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!k2(t)&&-1!==e.indexOf("/"))throw new Te(oe.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${e}' contains a '/' character.`);const i=t.path.child(gn.fromString(e));if(!Ge.isDocumentKey(i))throw new Te(oe.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${i}' is not because it has an odd number of segments (${i.length}).`);return Au(n,new Ge(i))}if(e instanceof $i)return Au(n,e._key);throw new Te(oe.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${w1(e)}.`)}function Hz(n,t){if(!Array.isArray(n)||0===n.length)throw new Te(oe.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function zz(n,t){const e=function(r,o){for(const s of r)for(const a of s.getFlattenedFilters())if(o.indexOf(a.op)>=0)return a.op;return null}(n.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==e)throw new Te(oe.INVALID_ARGUMENT,e===t.op?`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`:`Invalid query. You cannot use '${t.op.toString()}' filters with '${e.toString()}' filters.`)}class jke{convertValue(t,e="none"){switch(ad(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Fi(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(Xc(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw at()}}convertObject(t,e){return this.convertObjectMap(t.fields,e)}convertObjectMap(t,e="none"){const i={};return rd(t,(r,o)=>{i[r]=this.convertValue(o,e)}),i}convertGeoPoint(t){return new gI(Fi(t.latitude),Fi(t.longitude))}convertArray(t,e){return(t.values||[]).map(i=>this.convertValue(i,e))}convertServerTimestamp(t,e){switch(e){case"previous":const i=Hx(t);return null==i?null:this.convertValue(i,e);case"estimate":return this.convertTimestamp(g_(t));default:return null}}convertTimestamp(t){const e=od(t);return new _i(e.seconds,e.nanos)}convertDocumentKey(t,e){const i=gn.fromString(t);ft(JU(i));const r=new Du(i.get(1),i.get(3)),o=new Ge(i.popFirst(5));return r.isEqual(e)||zi(`Document ${o} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),o}}class zu{constructor(t,e){this.hasPendingWrites=t,this.fromCache=e}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class Rm extends CI{constructor(t,e,i,r,o,s){super(t,e,i,r,s),this._firestore=t,this._firestoreImpl=t,this.metadata=o}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const e=new I1(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,e={}){if(this._document){const i=this._document.data.field(T1("DocumentSnapshot.get",t));if(null!==i)return this._userDataWriter.convertValue(i,e.serverTimestamps)}}}class I1 extends Rm{data(t={}){return super.data(t)}}class Fm{constructor(t,e,i,r){this._firestore=t,this._userDataWriter=e,this._snapshot=r,this.metadata=new zu(r.hasPendingWrites,r.fromCache),this.query=i}get docs(){const t=[];return this.forEach(e=>t.push(e)),t}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(t,e){this._snapshot.docs.forEach(i=>{t.call(e,new I1(this._firestore,this._userDataWriter,i.key,i,new zu(this._snapshot.mutatedKeys.has(i.key),this._snapshot.fromCache),this.query.converter))})}docChanges(t={}){const e=!!t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new Te(oe.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(r,o){if(r._snapshot.oldDocs.isEmpty()){let s=0;return r._snapshot.docChanges.map(a=>({type:"added",doc:new I1(r._firestore,r._userDataWriter,a.doc.key,a.doc,new zu(r._snapshot.mutatedKeys.has(a.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:s++}))}{let s=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(a=>o||3!==a.type).map(a=>{const c=new I1(r._firestore,r._userDataWriter,a.doc.key,a.doc,new zu(r._snapshot.mutatedKeys.has(a.doc.key),r._snapshot.fromCache),r.query.converter);let l=-1,d=-1;return 0!==a.type&&(l=s.indexOf(a.doc.key),s=s.delete(a.doc.key)),1!==a.type&&(s=s.add(a.doc),d=s.indexOf(a.doc.key)),{type:Gke(a.type),doc:c,oldIndex:l,newIndex:d}})}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}function Gke(n){switch(n){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return at()}}class gd extends jke{constructor(t){super(),this.firestore=t}convertBytes(t){return new Uu(t)}convertReference(t){const e=this.convertDocumentKey(t,this.firestore._databaseId);return new $i(this.firestore,null,e)}}function qke(n,t){const e=bn(n.firestore,li),i=function Ike(n,t,...e){if(n=Uf(n),1===arguments.length&&(t=A9.newId()),mI("doc","path",t),n instanceof z_){const i=gn.fromString(t,...e);return vz(i),new $i(n,null,new Ge(i))}{if(!(n instanceof $i||n instanceof ec))throw new Te(oe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=n._path.child(gn.fromString(t,...e));return vz(i),new $i(n.firestore,n instanceof ec?n.converter:null,new Ge(i))}}(n),r=function SI(n,t,e){let i;return i=n?e&&(e.merge||e.mergeFields)?n.toFirestore(t,e):n.toFirestore(t):t,i}(n.converter,t);return function q_(n,t){return function(i,r){const o=new _r;return i.asyncQueue.enqueueAndForget(xe(function*(){return function YCe(n,t,e){return UA.apply(this,arguments)}(yield function hI(n){return x1(n).then(t=>t.syncEngine)}(i),r,o)})),o.promise}(Gi(n),t)}(e,[_I(Im(n.firestore),"addDoc",i._key,r,null!==n.converter,{}).toMutation(i._key,vi.exists(!1))]).then(()=>i)}!function(t,e=!0){Kf="10.9.0",dx(new zg("firestore",(i,{instanceIdentifier:r,options:o})=>{const s=i.getProvider("app").getImmediate(),a=new li(new k1e(i.getProvider("auth-internal")),new S1e(i.getProvider("app-check-internal")),function(l,d){if(!Object.prototype.hasOwnProperty.apply(l.options,["projectId"]))throw new Te(oe.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Du(l.options.projectId,d)}(s,r),s);return o=Object.assign({useFetchStreams:e},o),a._setSettings(o),a},"PUBLIC").setMultipleInstances(!0)),Hf(T9,"4.5.0",t),Hf(T9,"4.5.0","esm2017")}();let sEe=(()=>{class n{constructor(e){this.terminologyService=e,this.goals=[{name:"Bronze",score:100},{name:"Silver",score:200},{name:"Gold",score:300},{name:"Platinum",score:400},{name:"Diamond",score:500}],this.difficultyLevels=[{name:"Easy",rules:{maxHitPoints:5,hitpointsAwardedForGuessingfullTerm:1,freeHints:2,pointsPerGuessedLetter:1,goals:this.goals,difficultyBonus:0}},{name:"Medium",rules:{maxHitPoints:4,hitpointsAwardedForGuessingfullTerm:1,freeHints:1,pointsPerGuessedLetter:2,goals:this.goals,difficultyBonus:50}},{name:"Hard",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100}}],this.rules=this.difficultyLevels[0].rules,this.fsn="",this.scg="",this.focusConcepts=[],this.attributePairs=[],this.usedHints=new Set,this.randomLimit=4e3,this.guessResult=new De,this.termResult=new De,this.game=new Ti(this.initialize())}loadMenu(){this.game.next({...this.game.value,state:"menu"})}getDifficultyLevels(){return this.difficultyLevels}newRound(e){var i=this;return xe(function*(){i.game.next({...i.game.value,state:"choosingTerm",score:e?0:i.game.value.score,hitPoints:e?i.rules.maxHitPoints:i.game.value.hitPoints,round:e?1:i.game.value.round+1});const r=Math.floor(Math.random()*i.randomLimit)+1,o=yield oo(i.terminologyService.expandValueSet("^ 816080008 |International Patient Summary| {{ C definitionStatus = defined }}","",r,1));i.randomLimit=o.expansion.total-1;const s=yield oo(i.terminologyService.lookupConcept(o.expansion.contains[0].code));let a=i.extractFSN(s);i.fsn=a||"";let c=i.extractScg(s);i.scg=c||"";let l=i.extractFocusConcepts(c||"");i.focusConcepts=l||[];let d=i.extractAttributePairs(c||"");i.attributePairs=d||[],a?i.initializeRound(a,e):i.initializeRound("No term found"),i.game.next({...i.game.value,state:"playing"}),i.usedHints.clear()})()}extractFSN(e){let i=this.extractTerm(e,"900000000000003001",this.terminologyService.getLang());return i||(i=this.extractTerm(e,"900000000000013009",this.terminologyService.getLang())),i||(i=this.extractTerm(e,"900000000000003001","en")),i}extractTerm(e,i,r){let o="";return e.parameter.forEach(s=>{if("designation"===s.name){let a=s.part.some(l=>"use"===l.name&&l.valueCoding.code===i),c=s.part.some(l=>"language"===l.name&&l.valueCode===r);a&&c&&(o=s.part.find(l=>"value"===l.name)?.valueString)}}),o}extractScg(e){let i;return e.parameter.forEach(r=>{"property"===r.name&&r.part.some(o=>"code"===o.name&&"normalForm"===o.valueString)&&(i=r.part.find(o=>"valueString"===o.name)?.valueString)}),i}extractFocusConcepts(e){const[i]=e.split(":").map(a=>a.trim()),o=i.match(/\d+\|.*?\|/g);return o?o.map(a=>this.transformSnomedConcept(a.trim())||{code:"",display:""}).filter(a=>""!==a.code):[]}extractAttributePairs(e){const i=e.split(":").slice(1).join(":").trim(),r=/(\d+\|.*?\|)\s*=\s*(\d+\|.*?\|)/g;let o;const s=[];for(;null!==(o=r.exec(i));){const a=this.transformSnomedConcept(o[1].trim()),c=this.transformSnomedConcept(o[2].trim());a&&c&&s.push({type:a,target:c})}return s}transformSnomedConcept(e){const r=e.match(/^(\d+)\|(.+?)\|$/);return r?{code:r[1],display:r[2]}:null}initialize(){return{term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"menu",score:0,round:0,rules:this.rules,difficultyLevel:"",startTimestamp:0,endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0}}startGame(e){this.rules=this.difficultyLevels.find(i=>i.name.toLowerCase()===e.toLocaleLowerCase())?.rules,this.game.next({term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"playing",score:0,round:0,rules:this.rules,difficultyLevel:e,startTimestamp:Date.now(),endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0}),this.newRound(!0)}initializeRound(e,i){const r=e.match(/\(([^)]+)\)$/),o=r?r[0]:"",s=o?e.lastIndexOf(o):e.length,a=e.split("").map((c,l)=>l>=s?c:/[a-zA-Z0-9\xe1-\xfa\xf1]/.test(c)?"_":c);this.game.next({...this.game.value,term:e,displayTerm:a,hitPoints:i?this.rules.maxHitPoints:this.game.value.hitPoints,hints:[],state:"playing",score:i?0:this.game.value.score});for(let c=0;c{athis.goals[this.goals.length-1].score){i.state="won",i.endTimestamp=Date.now(),i.difficultyBonus=this.rules.difficultyBonus,i.livesBonus=10*i.hitPoints;const a=Math.round((i.endTimestamp-i.startTimestamp)/1e3);i.timeBonus=Math.max(0,180-a),i.score+=i.difficultyBonus+i.livesBonus+i.timeBonus}else i.hitPoints=i.hitPoints+this.rules.hitpointsAwardedForGuessingfullTerm,i.hitPoints>this.rules.maxHitPoints&&(i.hitPoints=this.rules.maxHitPoints),setTimeout(()=>{this.newRound()},1500)}else this.guessResult.emit({letter:e,result:!1}),i.hitPoints-=1,i.hitPoints<=0&&(i.hitPoints=0,i.state="gameOver",i.endTimestamp=Date.now());this.game.next(i)}guessTerm(e){return e.toLowerCase()===this.game.value.term.toLowerCase()?(this.termResult.emit(e),this.game.next({...this.game.value,displayTerm:this.game.value.term.split("")}),!0):(this.game.next({...this.game.value,hitPoints:this.game.value.hitPoints-1}),this.game.value.hitPoints<=0&&this.game.next({...this.game.value,hitPoints:0,state:"gameOver"}),!1)}revealHint(e){let i={...this.game.value},r="";if(0===this.focusConcepts.length&&0===this.attributePairs.length)return i.hints.push("No more hints available."),void this.game.next(i);let o=this.focusConcepts.length>0,s=this.attributePairs.length>0;if(o&&s&&(o=Math.random()<.5),o){let a=Math.floor(Math.random()*this.focusConcepts.length);r=`One of the parents of this concept is: ${this.focusConcepts[a].display}`,this.focusConcepts.splice(a,1)}else if(s){let a=Math.floor(Math.random()*this.attributePairs.length),c=this.attributePairs[a];r=`This concept has a ${c.type.display} of ${c.target.display}`,this.attributePairs.splice(a,1)}this.usedHints.add(r),i.hints.push(r),e||(i.hitPoints-=1),i.hintsAvailable=this.focusConcepts.length>0||this.attributePairs.length>0,this.game.next(i),i.hitPoints<=0&&(i.hitPoints=0,i.state="gameOver",this.game.next(i))}getGameState(){return this.game.asObservable()}static#e=this.\u0275fac=function(i){return new(i||n)(Q(Ur))};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),aEe=(()=>{class n{constructor(){this.loadingProgress=new Ti(0)}preloadImages(e){const i=e.map((r,o)=>this.preloadImage(r,e.length,o));return Promise.all(i).then(()=>{this.loadingProgress.next(100)})}preloadImage(e,i,r){return new Promise((o,s)=>{const a=new Image;a.src=e,a.onload=()=>{this.loadingProgress.next((r+1)/i*100),o()},a.onerror=s})}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),qz=(()=>{class n{constructor(){this.db=Fke(),this.scoreLimit=20}addScore(e){var i=this;return xe(function*(){try{yield qke(Cz(i.db,"scoreboard"),e)}catch(r){console.error("Error adding document: ",r)}})()}getScores(){var e=this;return xe(function*(){const r=function Uke(n,t,...e){let i=[];t instanceof kI&&i.push(t),i=i.concat(e),function(o){const s=o.filter(c=>c instanceof Mm).length,a=o.filter(c=>c instanceof W_).length;if(s>1||s>0&&a>0)throw new Te(oe.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(i);for(const r of i)n=r._apply(n);return n}(Cz(e.db,"scoreboard"),function Hke(n,t="asc"){const e=t,i=T1("orderBy",n);return TI._create(i,e)}("score","desc"),function zke(n){return function xz(n,t){if(t<=0)throw new Te(oe.INVALID_ARGUMENT,`Function ${n}() requires a positive number, but it was: ${t}.`)}("limit",n),S1._create("limit",n,"F")}(e.scoreLimit));return(yield function Wke(n){n=bn(n,Wr);const t=bn(n.firestore,li),e=Gi(t),i=new gd(t);return function Bz(n){if("L"===n.limitType&&0===n.explicitOrderBy.length)throw new Te(oe.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(n._query),gz(e,n._query).then(r=>new Fm(t,i,n,r))}(r)).docs.map(s=>({id:s.id,...s.data()}))})()}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function cEe(n,t){if(1&n){const e=Le();_(0,"button",4),z("click",function(){const o=he(e).$implicit;return fe(O(2).guessLetter(o))}),C(1),v()}if(2&n){const e=t.$implicit,i=O(2);ot("guessed-correct","correct"===i.guessedLetters[e])("guessed-wrong","wrong"===i.guessedLetters[e]),E("disabled",i.isLetterGuessed(e)),x(1),Qe(" ",e," ")}}function lEe(n,t){if(1&n&&(_(0,"div",2),A(1,cEe,2,6,"button",3),v()),2&n){const e=t.$implicit;x(1),E("ngForOf",e)}}let dEe=(()=>{class n{constructor(){this.keyboardLayout=[["1","2","3","4","5","6","7","8","9","0"],["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],this.guessedLetters={},this.letterGuessed=new De}addGuessedLetter(e,i){this.guessedLetters[e]=i?"correct":"wrong"}guessLetter(e){this.letterGuessed.emit(e)}isLetterGuessed(e){return e in this.guessedLetters}markLetterAsGuessed(e,i){this.guessedLetters[e]=i}reset(){this.guessedLetters={}}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-keyboard"]],outputs:{letterGuessed:"letterGuessed"},decls:2,vars:1,consts:[[1,"keyboard-container"],["class","keyboard-row",4,"ngFor","ngForOf"],[1,"keyboard-row"],["mat-button","",3,"guessed-correct","guessed-wrong","disabled","click",4,"ngFor","ngForOf"],["mat-button","",3,"disabled","click"]],template:function(i,r){1&i&&(_(0,"div",0),A(1,lEe,2,1,"div",1),v()),2&i&&(x(1),E("ngForOf",r.keyboardLayout))},dependencies:[io,Fo],styles:[".keyboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.keyboard-row[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:5px;flex-wrap:wrap}button[_ngcontent-%COMP%]{margin:2px;padding:8px 6px;border-radius:8px;border:1px solid #000;transition:background-color .3s ease;min-width:40px;flex:1}button.guessed-correct[_ngcontent-%COMP%]{background-color:green;color:#fff}button.guessed-wrong[_ngcontent-%COMP%]{background-color:red;color:#fff}@media (max-width: 768px){.keyboard-row[_ngcontent-%COMP%]{margin:1px 0}.keyboard-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:1px;padding:8px;min-width:0;width:9%;flex:1 1 auto;font-size:14px}}"]})}return n})(),uEe=(()=>{class n{constructor(){this.tooltipDismissedKey="iosSafariTooltipDismissed"}isIosSafari(){return/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/Safari/i.test(window.navigator.userAgent)&&!/CriOS/i.test(window.navigator.userAgent)&&!/FxiOS/i.test(window.navigator.userAgent)}tooltipDismissed(){return"true"===localStorage.getItem(this.tooltipDismissedKey)}dismissTooltip(){localStorage.setItem(this.tooltipDismissedKey,"true")}isRunningStandalone(){return"standalone"in window.navigator&&window.navigator.standalone}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function hEe(n,t){if(1&n){const e=Le();_(0,"div",1)(1,"div",2),C(2," Install this webapp on your iPhone: tap "),_(3,"mat-icon"),C(4,"ios_share"),v(),C(5," and then 'Add to Home Screen' "),v(),_(6,"button",3),z("click",function(){return he(e),fe(O().dismiss())}),_(7,"mat-icon"),C(8,"close"),v()()()}}let fEe=(()=>{class n{constructor(e){this.platformDetectionService=e,this.isIosSafari=!1,this.tooltipDismissed=!1}ngOnInit(){this.isIosSafari=this.platformDetectionService.isIosSafari(),this.tooltipDismissed=this.platformDetectionService.tooltipDismissed()||this.platformDetectionService.isRunningStandalone()}dismiss(){this.tooltipDismissed=!0,this.platformDetectionService.dismissTooltip()}static#e=this.\u0275fac=function(i){return new(i||n)(y(uEe))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-add-to-home"]],decls:1,vars:1,consts:[["class","custom-tooltip",4,"ngIf"],[1,"custom-tooltip"],[1,"tooltip-text"],[1,"tooltip-dismiss-button",3,"click"]],template:function(i,r){1&i&&A(0,hEe,9,0,"div",0),2&i&&E("ngIf",r.isIosSafari&&!r.tooltipDismissed)},dependencies:[ri,co],styles:['.custom-tooltip[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:white;border-radius:8px;padding:16px;box-shadow:0 4px 8px #0003;display:flex;flex-direction:row;align-items:center;max-width:320px;box-sizing:border-box;z-index:1000}.custom-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-20px;left:50%;transform:translate(-50%);width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid white}.tooltip-icon[_ngcontent-%COMP%]{background:#007BFF;color:#fff;border-radius:50%;padding:10px;margin-right:16px}.tooltip-text[_ngcontent-%COMP%]{color:#333;font-size:16px}.tooltip-dismiss-button[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer}.tooltip-dismiss-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666;vertical-align:bottom}']})}return n})(),Qz=(()=>{class n{transform(e,...i){if(!e)return e;const r=Math.floor(e/1e3%60),o=Math.floor(e/6e4%60),s=Math.floor(e/36e5%24),a=0===s&&o<10?o.toString():o<10?"0"+o:o;let d="";return s>0&&(d+=`${s<10?"0"+s:s}h `),(o>0||s>0)&&(d+=`${a}m `),d+=`${0===s&&0===o&&r<10?r.toString():r<10?"0"+r:r}s`,d}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275pipe=Xr({name:"elapsedTime",type:n,pure:!0})}return n})();const mEe=["keyboard"];function pEe(n,t){if(1&n&&(_(0,"div",7)(1,"div",8)(2,"div",9),C(3," Loading... "),v(),_e(4,"mat-progress-bar",10),v()()),2&n){const e=O(2);x(4),E("value",e.loadingAssetsProgress)}}function gEe(n,t){1&n&&(_(0,"span")(1,"mat-icon"),C(2,"favorite"),v()())}function _Ee(n,t){1&n&&(_(0,"span")(1,"mat-icon"),C(2,"favorite_border"),v()())}function bEe(n,t){if(1&n&&(_(0,"span"),C(1),v()),2&n){const e=t.$implicit;x(1),Je(e)}}function vEe(n,t){if(1&n&&(_(0,"span",33),A(1,bEe,2,1,"span",17),v()),2&n){const e=t.$implicit;x(1),E("ngForOf",e.split(""))}}function yEe(n,t){if(1&n&&(_(0,"div",31),A(1,vEe,2,1,"span",32),v()),2&n){const e=O(2).ngIf;x(1),E("ngForOf",e.displayTerm.join("").split(" "))}}function xEe(n,t){1&n&&(_(0,"div",34)(1,"div",35),C(2," Choosing a random SNOMED CT concept using the FHIR API "),v(),_e(3,"mat-progress-bar",36),v())}function wEe(n,t){if(1&n){const e=Le();_(0,"div",37),z("click",function(){return he(e),fe(O(3).revealHint())}),C(1," Reveal Hint "),v()}}function CEe(n,t){if(1&n){const e=Le();_(0,"div",37),z("click",function(){return he(e),fe(O(3).loadMenu())}),C(1," Abandon game "),v()}}function kEe(n,t){1&n&&_e(0,"li",41),2&n&&E("innerHTML",t.$implicit,zd)}function EEe(n,t){if(1&n&&(_(0,"div",38)(1,"div",39)(2,"h2"),C(3,"Hints:"),v(),_(4,"ul"),A(5,kEe,1,1,"li",40),v()()()),2&n){const e=O(2).ngIf;x(5),E("ngForOf",e.hints)}}const II=function(n){return[n]};function TEe(n,t){if(1&n&&(_(0,"mat-icon",47),C(1,"grade"),v()),2&n){const e=O().$implicit;Ai("left",O(3).calculateGoalPosition(e.score-5),"%"),E("ngClass",la(3,II,e.name.toLowerCase()))}}function SEe(n,t){if(1&n&&(_(0,"mat-icon",48),C(1,"grade"),v()),2&n){const e=O().$implicit;Ai("left",O(3).calculateGoalPosition(e.score-1),"%"),E("ngClass",la(3,II,e.name.toLowerCase()))}}function DEe(n,t){if(1&n&&(_(0,"div",49),C(1),v()),2&n){const e=O().$implicit;Ai("left",O(3).calculateGoalPosition(e.score),"%"),E("ngClass",la(4,II,e.name.toLowerCase())),x(1),Qe("",e.name," trophy!")}}const AEe=function(n,t){return[n,t]};function IEe(n,t){if(1&n&&(zt(0),_e(1,"div",42),A(2,TEe,2,5,"mat-icon",43),_(3,"mat-icon",44),C(4,"emoji_events"),v(),A(5,SEe,2,5,"mat-icon",45),A(6,DEe,2,6,"div",46),jt()),2&n){const e=t.$implicit,i=O(2).ngIf,r=O();x(1),function n4(n){ca(JZ,La,n,!0)}(e.name.toLowerCase()),Ai("left",r.calculateGoalPosition(e.score),"%"),x(1),E("ngIf",i.score>=e.score),x(1),Ai("left",r.calculateGoalPosition(e.score-3),"%"),E("ngClass",Uk(10,AEe,e.name.toLowerCase(),i.score>=e.score?"trophy-large":"")),x(2),E("ngIf",i.score>=e.score),x(1),E("ngIf",i.score>=e.score)}}const Kz=function(){return[]};function MEe(n,t){if(1&n){const e=Le();_(0,"div")(1,"div",11)(2,"div",12),_e(3,"img",13),_(4,"div",14),C(5),v()()(),_(6,"div",15)(7,"span",16),C(8),v(),A(9,gEe,3,0,"span",17),A(10,_Ee,3,0,"span",17),_(11,"span",16),C(12),no(13,"elapsedTime"),v()(),A(14,yEe,2,1,"div",18),A(15,xEe,4,0,"div",19),_(16,"p",20),C(17,"Click the keys to guess the letters of the term!"),v(),_(18,"div")(19,"app-keyboard",21,22),z("letterGuessed",function(r){return he(e),fe(O(2).guessLetter(r))}),v()(),_(21,"div",23),A(22,wEe,2,0,"div",24),A(23,CEe,2,0,"div",25),v(),A(24,EEe,6,1,"div",26),_(25,"div",27),C(26," * Hints are generated from the definition of the SNOMED CT concept, retrieved from the FHIR API as an SCG grammar expression "),v(),_(27,"div",28)(28,"h3"),C(29,"Score Progression"),v(),_(30,"div",29),_e(31,"mat-progress-bar",30),A(32,IEe,7,13,"ng-container",17),v()()()}if(2&n){const e=O().ngIf,i=O();x(3),E("@popIn",void 0),x(2),Qe(" ",e.difficultyLevel," "),x(3),qd(" Round: ",e.round," \xa0\xa0\xa0\xa0 Score: ",e.score," \xa0\xa0\xa0\xa0 Life: "),x(1),E("ngForOf",us(17,Kz).constructor(e.hitPoints)),x(1),E("ngForOf",us(18,Kz).constructor(e.rules.maxHitPoints-e.hitPoints)),x(2),Qe(" \xa0\xa0\xa0\xa0 Time: ",Va(13,15,1e3*i.elapsedTime),""),x(2),E("ngIf","playing"==e.state),x(1),E("ngIf","choosingTerm"===e.state),x(3),E("@shake",i.shakeState),x(4),E("ngIf","playing"==e.state&&e.hintsAvailable&&e.hitPoints>1),x(1),E("ngIf","playing"==e.state),x(1),E("ngIf",e.hints.length>0&&"playing"==e.state),x(7),E("value",i.calculateProgress(e.score)),x(1),E("ngForOf",i.goals)}}function REe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",52),_(3,"p",53)(4,"b"),C(5,"Welcome to SnoGuess!"),v()(),_(6,"p",53),C(7," A fun way to learn about SNOMED CT concepts and their definitions. "),v(),_(8,"div",54),z("click",function(){return he(e),fe(O(2).chooseDifficultyLevel())}),C(9," New game "),v(),_(10,"div",54),z("click",function(){return he(e),fe(O(2).showInstructionsPanel())}),C(11," Instructions "),v(),_(12,"div",55),z("click",function(){return he(e),fe(O(2).openScoreboard())}),C(13," High Scores "),v(),_(14,"p",56),C(15),v()()}if(2&n){const e=O(2);x(2),E("@popIn",void 0),x(6),E("@scrollUp",void 0),x(2),E("@scrollUp",void 0),x(2),E("@scrollUp",void 0),x(3),qd(" Playing with: ",e.selectedEdition,", Language: ",e.selectedLanguage," ")}}function FEe(n,t){if(1&n){const e=Le();_(0,"div",60)(1,"div",61),z("click",function(){const o=he(e).$implicit;return fe(O(3).startGame(o.name))}),C(2),v(),_(3,"p",62),C(4),_(5,"mat-icon",63),C(6,"favorite"),v(),C(7),_(8,"mat-icon",64),C(9,"contact_support"),v(),C(10),v()()}if(2&n){const e=t.$implicit;x(1),E("@scrollUp",void 0),x(1),Qe(" ",e.name," "),x(1),E("@fadeInDelayed",void 0),x(1),Qe(" Life: ",e.rules.maxHitPoints," "),x(3),Qe(", Free hints: ",e.rules.freeHints," "),x(3),Qe(", Points per letter: ",e.rules.pointsPerGuessedLetter," ")}}function PEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",57),_(3,"p",53)(4,"b"),C(5,"Choose the game difficulty"),v()(),A(6,FEe,11,6,"div",58),_(7,"div",59),z("click",function(){return he(e),fe(O(2).backToMenu())}),C(8," Back "),v()()}if(2&n){const e=O(2);x(2),E("@popIn",void 0),x(4),E("ngForOf",e.difficultyLevels),x(1),E("@scrollUp",void 0)}}function OEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",65),_(3,"ul",66)(4,"li",67)(5,"mat-icon"),C(6,"check"),v(),C(7,"Click the keys on the screen to guess the letters of the term "),_(8,"mat-icon",68),C(9,"keyboard"),v()(),_(10,"li",67)(11,"mat-icon"),C(12,"check"),v(),C(13,"You have three to five lives, depending on your difficulty level "),_(14,"span",69)(15,"mat-icon"),C(16,"favorite"),v(),_(17,"mat-icon"),C(18,"favorite"),v(),_(19,"mat-icon"),C(20,"favorite"),v()()(),_(21,"li",67)(22,"mat-icon"),C(23,"check"),v(),C(24,"You will loose one life with each wrong guess "),_(25,"mat-icon",69),C(26,"favorite_border"),v()(),_(27,"li",67)(28,"mat-icon"),C(29,"check"),v(),C(30,"You earn points for each correct guess "),_(31,"mat-icon",68),C(32,"plus_one"),v()(),_(33,"li",67)(34,"mat-icon"),C(35,"check"),v(),C(36,"In Easy mode you get 2 hints for free, and in Medium mode you get one \u{1f4a1} "),v(),_(37,"li",67)(38,"mat-icon"),C(39,"check"),v(),C(40,"You can reveal more hints, but each hint it will cost one life "),_(41,"mat-icon",69),C(42,"favorite_border"),v()(),_(43,"li",67)(44,"mat-icon"),C(45,"check"),v(),C(46,"If you guess the whole term you can recover one life"),_(47,"mat-icon",69),C(48,"favorite"),v()(),_(49,"li",67)(50,"mat-icon"),C(51,"check"),v(),C(52,"Keep guessing terms to increase your score and earn trophies "),_(53,"mat-icon",70),C(54,"emoji_events"),v()()(),_(55,"div",71),z("click",function(){return he(e),fe(O(2).hideInstructionsPanel())}),C(56," Back "),v()()}2&n&&(x(2),E("@popIn",void 0),x(53),E("@scrollUp",void 0))}function NEe(n,t){1&n&&(_(0,"div",72),_e(1,"img",73),v()),2&n&&(x(1),E("@popIn",void 0))}function LEe(n,t){if(1&n&&(_(0,"div"),C(1),v()),2&n){const e=O(2).ngIf,i=O();x(1),Qe(" Trophy: ",i.getMaxTrophyObtained(e.score)," ")}}const Xz=function(n){return[n,"shadow-local"]},BEe=function(n){return[n,"trophy-large","shadow-local"]};function VEe(n,t){if(1&n&&(_(0,"div")(1,"mat-icon",81),C(2,"grade"),v(),C(3," \xa0\xa0 "),_(4,"mat-icon",81),C(5,"emoji_events"),v(),C(6," \xa0 "),_(7,"mat-icon",81),C(8,"grade"),v()()),2&n){const e=O(2).ngIf,i=O();x(1),E("ngClass",la(3,Xz,i.getMaxTrophyObtained(e.score).toLocaleLowerCase())),x(3),E("ngClass",la(5,BEe,i.getMaxTrophyObtained(e.score).toLocaleLowerCase())),x(3),E("ngClass",la(7,Xz,i.getMaxTrophyObtained(e.score).toLocaleLowerCase()))}}function UEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",74),_(3,"div",75)(4,"div"),C(5," The term was: "),v(),_(6,"div",76),C(7),v(),_(8,"div",77),C(9),v(),_(10,"div",78),C(11),no(12,"elapsedTime"),v(),A(13,LEe,2,1,"div",4),v(),A(14,VEe,9,9,"div",4),_(15,"div",79),z("click",function(){he(e);const r=O(2);return r.loadMenu(),fe(r.chooseDifficultyLevel())}),C(16," New game "),v(),_(17,"div",79),z("click",function(){return he(e),fe(O(2).openScoreboard())}),C(18," High Scores "),v(),_(19,"div",80),z("click",function(){return he(e),fe(O(2).loadMenu())}),C(20," Main menu "),v()()}if(2&n){const e=O().ngIf,i=O();x(2),E("@popIn",void 0),x(5),Qe(" ",e.term,""),x(2),qd("",e.round," ",1==e.round?"round":"rounds",""),x(2),Tp(" Final Score: ",e.score," points - Difficulty: ",e.difficultyLevel," - Time: ",Va(12,12,e.endTimestamp-e.startTimestamp)," "),x(2),E("ngIf",i.getMaxTrophyObtained(e.score)),x(1),E("ngIf",i.getMaxTrophyObtained(e.score)),x(1),E("@scrollUp",void 0),x(2),E("@scrollUp",void 0),x(2),E("@scrollUp",void 0)}}function HEe(n,t){if(1&n&&(_(0,"span"),C(1),v()),2&n){const e=O(2).ngIf;x(1),Qe("\u2192 Bonus: ",e.livesBonus,"")}}function zEe(n,t){if(1&n&&(_(0,"span"),C(1),v()),2&n){const e=O(2).ngIf;x(1),Qe("\u2192 Bonus: ",e.difficultyBonus,"")}}function jEe(n,t){if(1&n&&(_(0,"span"),C(1),v()),2&n){const e=O(2).ngIf;x(1),Qe("\u2192 Bonus: ",e.timeBonus,"")}}function $Ee(n,t){if(1&n){const e=Le();_(0,"div",88)(1,"p",89),C(2,"This is a High Score! Save a message to the public leaderboard!"),v(),_(3,"div",90)(4,"input",91),z("ngModelChange",function(r){return he(e),fe(O(3).messageForLeaderboard=r)}),v(),_(5,"div",92),z("click",function(){he(e);const r=O(2).ngIf;return fe(O().saveScore(r))}),C(6," Save "),v()(),_(7,"p",93),C(8,"No personal information is recorded"),v()()}if(2&n){const e=O(3);x(4),E("ngModel",e.messageForLeaderboard)}}function GEe(n,t){if(1&n){const e=Le();_(0,"div",50),_e(1,"img",51)(2,"img",82),_(3,"div",83)(4,"mat-icon",84),C(5,"grade"),v(),_(6,"mat-icon",84),C(7,"emoji_events"),v(),_(8,"mat-icon",84),C(9,"grade"),v()(),_(10,"div",85),C(11),A(12,HEe,2,1,"span",4),v(),_(13,"div",85),C(14),A(15,zEe,2,1,"span",4),v(),_(16,"div",85),C(17),no(18,"elapsedTime"),A(19,jEe,2,1,"span",4),v(),_(20,"div",86),C(21),v(),A(22,$Ee,9,1,"div",87),_(23,"div",79),z("click",function(){he(e);const r=O(2);return r.loadMenu(),fe(r.chooseDifficultyLevel())}),C(24," New game "),v(),_(25,"div",79),z("click",function(){return he(e),fe(O(2).openScoreboard())}),C(26," High Scores "),v(),_(27,"div",80),z("click",function(){return he(e),fe(O(2).loadMenu())}),C(28," Main menu "),v()()}if(2&n){const e=O().ngIf,i=O();x(2),E("@popIn",void 0),x(9),Qe("Lives left: ",e.hitPoints," "),x(1),E("ngIf",e.livesBonus>0),x(2),Qe("Difficulty: ",e.difficultyLevel," "),x(1),E("ngIf",e.difficultyBonus>0),x(2),Qe("Time: ",Va(18,12,e.endTimestamp-e.startTimestamp)," "),x(2),E("ngIf",e.timeBonus>0),x(2),Qe("Final score: ",e.score,""),x(1),E("ngIf",i.highScore),x(1),E("@scrollUp",void 0),x(2),E("@scrollUp",void 0),x(2),E("@scrollUp",void 0)}}function WEe(n,t){if(1&n&&(_(0,"div",2),A(1,pEe,5,1,"div",3),A(2,MEe,33,19,"div",4),A(3,REe,16,6,"div",5),A(4,PEe,9,3,"div",5),A(5,OEe,57,2,"div",5),A(6,NEe,2,1,"div",6),A(7,UEe,21,14,"div",5),A(8,GEe,29,14,"div",5),v()),2&n){const e=t.ngIf,i=O();x(1),E("ngIf",i.loadingAssets),x(1),E("ngIf",("playing"==e.state||"choosingTerm"==e.state)&&!i.loadingAssets),x(1),E("ngIf","menu"===e.state&&!i.chooseDifficulty&&!i.showInstructions&&!i.loadingAssets),x(1),E("ngIf","menu"===e.state&&i.chooseDifficulty&&!i.showInstructions&&!i.loadingAssets),x(1),E("ngIf",i.showInstructions),x(1),E("ngIf",i.termGuessed),x(1),E("ngIf","gameOver"===e.state),x(1),E("ngIf","won"==e.state)}}let qEe=(()=>{class n{constructor(e,i,r,o,s){this.snoguessMainService=e,this.preloadService=i,this.terminologyService=r,this.firebaseService=o,this.router=s,this.shakeState="normal",this.termGuessed="",this.goals=[],this.loadingAssetsProgress=0,this.loadingAssets=!0,this.showInstructions=!1,this.chooseDifficulty=!1,this.currentYear=new Date,this.difficultyLevels=[],this.elapsedTime=0,this.gameInProgress=!1,this.messageForLeaderboard="",this.highScore=!1}ngOnInit(){this.game=this.snoguessMainService.getGameState(),this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.game.subscribe(i=>{"playing"===i.state&&(this.goals=i.rules.goals),("gameOver"===i.state||"won"===i.state)&&(this.stopTimer(),"won"===i.state&&this.firebaseService.getScores().then(r=>{i.score>r[r.length-1].score&&(this.highScore=!0)}))}),this.snoguessMainService.guessResult.subscribe(i=>{!1===i.result?(this.keyboard?.addGuessedLetter(i.letter,!1),this.shakeState="shake",setTimeout(()=>this.shakeState="normal",200)):this.keyboard?.addGuessedLetter(i.letter,!0)}),this.snoguessMainService.termResult.subscribe(i=>{i&&(this.keyboard?.reset(),this.termGuessed=i,setTimeout(()=>{this.termGuessed=""},2e3))}),this.preloadService.preloadImages(["assets/img/SI_CT_w_tagline.png","assets/img/snoguess-logo.png","assets/img/congratulations.png","assets/img/correct.png","assets/img/game-over.png","assets/img/instructions.png","assets/img/difficulty.png","assets/img/scoreboard.png"]).then(()=>{setTimeout(()=>{this.loadingAssets=!1,this.loadMenu()},500)}),this.preloadService.loadingProgress.subscribe(i=>{this.loadingAssetsProgress=i}),this.terminologyService.fhirUrlParam$.subscribe(i=>{i&&this.terminologyService.getCodeSystem(i).subscribe(r=>{this.selectedEdition=r?.entry[0]?.resource?.title})}),this.terminologyService.lang$.subscribe(i=>{this.selectedLanguage=i})}loadMenu(){this.snoguessMainService.loadMenu()}backToMenu(){this.chooseDifficulty=!1}showInstructionsPanel(){this.showInstructions=!0}hideInstructionsPanel(){this.showInstructions=!1}chooseDifficultyLevel(){this.chooseDifficulty=!0}startGame(e){this.chooseDifficulty=!1,this.keyboard&&this.keyboard.reset(),this.stopTimer(),this.snoguessMainService.startGame(e),this.startTimer(),this.highScore=!1}guessLetter(e){var i=this;return xe(function*(){"playing"===(yield function Lve(n,t){const e="object"==typeof t;return new Promise((i,r)=>{const o=new ph({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new cf)}});n.subscribe(o)})}(i.game))?.state&&i.snoguessMainService.guessLetter(e)})()}revealHint(){this.snoguessMainService.revealHint()}calculateProgress(e){return Math.min(e/this.goals[this.goals.length-1].score*100,100)}calculateGoalPosition(e){return e/this.goals[this.goals.length-1].score*100}findCurrentGoal(e){if(!e||e{e>=r.score&&(i=r.name)}),i}startTimer(){this.elapsedTime=0,this.gameInProgress=!0;const e=yg(0,1e3).pipe(ct(i=>this.elapsedTime=i),GE(()=>this.gameInProgress));this.gameTimerSubscription=e.subscribe()}stopTimer(){this.gameInProgress=!1,this.gameTimerSubscription&&this.gameTimerSubscription.unsubscribe()}openScoreboard(){this.router.navigate(["/snoguess/scoreboard"])}saveScore(e){let i={score:e.score,numberOfRounds:e.round,difficulty:e.difficultyLevel,elapsed:e.endTimestamp-e.startTimestamp,date:_i.now(),message:this.messageForLeaderboard};this.firebaseService.addScore(i).then(()=>{this.messageForLeaderboard="",this.openScoreboard()}).catch(r=>{this.messageForLeaderboard="",console.error("Error saving score: ",r),this.loadMenu()})}static#e=this.\u0275fac=function(i){return new(i||n)(y(sEe),y(aEe),y(Ur),y(qz),y(ro))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-snoguess-main"]],viewQuery:function(i,r){if(1&i&&pt(mEe,5),2&i){let o;Ae(o=Ie())&&(r.keyboard=o.first)}},decls:6,vars:7,consts:[["class","snoguess-game",4,"ngIf"],[1,"text-center","mt-8","mb-4"],[1,"snoguess-game"],["class","assets-loading-container",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center gap-4",4,"ngIf"],["class","overlay overlay-transparent",4,"ngIf"],[1,"assets-loading-container"],[1,"mt-48","mb-48"],[1,"progress-bar-message","text-center"],["mode","determinate",1,"game-progress-bar",3,"value"],[1,"flex","justify-center","mt-8","mb-8"],[1,"relative","w-1/4"],["src","assets/img/snoguess-logo.png","alt","Game Logo"],[1,"diff-label","absolute","-bottom-3","right-5","italic","text-gray-500"],[1,"hit-points"],[1,"score"],[4,"ngFor","ngForOf"],["class","term-display flex flex-row flex-wrap justify-center gap-8",4,"ngIf"],["class","loading-container",4,"ngIf"],[1,"guess-message"],[3,"letterGuessed"],["keyboard",""],[1,"game-buttons","mt-4"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","hints-container",4,"ngIf"],[1,"note"],[1,"score-progression-panel"],[1,"progress-bar-container"],["mode","determinate",3,"value"],[1,"term-display","flex","flex-row","flex-wrap","justify-center","gap-8"],["class","whitespace-nowrap",4,"ngFor","ngForOf"],[1,"whitespace-nowrap"],[1,"loading-container"],[1,"progress-bar-message"],["mode","indeterminate"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pt-1","pb-1","pl-6","pr-6","w-fit","text-center","cursor-pointer","font-bold","text-white",3,"click"],[1,"hints-container"],[1,"hints-callout","text-center"],["class","hint-item",3,"innerHTML",4,"ngFor","ngForOf"],[1,"hint-item",3,"innerHTML"],[1,"goal-indicator"],["class","star-icon left-star",3,"ngClass","left",4,"ngIf"],[1,"trophy-icon",3,"ngClass"],["class","star-icon right-star",3,"ngClass","left",4,"ngIf"],["class","goal-name",3,"left","ngClass",4,"ngIf"],[1,"star-icon","left-star",3,"ngClass"],[1,"star-icon","right-star",3,"ngClass"],[1,"goal-name",3,"ngClass"],[1,"flex","flex-col","items-center","gap-4"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/snoguess-logo.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,"text-center","font-light","text-lg"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","text-3xl",3,"click"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"text-center","font-light","italic","text-lg"],["src","assets/img/difficulty.png","alt","Game Logo",1,"w-1/4","mt-8"],["class","level-container w-full flex flex-col justify-center items-center",4,"ngFor","ngForOf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","mb-8","text-3xl",3,"click"],[1,"level-container","w-full","flex","flex-col","justify-center","items-center"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","text-3xl",3,"click"],[1,"level-details","text-center","mt-3","flex","flex-row","align-middle"],[1,"text-red-500","text-sm"],[1,"text-yellow-500","text-sm"],["src","assets/img/instructions.png","alt","Game Logo",1,"w-1/4","mt-8","mb-12"],[1,"text-left","instructions-text"],[1,"flex","flex-row","align-middle","gap-2"],[1,"text-blue-900"],[1,"text-red-500"],[1,"text-yellow-500"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"overlay","overlay-transparent"],["src","assets/img/correct.png","alt","Correct",1,"w-1/5","mt-8"],["src","assets/img/game-over.png","alt","Game Logo",1,"w-1/4","mt-8"],[1,"text-xl","text-pretty","text-center"],[1,"font-bold"],[1,"mt-12"],[1,"mt-4"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","text-2xl",3,"click"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],[3,"ngClass"],["src","assets/img/congratulations.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,""],[1,"large-icon","diamond","shadow-local"],[1,"text-lg"],[1,"reveal","won"],["class","flex flex-col items-center gap-4 w-full",4,"ngIf"],[1,"flex","flex-col","items-center","gap-4","w-full"],[1,"font-bold","text-lg","text-blue-900"],[1,"flex","flex-row","align-middle","justify-center","w-full"],["type","text","placeholder","Your message here",1,"w-1/3",3,"ngModel","ngModelChange"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4",3,"click"],[1,"text-sm","text-gray-400"]],template:function(i,r){1&i&&(A(0,WEe,9,8,"div",0),no(1,"async"),_(2,"div",1),C(3),no(4,"date"),v(),_e(5,"app-add-to-home")),2&i&&(E("ngIf",Va(1,2,r.game)),x(3),Qe(" Copyright \xa9 ",Kd(4,4,r.currentYear,"yyyy")," SNOMED International\n"))},dependencies:[ha,io,ri,co,L6,Us,qo,ps,dEe,fEe,SE,Jd,Qz],styles:[".snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a;min-height:85vh!important}.term-display[_ngcontent-%COMP%]{font-size:24px;letter-spacing:4px;word-break:break-all;margin-bottom:20px;text-align:center;font-family:monospace}.term-display[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0}.hit-points[_ngcontent-%COMP%]{font-weight:700;color:#d9534f;text-align:center;margin-bottom:2rem}mat-form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}button[_ngcontent-%COMP%]{margin-right:8px}.guess-field[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000}.overlay-dark[_ngcontent-%COMP%]{background-color:#00000080}.overlay-transparent[_ngcontent-%COMP%]{background-color:#0000}.message[_ngcontent-%COMP%]{font-size:4rem;text-align:center;margin-bottom:20px;font-weight:bolder}.reveal[_ngcontent-%COMP%]{font-size:2rem;text-align:center;margin-bottom:20px;font-weight:bolder}.won[_ngcontent-%COMP%]{color:#4caf50;text-shadow:black 2px 2px 2px}.lost[_ngcontent-%COMP%]{color:#f44336;text-shadow:rgb(0,0,0) 2px 2px 2px}.overlay[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1.5rem;padding:10px 20px}.loading-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:1rem}.progress-bar-message[_ngcontent-%COMP%]{color:#000;font-size:larger;margin-bottom:10px;font-style:italic;font-weight:lighter}.score[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.score-progression-panel[_ngcontent-%COMP%]{margin-top:2rem}.progress-bar-container[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:5rem;position:relative;background-color:#e0e0e0;border-radius:5px}.goal-indicator[_ngcontent-%COMP%]{position:absolute;bottom:0;width:2px;height:10px;background-color:#000}.goal-indicator.bronze[_ngcontent-%COMP%]{background-color:#cd7f32}.goal-indicator.silver[_ngcontent-%COMP%]{background-color:silver}.goal-indicator.gold[_ngcontent-%COMP%]{background-color:gold}.goal-indicator.platinum[_ngcontent-%COMP%]{background-color:#e5e4e2}.goal-indicator.diamond[_ngcontent-%COMP%]{background-color:#3b49c4}.trophy-icon[_ngcontent-%COMP%]{position:absolute;bottom:-35px;font-size:24px;width:24px;transition:transform .3s ease}.trophy-large[_ngcontent-%COMP%]{transform:scale(2.5) translate(-2px,3px)}.bronze[_ngcontent-%COMP%]{color:#cd7f32}.silver[_ngcontent-%COMP%]{color:silver}.gold[_ngcontent-%COMP%]{color:gold}.platinum[_ngcontent-%COMP%]{color:#e5e4e2}.diamond[_ngcontent-%COMP%]{color:#3b49c4}.shadow-local[_ngcontent-%COMP%]{text-shadow:black 2px 2px 2px}.star-icon[_ngcontent-%COMP%]{position:absolute;bottom:-40px;font-size:30px;width:30px;transition:transform .3s ease}.left-star[_ngcontent-%COMP%]{transform:translate(-50px)}.right-star[_ngcontent-%COMP%]{transform:translate(30px)}.goal-name[_ngcontent-%COMP%]{position:absolute;bottom:-75px;width:100px;margin-left:-50px;text-align:center;font-size:12px;font-weight:700;color:#000}.large-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem}.note[_ngcontent-%COMP%]{font-size:.8rem;font-weight:lighter;margin-top:1rem;text-align:center}.hints-container[_ngcontent-%COMP%]{margin-top:1rem}.hints-callout[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:.5rem}.hint-item[_ngcontent-%COMP%]{color:#555;font-size:1em;list-style-type:none;position:relative;padding:5px 0 5px 30px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}li[_ngcontent-%COMP%]{margin-bottom:10px;color:#666;font-size:1.2rem}.guess-message[_ngcontent-%COMP%]{text-align:center;margin-top:1rem;font-size:1.2rem}.assests-loading-container[_ngcontent-%COMP%]{text-align:center;font-size:20px;color:#fff}.game-progress-bar[_ngcontent-%COMP%]{border-radius:22px;overflow:hidden;background-color:#e0e0e0;box-shadow:0 4px 8px #0003}.game-progress-bar[_ngcontent-%COMP%] .mat-progress-bar-fill[_ngcontent-%COMP%]:after{background-color:#4caf50;border-radius:22px}.game-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.level-details[_ngcontent-%COMP%]{visibility:hidden}.level-container[_ngcontent-%COMP%]:hover .level-details[_ngcontent-%COMP%]{visibility:visible}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[$n("shake",[Qt("normal => shake",Gt(200,Ef([ze({transform:"translateX(0)"}),ze({transform:"translateX(-10px)"}),ze({transform:"translateX(10px)"}),ze({transform:"translateX(0)"})])))]),$n("popIn",[Qt(":enter",[ze({transform:"scale(0.8)",opacity:0}),Gt("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1.3)",opacity:1})),Gt("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1)",opacity:1}))])]),$n("scrollUp",[Qt(":enter",[ze({transform:"translateY(100%)",opacity:0}),Gt("0.5s ease-out",ze({transform:"translateY(0)",opacity:1}))])]),$n("fadeInDelayed",[Qt(":enter",[ze({opacity:0}),Gt("1s 0.5s ease-out",ze({opacity:1}))])])]}})}return n})();function QEe(n,t){if(1&n){const e=Le();_(0,"li")(1,"a",11),z("click",function(){const o=he(e).$implicit;return fe(O().findingWithExplicitContextSelected(o))}),C(2),v()()}if(2&n){const e=t.$implicit;x(2),Je(e.display)}}function KEe(n,t){1&n&&(_(0,"th",20),C(1," Type "),v())}function XEe(n,t){if(1&n&&(_(0,"td",21),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.type.display," ")}}function YEe(n,t){1&n&&(_(0,"th",20),C(1," Target "),v())}function ZEe(n,t){if(1&n&&(_(0,"td",21),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.target.code," ")}}function JEe(n,t){1&n&&(_(0,"th",20),C(1," Target "),v())}function eTe(n,t){if(1&n&&(_(0,"td",21),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.target.display," ")}}function tTe(n,t){1&n&&_e(0,"tr",22)}function nTe(n,t){1&n&&_e(0,"tr",23)}function iTe(n,t){if(1&n&&(_(0,"div",4)(1,"h3"),C(2),v(),_(3,"table",12),zt(4,13),A(5,KEe,2,0,"th",14),A(6,XEe,2,1,"td",15),jt(),zt(7,16),A(8,YEe,2,0,"th",14),A(9,ZEe,2,1,"td",15),jt(),zt(10,17),A(11,JEe,2,0,"th",14),A(12,eTe,2,1,"td",15),jt(),A(13,tTe,1,0,"tr",18),A(14,nTe,1,0,"tr",19),v()()),2&n){const e=O();x(2),Qe("Relevant attributes (",e.selectedSituation.display,")"),x(1),E("dataSource",e.dataSource),x(10),E("matHeaderRowDef",e.displayedColumns),x(1),E("matRowDefColumns",e.displayedColumns)}}function rTe(n,t){if(1&n&&(_(0,"div",4)(1,"h3"),C(2,"Resource Type"),v(),_(3,"a",24)(4,"span"),C(5),v(),_(6,"mat-icon"),C(7,"open_in_new"),v()()()),2&n){const e=O();x(3),E("href","https://hl7.org/fhir/R4/"+e.resourceType+".html",Tb),x(2),Qe("FHIR R4 ",e.resourceType,"")}}function oTe(n,t){if(1&n){const e=Le();_(0,"div",25)(1,"button",26),z("click",function(){he(e);const r=O();return fe(r.saveOutput(r.fhirRepresentationString))}),_e(2,"mat-icon",27),v(),_(3,"button",28),z("click",function(){he(e);const r=O();return fe(r.copyOutputToClipboard(r.fhirRepresentationString))}),_e(4,"mat-icon",29),v()()}}const sTe=function(){return{}};let aTe=(()=>{class n{constructor(e,i){this.terminologyService=e,this.clipboard=i,this.fhirRepresentationString="{}",this.situationsBinding={title:"Finding with explicit context",type:"Autocomplete",ecl:"<< 413350009 |Finding with explicit context (situation)|",value:"",note:"Select a finding with explicit context"},this.SituationConstants={KnownPresent:{code:"410515003",display:"Known present",selfAndDescendants:[]},KnownAbsent:{code:"410516002",display:"Known absent",selfAndDescendants:[]},SubjectOfRecord:{code:"410604004",display:"Subject of record",selfAndDescendants:[]},PersonInTheFamily:{code:"303071001",display:"Person in the family",selfAndDescendants:[]},InThePast:{code:"410513005",display:"In the past",selfAndDescendants:[]},CurrentOrSpecifiedTime:{code:"410512000",display:"Current or specified time",selfAndDescendants:[]},KnownPossible:{code:"410590009",display:"Known possible",selfAndDescendants:[]}},this.examples=[{code:"160377001",display:"Family history of asthma"},{code:"12147341000119108",display:"History of burn"},{code:"428942009",display:"History of fall"},{code:"300890009",display:"Swelling absent"},{code:"162057007",display:"Nausea present"},{code:"401204006",display:"Suspected autism"}],this.displayedColumns=["type","targetCode","targetDisplay"],this.dataSource=[]}ngOnInit(){this.loadOrUpdateConstants()}loadOrUpdateConstants(){var e=this;return xe(function*(){let i=localStorage.getItem("SituationConstants");i?(e.SituationConstants=JSON.parse(i),console.log("Loaded constants from cache.")):(yield e.updateConstantDescendants(),localStorage.setItem("SituationConstants",JSON.stringify(e.SituationConstants)),console.log("Updated constants and cached them."))})()}updateConstantDescendants(){var e=this;return xe(function*(){for(const i in e.SituationConstants)if(Object.prototype.hasOwnProperty.call(e.SituationConstants,i)){const r=e.SituationConstants[i];let o=yield oo(e.terminologyService.expandValueSet("<< "+r.code,"",0,1e3));r.selfAndDescendants=o.expansion.contains.map(s=>s.code)}})()}convertSituationToFhir(e){var i=this;return xe(function*(){i.selectedSituation=e,i.fhirRepresentation=null,i.fhirRepresentationString="Loading...",i.dataSource=[],i.resourceType=void 0;let a,c,l,d,r=yield oo(i.terminologyService.lookupConcept(e.code)),o=i.terminologyService.getNormalForm(r);if(i.terminologyService.parseNormmalForm(o).groups.forEach(u=>{const h=u.find(p=>"408732007"===p.type.code);h&&(i.dataSource=[...i.dataSource,h],c=h.target);const f=u.find(p=>"408729009"===p.type.code);f&&(i.dataSource=[...i.dataSource,f],a=f.target);const m=u.find(p=>"408731000"===p.type.code);m&&(i.dataSource=[...i.dataSource,m],l=m.target);const g=u.find(p=>"246090004"===p.type.code);g&&(i.dataSource=[...i.dataSource,g],d=g.target)}),d){const u=i.SituationConstants.KnownPresent.selfAndDescendants.includes(a?.code),h=i.SituationConstants.SubjectOfRecord.selfAndDescendants.includes(c?.code),f=i.SituationConstants.InThePast.selfAndDescendants.includes(l?.code),m=i.SituationConstants.KnownAbsent.selfAndDescendants.includes(a?.code),g=i.SituationConstants.KnownPossible.selfAndDescendants.includes(a?.code),p=i.SituationConstants.CurrentOrSpecifiedTime.selfAndDescendants.includes(l?.code),b=i.SituationConstants.PersonInTheFamily.selfAndDescendants.includes(c?.code);u&&h&&f?i.updateFhirRepresentation(i.createFhirCondition(d,"inactive")):u&&h&&p?i.updateFhirRepresentation(i.createFhirCondition(d,"active")):g&&h&&p?i.updateFhirRepresentation(i.createFhirCondition(d,"unconfirmed")):u&&b?i.updateFhirRepresentation(i.createFamilyMemberHistoryForFinding(d,c)):m&&h&&p?i.updateFhirRepresentation(i.createFhirObservationForAbsentFinding(d)):i.fhirRepresentationString="No FHIR representation for this situation"}else i.fhirRepresentationString="No FHIR representation for this situation"})()}updateFhirRepresentation(e){this.fhirRepresentation=e,this.fhirRepresentationString=JSON.stringify(e,null,2)}findingWithExplicitContextSelected(e){e&&e.code&&this.convertSituationToFhir(e)}createFhirCondition(e,i){return this.resourceType="Condition",{resourceType:"Condition",subject:{reference:"Patient/1234"},clinicalStatus:{coding:[{system:"http://terminology.hl7.org/CodeSystem/condition-clinical",code:i}]},code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]}}}createFhirObservationForAbsentFinding(e){return this.resourceType="Observation",{resourceType:"Observation",subject:{reference:"Patient/1234"},status:"registered",code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]},valueCodeableConcept:{coding:[{system:"http://snomed.info/sct",code:"410516002",display:"Known absent"}]}}}createFamilyMemberHistoryForFinding(e,i){return this.resourceType="FamilyMemberHistory",{resourceType:"FamilyMemberHistory",status:"completed",patient:{reference:"Patient/1234"},relationship:{coding:[{system:"http://snomed.info/sct",code:i.code,display:i.display}]},condition:[{code:{coding:[{system:"http://snomed.info/sct",code:e.code,display:e.display}]}}]}}saveOutput(e){var i=new Blob([e],{type:"text/plain;charset=utf-8"});(0,Wa.saveAs)(i,`${this.selectedSituation.display}-fhir.json`)}copyOutputToClipboard(e){this.clipboard.copy(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(Ur),y(VS))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-situation-map"]],decls:17,vars:9,consts:[[1,"p-8"],[1,"flex","flex-wrap","gap-4"],[1,"w-1/3"],[1,"w-auto",3,"binding","selectionChange"],[1,"mt-8"],[4,"ngFor","ngForOf"],["class","mt-8",4,"ngIf"],[1,"flex-grow"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["href","javascript:void(0);",3,"click"],["mat-table","",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","targetCode"],["matColumnDef","targetDisplay"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["target","_blank",1,"flex","flex-row","align-middle","gap-2",3,"href"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h2"),C(2,"Consistent Context Representation for Situations with Explicit Context"),v(),_(3,"div",1)(4,"div",2)(5,"app-autocomplete-binding",3),z("selectionChange",function(s){return r.findingWithExplicitContextSelected(s)}),v(),_(6,"h3",4),C(7,"Examples"),v(),_(8,"ul"),A(9,QEe,3,1,"li",5),v(),A(10,iTe,15,4,"div",6),A(11,rTe,8,2,"div",6),v(),_(12,"div",7)(13,"div",8),A(14,oTe,5,0,"div",9),_(15,"textarea",10),C(16," "),v()()()()()),2&i&&(x(5),E("binding",r.situationsBinding),x(4),E("ngForOf",r.examples),x(1),E("ngIf",null==r.selectedSituation?null:r.selectedSituation.display),x(1),E("ngIf",r.resourceType),x(3),E("ngIf",r.fhirRepresentationString.length>15),x(1),E("options",us(8,sTe))("lang","json")("innerHTML",r.fhirRepresentationString,zd))},dependencies:[io,ri,Qy,Vs,co,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,_u,Og],styles:[".output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem;min-height:45rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}"]})}return n})(),cTe=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-context-main"]],decls:1,vars:0,template:function(i,r){1&i&&_e(0,"app-situation-map")},dependencies:[aTe]})}return n})();var lTe=Qr(627),dTe=Qr.n(lTe);let uTe=(()=>{class n{constructor(){this.filter=new(dTe())}transform(e){return e&&this.filter.clean(e)}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275pipe=Xr({name:"safeText",type:n,pure:!0})}return n})();function hTe(n,t){1&n&&_e(0,"mat-spinner",8)}function fTe(n,t){1&n&&(_(0,"th",20),C(1," Message "),v())}function mTe(n,t){if(1&n&&(_(0,"td",21),C(1),no(2,"safeText"),v()),2&n){const e=t.$implicit;x(1),Qe(" ",Va(2,1,e.message)," ")}}function pTe(n,t){1&n&&(_(0,"th",20),C(1," Score "),v())}function gTe(n,t){if(1&n&&(_(0,"td",21),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.score," ")}}function _Te(n,t){1&n&&(_(0,"th",20),C(1," Rounds "),v())}function bTe(n,t){if(1&n&&(_(0,"td",21),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.numberOfRounds," ")}}function vTe(n,t){1&n&&(_(0,"th",20),C(1," Difficulty "),v())}function yTe(n,t){if(1&n&&(_(0,"td",21),C(1),v()),2&n){const e=t.$implicit;x(1),Qe(" ",e.difficulty," ")}}function xTe(n,t){1&n&&(_(0,"th",20),C(1," Time Played "),v())}function wTe(n,t){if(1&n&&(_(0,"td",21),C(1),no(2,"elapsedTime"),v()),2&n){const e=t.$implicit;x(1),Qe(" ",Va(2,1,e.elapsed)," ")}}function CTe(n,t){1&n&&(_(0,"th",20),C(1," Date "),v())}function kTe(n,t){if(1&n&&(_(0,"td",21),C(1),no(2,"date"),v()),2&n){const e=t.$implicit;x(1),Qe(" ",Kd(2,1,e.date,"short")," ")}}function ETe(n,t){1&n&&_e(0,"tr",22)}function TTe(n,t){1&n&&_e(0,"tr",23)}function STe(n,t){if(1&n&&(_(0,"div")(1,"table",9),zt(2,10),A(3,fTe,2,0,"th",11),A(4,mTe,3,3,"td",12),jt(),zt(5,13),A(6,pTe,2,0,"th",11),A(7,gTe,2,1,"td",12),jt(),zt(8,14),A(9,_Te,2,0,"th",11),A(10,bTe,2,1,"td",12),jt(),zt(11,15),A(12,vTe,2,0,"th",11),A(13,yTe,2,1,"td",12),jt(),zt(14,16),A(15,xTe,2,0,"th",11),A(16,wTe,3,3,"td",12),jt(),zt(17,17),A(18,CTe,2,0,"th",11),A(19,kTe,3,4,"td",12),jt(),A(20,ETe,1,0,"tr",18),A(21,TTe,1,0,"tr",19),v()()),2&n){const e=O();x(1),E("dataSource",e.dataSource),x(19),E("matHeaderRowDef",e.displayedColumns),x(1),E("matRowDefColumns",e.displayedColumns)}}const DTe=[{path:"",component:B8},{path:"allergies",component:B8},{path:"sandbox",component:i0e},{path:"prescription",component:r0e},{path:"questionnaires",component:dve},{path:"implementation-course/subset-validator",component:Nve},{path:"snoguess",component:qEe},{path:"snoguess/scoreboard",component:(()=>{class n{constructor(e,i){this.firebaseService=e,this.router=i,this.displayedColumns=["message","difficulty","score","numberOfRounds","secondsPlayed","date"],this.dataSource=[],this.loadingScores=!1}ngOnInit(){this.loadScores()}loadScores(){this.loadingScores=!0,this.firebaseService.getScores().then(e=>{this.dataSource=e.map(i=>({...i,date:i.date?i.date.toDate():new Date})),this.loadingScores=!1})}backToGame(){this.router.navigate(["/snoguess"])}static#e=this.\u0275fac=function(i){return new(i||n)(y(qz),y(ro))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-scoreboard"]],decls:12,vars:4,consts:[[1,"flex","flex-col","items-center","gap-4","pt-6","snoguess-game"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/scoreboard.png","alt","High Scores",1,"w-1/4","mt-8"],[1,"mb-8","flex","flex-row","align-middle","gap-1"],[1,"diamond"],["diameter","50",4,"ngIf"],[4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],["diameter","50"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","message"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","score"],["matColumnDef","numberOfRounds"],["matColumnDef","difficulty"],["matColumnDef","secondsPlayed"],["matColumnDef","date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,r){1&i&&(_(0,"div",0),_e(1,"img",1)(2,"img",2),_(3,"div",3)(4,"span"),C(5,"Messages posted by playes who reached the Diamond trophy"),v(),_(6,"mat-icon",4),C(7,"emoji_events"),v()(),A(8,hTe,1,0,"mat-spinner",5),A(9,STe,22,3,"div",6),_(10,"div",7),z("click",function(){return r.backToGame()}),C(11," Back to game "),v()()),2&i&&(x(2),E("@popIn",void 0),x(6),E("ngIf",r.loadingScores),x(1),E("ngIf",!r.loadingScores),x(1),E("@scrollUp",void 0))},dependencies:[ri,co,Bl,Vl,jc,Ul,$c,zc,Hl,Gc,Wc,zl,jl,Jd,Qz,uTe],styles:[".diamond[_ngcontent-%COMP%]{color:#3b49c4}.snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[$n("shake",[Qt("normal => shake",Gt(200,Ef([ze({transform:"translateX(0)"}),ze({transform:"translateX(-10px)"}),ze({transform:"translateX(10px)"}),ze({transform:"translateX(0)"})])))]),$n("popIn",[Qt(":enter",[ze({transform:"scale(0.8)",opacity:0}),Gt("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1.3)",opacity:1})),Gt("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",ze({transform:"scale(1)",opacity:1}))])]),$n("scrollUp",[Qt(":enter",[ze({transform:"translateY(100%)",opacity:0}),Gt("0.5s ease-out",ze({transform:"translateY(0)",opacity:1}))])]),$n("fadeInDelayed",[Qt(":enter",[ze({opacity:0}),Gt("1s 0.5s ease-out",ze({opacity:1}))])])]}})}return n})()},{path:"context",component:cTe},{path:"**",redirectTo:""}];let ATe=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=xt({type:n});static#n=this.\u0275inj=yt({imports:[xB.forRoot(DTe,{useHash:!0}),xB]})}return n})();const ITe=[{title:"GROUP 1",description:"The first group of bindings in the coding demonstration",bindings:[{title:"Medicinal product + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, contain at least provided ingredientes (open world assuption), no information on form."},{title:"Gender",type:"dropdown",ecl:"< 365873007 |Gender finding (finding)|",value:"",note:"Patient gender."},{title:"Medicinal product form + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details."}]},{title:"GROUP 2",description:"The second group of bindings in the coding demonstration",bindings:[{title:"Medicinal product only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, containing only the provided ingredientes (close world assuption), with no information on form."},{title:"Medicinal product form only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 732943007 |Has basis of strength substance (attribute)| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details, containing only the provided ingredientes (close world assuption)."}]}];let MTe=(()=>{class n{constructor(){}getCodingSpec(){return ITe}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Xt,Q_={version:"0.19.3"},vr=1200,ju=1252,RTe=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],MI={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},F1=function(n){-1!=RTe.indexOf(n)&&(ju=MI[0]=n)},js=function(n){vr=n,F1(n)};var K_=function(t){return String.fromCharCode(t)},RI=function(t){return String.fromCharCode(t)},Wi=null,Jz=!0,$s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function N1(n){for(var t="",e=0,i=0,r=0,o=0,s=0,a=0,c=0,l=0;l>2,s=(3&e)<<4|(i=n.charCodeAt(l++))>>4,a=(15&i)<<2|(r=n.charCodeAt(l++))>>6,c=63&r,isNaN(i)?a=c=64:isNaN(r)&&(c=64),t+=$s.charAt(o)+$s.charAt(s)+$s.charAt(a)+$s.charAt(c);return t}function xs(n){var t="",o=0,s=0,a=0,c=0;n=n.replace(/^data:([^\/]+\/[^\/]+)?;base64\,/,"").replace(/[^\w\+\/\=]/g,"");for(var l=0;l>4),64!==(a=$s.indexOf(n.charAt(l++)))&&(t+=String.fromCharCode((15&s)<<4|a>>2)),64!==(c=$s.indexOf(n.charAt(l++)))&&(t+=String.fromCharCode((3&a)<<6|c));return t}var rn=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),tc=function(){if(typeof Buffer<"u"){var n=!Buffer.from;if(!n)try{Buffer.from("foo","utf8")}catch{n=!0}return n?function(t,e){return e?new Buffer(t,e):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}(),X_=function(){if(typeof Buffer>"u")return!1;var n=tc([65,0]);return!!n&&1==n.toString("utf16le").length}();function _d(n){return rn?Buffer.alloc?Buffer.alloc(n):new Buffer(n):typeof Uint8Array<"u"?new Uint8Array(n):new Array(n)}function ej(n){return rn?Buffer.allocUnsafe?Buffer.allocUnsafe(n):new Buffer(n):typeof Uint8Array<"u"?new Uint8Array(n):new Array(n)}var Lo=function(t){return rn?tc(t,"binary"):t.split("").map(function(e){return 255&e.charCodeAt(0)})};function Y_(n){if(typeof ArrayBuffer>"u")return Lo(n);for(var t=new ArrayBuffer(n.length),e=new Uint8Array(t),i=0;i!=n.length;++i)e[i]=255&n.charCodeAt(i);return t}function nc(n){if(Array.isArray(n))return n.map(function(i){return String.fromCharCode(i)}).join("");for(var t=[],e=0;e=0;)t+=n.charAt(e--);return t}function xa(n,t){var e=""+n;return e.length>=t?e:In("0",t-e.length)+e}function PI(n,t){var e=""+n;return e.length>=t?e:In(" ",t-e.length)+e}function L1(n,t){var e=""+n;return e.length>=t?e:e+In(" ",t-e.length)}var tj=Math.pow(2,32);function Nm(n,t){return n>tj||n<-tj?function VTe(n,t){var e=""+Math.round(n);return e.length>=t?e:In("0",t-e.length)+e}(n,t):function UTe(n,t){var e=""+n;return e.length>=t?e:In("0",t-e.length)+e}(Math.round(n),t)}function B1(n,t){return n.length>=7+(t=t||0)&&103==(32|n.charCodeAt(t))&&101==(32|n.charCodeAt(t+1))&&110==(32|n.charCodeAt(t+2))&&101==(32|n.charCodeAt(t+3))&&114==(32|n.charCodeAt(t+4))&&97==(32|n.charCodeAt(t+5))&&108==(32|n.charCodeAt(t+6))}var nj=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],OI=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],kt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},ij={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},zTe={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function V1(n,t,e){for(var i=n<0?-1:1,r=n*i,o=0,s=1,a=0,c=1,l=0,d=0,u=Math.floor(r);lt&&(l>t?(d=c,a=o):(d=l,a=s)),!e)return[0,i*a,d];var h=Math.floor(i*a/d);return[h,i*a-h*d,d]}function bd(n,t,e){if(n>2958465||n<0)return null;var i=0|n,r=Math.floor(86400*(n-i)),o=0,s=[],a={D:i,T:r,u:86400*(n-i)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(a.u)<1e-6&&(a.u=0),t&&t.date1904&&(i+=1462),a.u>.9999&&(a.u=0,86400==++r&&(a.T=r=0,++i,++a.D)),60===i)s=e?[1317,10,29]:[1900,2,29],o=3;else if(0===i)s=e?[1317,8,29]:[1900,1,0],o=6;else{i>60&&--i;var c=new Date(1900,0,1);c.setDate(c.getDate()+i-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],o=c.getDay(),i<60&&(o=(o+6)%7),e&&(o=function QTe(n,t){t[0]-=581;var e=n.getDay();return n<60&&(e=(e+6)%7),e}(c,s))}return a.y=s[0],a.m=s[1],a.d=s[2],a.S=r%60,r=Math.floor(r/60),a.M=r%60,r=Math.floor(r/60),a.H=r,a.q=o,a}var rj=new Date(1899,11,31,0,0,0),jTe=rj.getTime(),$Te=new Date(1900,2,1,0,0,0);function oj(n,t){var e=n.getTime();return t?e-=1262304e5:n>=$Te&&(e+=864e5),(e-(jTe+6e4*(n.getTimezoneOffset()-rj.getTimezoneOffset())))/864e5}function NI(n){return-1==n.indexOf(".")?n:n.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function $u(n,t){switch(typeof n){case"string":return n;case"boolean":return n?"TRUE":"FALSE";case"number":return(0|n)===n?n.toString(10):function J_(n){var e,t=Math.floor(Math.log(Math.abs(n))*Math.LOG10E);return e=t>=-4&&t<=-1?n.toPrecision(10+t):Math.abs(t)<=9?function WTe(n){var t=n<0?12:11,e=NI(n.toFixed(12));return e.length<=t||(e=n.toPrecision(10)).length<=t?e:n.toExponential(5)}(n):10===t?n.toFixed(10).substr(0,12):function qTe(n){var t=NI(n.toFixed(11));return t.length>(n<0?12:11)||"0"===t||"-0"===t?n.toPrecision(6):t}(n),NI(function GTe(n){return-1==n.indexOf("E")?n:n.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(e.toUpperCase()))}(n);case"undefined":return"";case"object":if(null==n)return"";if(n instanceof Date)return Yo(14,oj(n,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+n)}function KTe(n,t,e,i){var c,r="",o=0,s=0,a=e.y,l=0;switch(n){case 98:a=e.y+543;case 121:switch(t.length){case 1:case 2:c=a%100,l=2;break;default:c=a%1e4,l=4}break;case 109:switch(t.length){case 1:case 2:c=e.m,l=t.length;break;case 3:return OI[e.m-1][1];case 5:return OI[e.m-1][0];default:return OI[e.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=e.d,l=t.length;break;case 3:return nj[e.q][0];default:return nj[e.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(e.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=e.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=e.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if("s"!=t&&"ss"!=t&&".0"!=t&&".00"!=t&&".000"!=t)throw"bad second format: "+t;return 0!==e.u||"s"!=t&&"ss"!=t?(s=i>=2?3===i?1e3:100:1===i?10:1,(o=Math.round(s*(e.S+e.u)))>=60*s&&(o=0),"s"===t?0===o?"0":""+o/s:(r=xa(o,2+i),"ss"===t?r.substr(0,2):"."+r.substr(2,t.length-1))):xa(e.S,t.length);case 90:switch(t){case"[h]":case"[hh]":c=24*e.D+e.H;break;case"[m]":case"[mm]":c=60*(24*e.D+e.H)+e.M;break;case"[s]":case"[ss]":c=60*(60*(24*e.D+e.H)+e.M)+Math.round(e.S+e.u);break;default:throw"bad abstime format: "+t}l=3===t.length?1:2;break;case 101:c=a,l=1}return l>0?xa(c,l):""}function nl(n){if(n.length<=3)return n;for(var e=n.length%3,i=n.substr(0,e);e!=n.length;e+=3)i+=(i.length>0?",":"")+n.substr(e,3);return i}var sj=/%/g;function aj(n,t){var e,i=n.indexOf("E")-n.indexOf(".")-1;if(n.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+aj(n,-t);var r=n.indexOf(".");-1===r&&(r=n.indexOf("E"));var o=Math.floor(Math.log(t)*Math.LOG10E)%r;if(o<0&&(o+=r),-1===(e=(t/Math.pow(10,o)).toPrecision(i+1+(r+o)%r)).indexOf("e")){var s=Math.floor(Math.log(t)*Math.LOG10E);for(-1===e.indexOf(".")?e=e.charAt(0)+"."+e.substr(1)+"E+"+(s-e.length+o):e+="E+"+(s-o);"0."===e.substr(0,2);)e=(e=e.charAt(0)+e.substr(2,r)+"."+e.substr(2+r)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");e=e.replace(/\+-/,"-")}e=e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(a,c,l,d){return c+l+d.substr(0,(r+o)%r)+"."+d.substr(o)+"E"})}else e=t.toExponential(i);return n.match(/E\+00$/)&&e.match(/e[+-]\d$/)&&(e=e.substr(0,e.length-1)+"0"+e.charAt(e.length-1)),n.match(/E\-/)&&e.match(/e\+/)&&(e=e.replace(/e\+/,"e")),e.replace("e","E")}var cj=/# (\?+)( ?)\/( ?)(\d+)/,lj=/^#*0*\.([0#]+)/,dj=/\).*[0#]/,uj=/\(###\) ###\\?-####/;function Bo(n){for(var e,t="",i=0;i!=n.length;++i)switch(e=n.charCodeAt(i)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(e)}return t}function hj(n,t){var e=Math.pow(10,t);return""+Math.round(n*e)/e}function fj(n,t){var e=n-Math.floor(n),i=Math.pow(10,t);return t<(""+Math.round(e*i)).length?0:Math.round(e*i)}function Gs(n,t,e){if(40===n.charCodeAt(0)&&!t.match(dj)){var i=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return e>=0?Gs("n",i,e):"("+Gs("n",i,-e)+")"}if(44===t.charCodeAt(t.length-1))return function YTe(n,t,e){for(var i=t.length-1;44===t.charCodeAt(i-1);)--i;return il(n,t.substr(0,i),e/Math.pow(10,3*(t.length-i)))}(n,t,e);if(-1!==t.indexOf("%"))return function XTe(n,t,e){var i=t.replace(sj,""),r=t.length-i.length;return il(n,i,e*Math.pow(10,2*r))+In("%",r)}(n,t,e);if(-1!==t.indexOf("E"))return aj(t,e);if(36===t.charCodeAt(0))return"$"+Gs(n,t.substr(" "==t.charAt(1)?2:1),e);var r,o,s,a,c=Math.abs(e),l=e<0?"-":"";if(t.match(/^00+$/))return l+Nm(c,t.length);if(t.match(/^[#?]+$/))return"0"===(r=Nm(e,0))&&(r=""),r.length>t.length?r:Bo(t.substr(0,t.length-r.length))+r;if(o=t.match(cj))return function ZTe(n,t,e){var i=parseInt(n[4],10),r=Math.round(t*i),o=Math.floor(r/i),s=r-o*i,a=i;return e+(0===o?"":""+o)+" "+(0===s?In(" ",n[1].length+1+n[4].length):PI(s,n[1].length)+n[2]+"/"+n[3]+xa(a,n[4].length))}(o,c,l);if(t.match(/^#+0+$/))return l+Nm(c,t.length-t.indexOf("0"));if(o=t.match(lj))return r=hj(e,o[1].length).replace(/^([^\.]+)$/,"$1."+Bo(o[1])).replace(/\.$/,"."+Bo(o[1])).replace(/\.(\d*)$/,function(m,g){return"."+g+In("0",Bo(o[1]).length-g.length)}),-1!==t.indexOf("0.")?r:r.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),o=t.match(/^(0*)\.(#*)$/))return l+hj(c,o[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,o[1].length?"0.":".");if(o=t.match(/^#{1,3},##0(\.?)$/))return l+nl(Nm(c,0));if(o=t.match(/^#,##0\.([#0]*0)$/))return e<0?"-"+Gs(n,t,-e):nl(""+(Math.floor(e)+function eSe(n,t){return t<(""+Math.round((n-Math.floor(n))*Math.pow(10,t))).length?1:0}(e,o[1].length)))+"."+xa(fj(e,o[1].length),o[1].length);if(o=t.match(/^#,#*,#0/))return Gs(n,t.replace(/^#,#*,/,""),e);if(o=t.match(/^([0#]+)(\\?-([0#]+))+$/))return r=Om(Gs(n,t.replace(/[\\-]/g,""),e)),s=0,Om(Om(t.replace(/\\/g,"")).replace(/[0#]/g,function(m){return s-2147483648?""+(n>=0?0|n:n-1|0):""+Math.floor(n)}(e)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(m){return"00,"+(m.length<3?xa(0,3-m.length):"")+m})+"."+xa(s,o[1].length);switch(t){case"###,##0.00":return Gs(n,"#,##0.00",e);case"###,###":case"##,###":case"#,###":var f=nl(Nm(c,0));return"0"!==f?l+f:"";case"###,###.00":return Gs(n,"###,##0.00",e).replace(/^0\./,".");case"#,###.00":return Gs(n,"#,##0.00",e).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function mj(n,t){var e,i=n.indexOf("E")-n.indexOf(".")-1;if(n.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+mj(n,-t);var r=n.indexOf(".");-1===r&&(r=n.indexOf("E"));var o=Math.floor(Math.log(t)*Math.LOG10E)%r;if(o<0&&(o+=r),!(e=(t/Math.pow(10,o)).toPrecision(i+1+(r+o)%r)).match(/[Ee]/)){var s=Math.floor(Math.log(t)*Math.LOG10E);-1===e.indexOf(".")?e=e.charAt(0)+"."+e.substr(1)+"E+"+(s-e.length+o):e+="E+"+(s-o),e=e.replace(/\+-/,"-")}e=e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(a,c,l,d){return c+l+d.substr(0,(r+o)%r)+"."+d.substr(o)+"E"})}else e=t.toExponential(i);return n.match(/E\+00$/)&&e.match(/e[+-]\d$/)&&(e=e.substr(0,e.length-1)+"0"+e.charAt(e.length-1)),n.match(/E\-/)&&e.match(/e\+/)&&(e=e.replace(/e\+/,"e")),e.replace("e","E")}function ic(n,t,e){if(40===n.charCodeAt(0)&&!t.match(dj)){var i=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return e>=0?ic("n",i,e):"("+ic("n",i,-e)+")"}if(44===t.charCodeAt(t.length-1))return function nSe(n,t,e){for(var i=t.length-1;44===t.charCodeAt(i-1);)--i;return il(n,t.substr(0,i),e/Math.pow(10,3*(t.length-i)))}(n,t,e);if(-1!==t.indexOf("%"))return function iSe(n,t,e){var i=t.replace(sj,""),r=t.length-i.length;return il(n,i,e*Math.pow(10,2*r))+In("%",r)}(n,t,e);if(-1!==t.indexOf("E"))return mj(t,e);if(36===t.charCodeAt(0))return"$"+ic(n,t.substr(" "==t.charAt(1)?2:1),e);var r,o,s,a,c=Math.abs(e),l=e<0?"-":"";if(t.match(/^00+$/))return l+xa(c,t.length);if(t.match(/^[#?]+$/))return r=""+e,0===e&&(r=""),r.length>t.length?r:Bo(t.substr(0,t.length-r.length))+r;if(o=t.match(cj))return function JTe(n,t,e){return e+(0===t?"":""+t)+In(" ",n[1].length+2+n[4].length)}(o,c,l);if(t.match(/^#+0+$/))return l+xa(c,t.length-t.indexOf("0"));if(o=t.match(lj))return r=(r=(""+e).replace(/^([^\.]+)$/,"$1."+Bo(o[1])).replace(/\.$/,"."+Bo(o[1]))).replace(/\.(\d*)$/,function(m,g){return"."+g+In("0",Bo(o[1]).length-g.length)}),-1!==t.indexOf("0.")?r:r.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),o=t.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,o[1].length?"0.":".");if(o=t.match(/^#{1,3},##0(\.?)$/))return l+nl(""+c);if(o=t.match(/^#,##0\.([#0]*0)$/))return e<0?"-"+ic(n,t,-e):nl(""+e)+"."+In("0",o[1].length);if(o=t.match(/^#,#*,#0/))return ic(n,t.replace(/^#,#*,/,""),e);if(o=t.match(/^([0#]+)(\\?-([0#]+))+$/))return r=Om(ic(n,t.replace(/[\\-]/g,""),e)),s=0,Om(Om(t.replace(/\\/g,"")).replace(/[0#]/g,function(m){return s-1||"\\"==e&&"-"==n.charAt(t+1)&&"0#".indexOf(n.charAt(t+2))>-1););break;case"?":for(;n.charAt(++t)===e;);break;case"*":++t,(" "==n.charAt(t)||"*"==n.charAt(t))&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t-1;);break;default:++t}return!1}var gj=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function _j(n,t){if(null==t)return!1;var e=parseFloat(t[2]);switch(t[1]){case"=":if(n==e)return!0;break;case">":if(n>e)return!0;break;case"<":if(n":if(n!=e)return!0;break;case">=":if(n>=e)return!0;break;case"<=":if(n<=e)return!0}return!1}function Yo(n,t,e){null==e&&(e={});var i="";switch(typeof n){case"string":i="m/d/yy"==n&&e.dateNF?e.dateNF:n;break;case"number":null==(i=14==n&&e.dateNF?e.dateNF:(null!=e.table?e.table:kt)[n])&&(i=e.table&&e.table[ij[n]]||kt[ij[n]]),null==i&&(i=zTe[n]||"General")}if(B1(i,0))return $u(t,e);t instanceof Date&&(t=oj(t,e.date1904));var r=function sSe(n,t){var e=function rSe(n){for(var t=[],e=!1,i=0,r=0;i-1&&--i,e.length>4)throw new Error("cannot find right format for |"+e.join("|")+"|");if("number"!=typeof t)return[4,4===e.length||r>-1?e[e.length-1]:"@"];switch(e.length){case 1:e=r>-1?["General","General","General",e[0]]:[e[0],e[0],e[0],"@"];break;case 2:e=r>-1?[e[0],e[0],e[0],e[1]]:[e[0],e[1],e[0],"@"];break;case 3:e=r>-1?[e[0],e[1],e[0],e[2]]:[e[0],e[1],e[2],"@"]}var o=t>0?e[0]:t<0?e[1]:e[2];if(-1===e[0].indexOf("[")&&-1===e[1].indexOf("["))return[i,o];if(null!=e[0].match(/\[[=<>]/)||null!=e[1].match(/\[[=<>]/)){var s=e[0].match(gj),a=e[1].match(gj);return _j(t,s)?[i,e[0]]:_j(t,a)?[i,e[1]]:[i,e[null!=s&&null!=a?2:1]]}return[i,o]}(i,t);if(B1(r[1]))return $u(t,e);if(!0===t)t="TRUE";else if(!1===t)t="FALSE";else if(""===t||null==t)return"";return function oSe(n,t,e,i){for(var l,d,u,r=[],o="",s=0,a="",c="t",h="H";s=12?n.charAt(s+2):a),g.t="T",h="h",s+=3):"AM/PM"===n.substr(s,5).toUpperCase()?(null!=l&&(g.v=l.H>=12?"PM":"AM"),g.t="T",s+=5,h="h"):"\u4e0a\u5348/\u4e0b\u5348"===n.substr(s,5).toUpperCase()?(null!=l&&(g.v=l.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),g.t="T",s+=5,h="h"):(g.t="t",++s),null==l&&"T"===g.t)return"";r[r.length]=g,c=a;break;case"[":for(o=a;"]"!==n.charAt(s++)&&s-1&&(o=(o.match(/\$([^-\[\]]*)/)||[])[1]||"$",vd(n)||(r[r.length]={t:"t",v:o}));break;case".":if(null!=l){for(o=a;++s-1;)o+=a;r[r.length]={t:"n",v:o};break;case"?":for(o=a;n.charAt(++s)===a;)o+=a;r[r.length]={t:a,v:o},c=a;break;case"*":++s,(" "==n.charAt(s)||"*"==n.charAt(s))&&++s;break;case"(":case")":r[r.length]={t:1===i?"t":a,v:a},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(o=a;s-1;)o+=n.charAt(s);r[r.length]={t:"D",v:o};break;case" ":r[r.length]={t:a,v:a},++s;break;case"$":r[r.length]={t:"t",v:"$"},++s;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(a))throw new Error("unrecognized character "+a+" in "+n);r[r.length]={t:"t",v:a},++s}var k,p=0,b=0;for(s=r.length-1,c="t";s>=0;--s)switch(r[s].t){case"h":case"H":r[s].t=h,c="h",p<1&&(p=1);break;case"s":(k=r[s].v.match(/\.0+$/))&&(b=Math.max(b,k[0].length-1)),p<3&&(p=3);case"d":case"y":case"M":case"e":c=r[s].t;break;case"m":"s"===c&&(r[s].t="M",p<2&&(p=2));break;case"X":break;case"Z":p<1&&r[s].v.match(/[Hh]/)&&(p=1),p<2&&r[s].v.match(/[Mm]/)&&(p=2),p<3&&r[s].v.match(/[Ss]/)&&(p=3)}switch(p){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M)}var D,w="";for(s=0;s0){40==w.charCodeAt(0)?(P=t<0&&45===w.charCodeAt(0)?-t:t,S=il("n",w,P)):(S=il("n",w,P=t<0&&i>1?-t:t),P<0&&r[0]&&"t"==r[0].t&&(S=S.substr(1),r[0].v="-"+r[0].v)),D=S.length-1;var U=r.length;for(s=0;s-1){U=s;break}var V=r.length;if(U===r.length&&-1===S.indexOf("E")){for(s=r.length-1;s>=0;--s)null==r[s]||-1==="n?".indexOf(r[s].t)||(D>=r[s].v.length-1?r[s].v=S.substr(1+(D-=r[s].v.length),r[s].v.length):D<0?r[s].v="":(r[s].v=S.substr(0,D+1),D=-1),r[s].t="t",V=s);D>=0&&V=0;--s)if(null!=r[s]&&-1!=="n?".indexOf(r[s].t)){for(d=r[s].v.indexOf(".")>-1&&s===U?r[s].v.indexOf(".")-1:r[s].v.length-1,j=r[s].v.substr(d+1);d>=0;--d)D>=0&&("0"===r[s].v.charAt(d)||"#"===r[s].v.charAt(d))&&(j=S.charAt(D--)+j);r[s].v=j,r[s].t="t",V=s}for(D>=0&&V-1&&s===U?r[s].v.indexOf(".")+1:0,j=r[s].v.substr(0,d);d-1&&(r[s].v=il(r[s].t,r[s].v,P=i>1&&t<0&&s>0&&"-"===r[s-1].v?-t:t),r[s].t="t");var q="";for(s=0;s!==r.length;++s)null!=r[s]&&(q+=r[s].v);return q}(r[1],t,e,r[0])}function LI(n,t){if("number"!=typeof t){t=+t||-1;for(var e=0;e<392;++e)if(null!=kt[e]){if(kt[e]==n){t=e;break}}else t<0&&(t=e);t<0&&(t=391)}return kt[t]=n,t}function e0(n){for(var t=0;392!=t;++t)void 0!==n[t]&&LI(n[t],t)}function Lm(){kt=function HTe(n){return n||(n={}),n[0]="General",n[1]="0",n[2]="0.00",n[3]="#,##0",n[4]="#,##0.00",n[9]="0%",n[10]="0.00%",n[11]="0.00E+00",n[12]="# ?/?",n[13]="# ??/??",n[14]="m/d/yy",n[15]="d-mmm-yy",n[16]="d-mmm",n[17]="mmm-yy",n[18]="h:mm AM/PM",n[19]="h:mm:ss AM/PM",n[20]="h:mm",n[21]="h:mm:ss",n[22]="m/d/yy h:mm",n[37]="#,##0 ;(#,##0)",n[38]="#,##0 ;[Red](#,##0)",n[39]="#,##0.00;(#,##0.00)",n[40]="#,##0.00;[Red](#,##0.00)",n[45]="mm:ss",n[46]="[h]:mm:ss",n[47]="mmss.0",n[48]="##0.0E+0",n[49]="@",n[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',n}()}var vj=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,dSe={"d.m":"d\\.m"};function yd(n,t){return LI(dSe[n]||n,t)}var rl,yj=function(){var n={version:"1.2.0"},e=function t(){for(var S=0,U=new Array(256),V=0;256!=V;++V)U[V]=S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=V)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1;return typeof Int32Array<"u"?new Int32Array(U):U}(),r=function i(S){var U=0,V=0,q=0,J=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(q=0;256!=q;++q)J[q]=S[q];for(q=0;256!=q;++q)for(V=S[q],U=256+q;U<4096;U+=256)V=J[U]=V>>>8^S[255&V];var G=[];for(q=1;16!=q;++q)G[q-1]=typeof Int32Array<"u"&&"function"==typeof J.subarray?J.subarray(256*q,256*q+256):J.slice(256*q,256*q+256);return G}(e),o=r[0],s=r[1],a=r[2],c=r[3],l=r[4],d=r[5],u=r[6],h=r[7],f=r[8],m=r[9],g=r[10],p=r[11],b=r[12],k=r[13],w=r[14];return n.table=e,n.bstr=function D(S,U){for(var V=-1^U,q=0,J=S.length;q>>8^e[255&(V^S.charCodeAt(q++))];return~V},n.buf=function j(S,U){for(var V=-1^U,q=S.length-15,J=0;J>8&255]^b[S[J++]^V>>16&255]^p[S[J++]^V>>>24]^g[S[J++]]^m[S[J++]]^f[S[J++]]^h[S[J++]]^u[S[J++]]^d[S[J++]]^l[S[J++]]^c[S[J++]]^a[S[J++]]^s[S[J++]]^o[S[J++]]^e[S[J++]];for(q+=15;J>>8^e[255&(V^S[J++])];return~V},n.str=function P(S,U){for(var V=-1^U,q=0,J=S.length,G=0,ve=0;q>>8^e[255&(V^G)]:G<2048?V=(V=V>>>8^e[255&(V^(192|G>>6&31))])>>>8^e[255&(V^(128|63&G))]:G>=55296&&G<57344?(G=64+(1023&G),ve=1023&S.charCodeAt(q++),V=(V=(V=(V=V>>>8^e[255&(V^(240|G>>8&7))])>>>8^e[255&(V^(128|G>>2&63))])>>>8^e[255&(V^(128|ve>>6&15|(3&G)<<4))])>>>8^e[255&(V^(128|63&ve))]):V=(V=(V=V>>>8^e[255&(V^(224|G>>12&15))])>>>8^e[255&(V^(128|G>>6&63))])>>>8^e[255&(V^(128|63&G))];return~V},n}(),wt=function(){var c,t={};function i(T){if("/"==T.charAt(T.length-1))return-1===T.slice(0,-1).indexOf("/")?T:i(T.slice(0,-1));var N=T.lastIndexOf("/");return-1===N?T:T.slice(0,N+1)}function r(T){if("/"==T.charAt(T.length-1))return r(T.slice(0,-1));var N=T.lastIndexOf("/");return-1===N?T:T.slice(N+1)}function o(T,N){"string"==typeof N&&(N=new Date(N));var I=N.getHours();I=(I=I<<6|N.getMinutes())<<5|N.getSeconds()>>>1,T.write_shift(2,I);var R=N.getFullYear()-1980;R=(R=R<<4|N.getMonth()+1)<<5|N.getDate(),T.write_shift(2,R)}function a(T){xr(T,0);for(var N={},I=0;T.l<=T.length-4;){var R=T.read_shift(2),L=T.read_shift(2),B=T.l+L,te={};switch(R){case 21589:1&(I=T.read_shift(1))&&(te.mtime=T.read_shift(4)),L>5&&(2&I&&(te.atime=T.read_shift(4)),4&I&&(te.ctime=T.read_shift(4))),te.mtime&&(te.mt=new Date(1e3*te.mtime));break;case 1:var ue=T.read_shift(4),ee=T.read_shift(4);te.usz=ee*Math.pow(2,32)+ue,ue=T.read_shift(4),ee=T.read_shift(4),te.csz=ee*Math.pow(2,32)+ue}T.l=B,N[R]=te}return N}function l(){return c||(c=rl)}function d(T,N){if(80==T[0]&&75==T[1])return gq(T,N);if(109==(32|T[0])&&105==(32|T[1]))return function g5e(T,N){if("mime-version:"!=le(T.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var I=N&&N.root||"",R=(rn&&Buffer.isBuffer(T)?T.toString("binary"):le(T)).split("\r\n"),L=0,B="";for(L=0;L0&&(I=(I=I.slice(0,I.length-1)).slice(0,I.lastIndexOf("/")+1),B.slice(0,I.length)!=I););var te=(R[1]||"").match(/boundary="(.*?)"/);if(!te)throw new Error("MAD cannot find boundary");var ue="--"+(te[1]||""),ie={FileIndex:[],FullPaths:[]};S(ie);var Fe,Oe=0;for(L=0;L=L&&(Oe-=L),!te[Oe]){ee=[];var He=[];for(Fe=Oe;Fe>=0;){He[Fe]=!0,te[Fe]=!0,ue[ue.length]=Fe,ee.push(T[Fe]);var Re=I[Math.floor(4*Fe/R)];if(R<4+(ut=4*Fe&ne))throw new Error("FAT boundary crossed: "+Fe+" 4 "+R);if(!T[Re]||He[Fe=qu(T[Re],ut)])break}B[Oe]={nodes:ue,data:zj([ee])}}return B}(Ht,te,ne,R);te0&&ue!==ve&&(di[ue].name="!MiniFAT"),di[ne[0]].name="!FAT",di.fat_addrs=ne,di.ssz=R;var dr=[],Ts=[],H0=[];(function w(T,N,I,R,L,B,te,ue){for(var ut,ee=0,ne=R.length?2:0,ie=N[T].data,Fe=0,Oe=0;Fe0&&ee!==ve&&(N[ee].name="!StreamData")):Re.size>=4096?(Re.storage="fat",void 0===N[Re.start]&&(N[Re.start]=b(I,Re.start,N.fat_addrs,N.ssz)),N[Re.start].name=Re.name,Re.content=N[Re.start].data.slice(0,Re.size)):(Re.storage="minifat",Re.size<0?Re.size=0:ee!==ve&&Re.start!==ve&&N[ee]&&(Re.content=g(Re,N[ee].data,(N[ue]||{}).data))),Re.content&&xr(Re.content,0),B[ut]=Re,te.push(Re)}})(te,di,Ht,dr,L,{},Ts,ue),function m(T,N,I){for(var R=0,L=0,B=0,te=0,ue=0,ee=I.length,ne=[],ie=[];R0&&te>=0;)B.push(N.slice(te*G,te*G+G)),L-=G,te=qu(I,4*te);return 0===B.length?se(0):rr(B).slice(0,T.size)}function p(T,N,I,R,L){var B=ve;if(T===ve){if(0!==N)throw new Error("DIFAT chain shorter than expected")}else if(-1!==T){var te=I[T],ue=(R>>>2)-1;if(!te)return;for(var ee=0;ee=1&&p(qu(te,R-4),N-1,I,R,L)}}function b(T,N,I,R,L){var B=[],te=[];L||(L=[]);var ue=R-1,ee=0,ne=0;for(ee=N;ee>=0;){L[ee]=!0,B[B.length]=ee,te.push(T[ee]);var ie=I[Math.floor(4*ee/R)];if(R<4+(ne=4*ee&ue))throw new Error("FAT boundary crossed: "+ee+" 4 "+R);if(!T[ie])break;ee=qu(T[ie],ne)}return{nodes:B,data:zj([te])}}function D(T,N){return new Date(1e3*(Fr(T,N+4)/1e7*Math.pow(2,32)+Fr(T,N)/1e7-11644473600))}function S(T,N){var I=N||{},R=I.root||"Root Entry";if(T.FullPaths||(T.FullPaths=[]),T.FileIndex||(T.FileIndex=[]),T.FullPaths.length!==T.FileIndex.length)throw new Error("inconsistent CFB structure");0===T.FullPaths.length&&(T.FullPaths[0]=R+"/",T.FileIndex[0]={name:R,type:5}),I.CLSID&&(T.FileIndex[0].clsid=I.CLSID),function U(T){var N="\x01Sh33tJ5";if(!wt.find(T,"/"+N)){var I=se(4);I[0]=55,I[1]=I[3]=50,I[2]=54,T.FileIndex.push({name:N,type:2,content:I,size:4,L:69,R:69,C:69}),T.FullPaths.push(T.FullPaths[0]+N),V(T)}}(T)}function V(T,N){S(T);for(var I=!1,R=!1,L=T.FullPaths.length-1;L>=0;--L){var B=T.FileIndex[L];switch(B.type){case 0:R?I=!0:(T.FileIndex.pop(),T.FullPaths.pop());break;case 1:case 2:case 5:R=!0,isNaN(B.R*B.L*B.C)&&(I=!0),B.R>-1&&B.L>-1&&B.R==B.L&&(I=!0);break;default:I=!0}}if(I||N){var te=new Date(1987,1,19),ue=0,ee=Object.create?Object.create(null):{},ne=[];for(L=0;L1?1:-1,Fe.size=0,Fe.type=5;else if("/"==Oe.slice(-1)){for(ue=L+1;ue=ne.length?-1:ue,ue=L+1;ue=ne.length?-1:ue,Fe.type=1}else i(T.FullPaths[L+1]||"")==i(Oe)&&(Fe.R=L+1),Fe.type=2}}}function q(T,N){var I=N||{};if("mad"==I.fileType)return function _5e(T,N){for(var I=N||{},R=I.boundary||"SheetJS",L=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(R="------="+R).slice(2)+'"',"","",""],B=T.FullPaths[0],te=B,ue=T.FileIndex[0],ee=1;ee=32&&ut<128&&++Fe;var Re=Fe>=4*Oe/5;L.push(R),L.push("Content-Location: "+(I.root||"file:///C:/SheetJS/")+te),L.push("Content-Transfer-Encoding: "+(Re?"quoted-printable":"base64")),L.push("Content-Type: "+u5e(ue,te)),L.push(""),L.push(Re?f5e(ie):h5e(ie))}return L.push(R+"--\r\n"),L.join("\r\n")}(T,I);if("zip"===(V(T),I.fileType))return function d5e(T,N){var I=N||{},R=[],L=[],B=se(1),te=I.compression?8:0,ue=0,ne=0,ie=0,Fe=0,Oe=0,ut=T.FullPaths[0],He=ut,Re=T.FileIndex[0],Ht=[],di=0;for(ne=1;ne0&&(ts<4096?He+=ts+63>>6:Re+=ts+511>>9)}}for(var dr=ut.FullPaths.length+3>>2,H0=He+127>>7,z0=(He+7>>3)+Re+dr+H0,hh=z0+127>>7,vR=hh<=109?0:Math.ceil((hh-109)/127);z0+hh+vR+127>>7>hh;)vR=++hh<=109?0:Math.ceil((hh-109)/127);var fl=[1,vR,hh,H0,dr,Re,He,0];return ut.FileIndex[0].size=He<<6,fl[7]=(ut.FileIndex[0].start=fl[0]+fl[1]+fl[2]+fl[3]+fl[4]+fl[5])+(fl[6]+7>>3),fl}(T),L=se(R[7]<<9),B=0,te=0;for(B=0;B<8;++B)L.write_shift(1,me[B]);for(B=0;B<8;++B)L.write_shift(2,0);for(L.write_shift(2,62),L.write_shift(2,3),L.write_shift(2,65534),L.write_shift(2,9),L.write_shift(2,6),B=0;B<3;++B)L.write_shift(2,0);for(L.write_shift(4,0),L.write_shift(4,R[2]),L.write_shift(4,R[0]+R[1]+R[2]+R[3]-1),L.write_shift(4,0),L.write_shift(4,4096),L.write_shift(4,R[3]?R[0]+R[1]+R[2]-1:ve),L.write_shift(4,R[3]),L.write_shift(-4,R[1]?R[0]-1:ve),L.write_shift(4,R[1]),B=0;B<109;++B)L.write_shift(-4,B>9));for(ue(R[6]+7>>3);511&L.l;)L.write_shift(-4,Y.ENDOFCHAIN);for(te=B=0,ee=0;ee=4096)&&(ie.start=te,ue(ne+63>>6));for(;511&L.l;)L.write_shift(-4,Y.ENDOFCHAIN);for(B=0;B32&&(console.error("Name "+Oe+" will be truncated to "+Oe.slice(0,32)),Oe=Oe.slice(0,32)),ne=2*(Oe.length+1),L.write_shift(64,Oe,"utf16le"),L.write_shift(2,ne),L.write_shift(1,ie.type),L.write_shift(1,ie.color),L.write_shift(-4,ie.L),L.write_shift(-4,ie.R),L.write_shift(-4,ie.C),ie.clsid)L.write_shift(16,ie.clsid,"hex");else for(ee=0;ee<4;++ee)L.write_shift(4,0);L.write_shift(4,ie.state||0),L.write_shift(4,0),L.write_shift(4,0),L.write_shift(4,0),L.write_shift(4,0),L.write_shift(4,ie.start),L.write_shift(4,ie.size),L.write_shift(4,0)}else{for(ee=0;ee<17;++ee)L.write_shift(4,0);for(ee=0;ee<3;++ee)L.write_shift(4,-1);for(ee=0;ee<12;++ee)L.write_shift(4,0)}}for(B=1;B=4096)if(L.l=ie.start+1<<9,rn&&Buffer.isBuffer(ie.content))ie.content.copy(L,L.l,0,ie.size),L.l+=ie.size+511&-512;else{for(ee=0;ee0&&ie.size<4096)if(rn&&Buffer.isBuffer(ie.content))ie.content.copy(L,L.l,0,ie.size),L.l+=ie.size+63&-64;else{for(ee=0;ee>16|N>>8|N));function M(T,N){var I=Ue[255&T];return N<=8?I>>>8-N:(I=I<<8|Ue[T>>8&255],N<=16?I>>>16-N:(I=I<<8|Ue[T>>16&255])>>>24-N)}function Rt(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=6?0:T[R+1]<<8))>>>I&3}function Cn(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=5?0:T[R+1]<<8))>>>I&7}function dn(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=3?0:T[R+1]<<8))>>>I&31}function wi(T,N){var I=7&N,R=N>>>3;return(T[R]|(I<=1?0:T[R+1]<<8))>>>I&127}function Fn(T,N,I){var R=7&N,L=N>>>3,te=T[L]>>>R;return I<8-R||(te|=T[L+1]<<8-R,I<16-R)||(te|=T[L+2]<<16-R,I<24-R)||(te|=T[L+3]<<24-R),te&(1<>>3;return R<=5?T[L]|=(7&I)<>8-R),N+3}function qe(T,N,I){return T[N>>>3]|=I=(1&I)<<(7&N),N+1}function Co(T,N,I){var L=N>>>3;return T[L]|=255&(I<<=7&N),T[L+1]=I>>>=8,N+8}function Mn(T,N,I){var L=N>>>3;return T[L]|=255&(I<<=7&N),T[L+1]=255&(I>>>=8),T[L+2]=I>>>8,N+16}function Zn(T,N){var I=T.length,R=2*I>N?2*I:N+5,L=0;if(I>=N)return T;if(rn){var B=ej(R);if(T.copy)T.copy(B);else for(;L>R-Fe,te=(1<=0;--te)N[ue|te<0;)ee[ee.l++]=ue[ne++]}return ee.l}(ee,ne):function te(ue,ee){for(var ne=0,ie=0,Fe=Ce?new Uint16Array(32768):[];ie0;)ee[ee.l++]=ue[ie++];ne=8*ee.l}else{ne=mt(ee,ne,+(ie+Oe==ue.length)+2);for(var ut=0;Oe-- >0;){var He=ue[ie],Re=-1,Ht=0;if((Re=Fe[ut=32767&(ut<<5^He)])&&((Re|=-32768&ie)>ie&&(Re-=32768),Re2){(He=L[Ht])<=22?ne=Co(ee,ne,Ue[He+1]>>1)-1:(Co(ee,ne,3),Co(ee,ne+=5,Ue[He-23]>>5),ne+=3);var di=He<8?0:He-4>>2;di>0&&(Mn(ee,ne,Ht-W[He]),ne+=di),ne=Co(ee,ne,Ue[He=N[ie-Re]]>>3),ne-=3;var ts=He<4?0:He-2>>1;ts>0&&(Mn(ee,ne,ie-Re-H[He]),ne+=ts);for(var dr=0;dr>>3;return(T[R]|(I<=4?0:T[R+1]<<8))>>>I&15}(T,N+=5)+4;N+=4;for(var B=0,te=Ce?new Uint8Array(19):Uo(19),ue=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ee=1,ne=Ce?new Uint8Array(8):Uo(8),ie=Ce?new Uint8Array(8):Uo(8),Fe=te.length,Oe=0;Oe>8-He;for(var Re=(1<<7-He)-1;Re>=0;--Re)Er[ut|Re<>>=3){case 16:for(B=3+Rt(T,N),N+=2,ut=Ht[Ht.length-1];B-- >0;)Ht.push(ut);break;case 17:for(B=3+Cn(T,N),N+=3;B-- >0;)Ht.push(0);break;case 18:for(B=11+wi(T,N),N+=7;B-- >0;)Ht.push(0);break;default:Ht.push(ut),ee>>0,ue=0,ee=0;!(1&R);)if(R=Cn(T,I),I+=3,R>>>1)for(R>>1==1?(ue=9,ee=5):(I=a5e(T,I),ue=uh,ee=fq);;){!N&&te>>1==1?Md[ie]:Xi[ie];if(I+=15&Fe,(Fe>>>=4)>>>8&255){if(256==Fe)break;var Oe=(Fe-=257)<8?0:Fe-4>>2;Oe>5&&(Oe=0);var ut=B+W[Fe];Oe>0&&(ut+=Fn(T,I,Oe),I+=Oe),ie=Fn(T,I,ee),I+=15&(Fe=R>>>1==1?U0[ie]:Js[ie]);var He=(Fe>>>=4)<4?0:Fe-2>>1,Re=H[Fe];for(He>0&&(Re+=Fn(T,I,He),I+=He),!N&&te>>3]|T[1+(I>>>3)]<<8;if(I+=32,ne>0)for(!N&&te0;)L[B++]=T[I>>>3],I+=8}return N?[L,I+7>>>3]:[L.slice(0,B),I+7>>>3]}(T.slice(T.l||0),N);return T.l+=R[1],R[0]}function pq(T,N){if(!T)throw new Error(N);typeof console<"u"&&console.error(N)}function gq(T,N){var I=T;xr(I,0);var B={FileIndex:[],FullPaths:[]};S(B,{root:N.root});for(var te=I.length-4;(80!=I[te]||75!=I[te+1]||5!=I[te+2]||6!=I[te+3])&&te>=0;)--te;I.l=te+4,I.l+=4;var ue=I.read_shift(2);I.l+=6;var ee=I.read_shift(4);for(I.l=ee,te=0;te>>=5);I>>>=4,R.setMilliseconds(0),R.setFullYear(I+1980),R.setMonth(B-1),R.setDate(L);var te=31&N,ue=63&(N>>>=5);return R.setHours(N>>>=6),R.setMinutes(ue),R.setSeconds(te<<1),R}(T);if(8257&B)throw new Error("Unsupported ZIP encryption");T.read_shift(4);for(var ne=T.read_shift(4),ie=T.read_shift(4),Fe=T.read_shift(2),Oe=T.read_shift(2),ut="",He=0;He"u")throw new Error("Unsupported");return new Uint8Array(n)}(n):n}function t0(n,t,e){if(typeof rl<"u"&&rl.writeFileSync)return e?rl.writeFileSync(n,t,e):rl.writeFileSync(n,t);if(typeof Deno<"u"){if(e&&"string"==typeof t)switch(e){case"utf8":t=new TextEncoder(e).encode(t);break;case"binary":t=Y_(t);break;default:throw new Error("Unsupported encoding "+e)}return Deno.writeFileSync(n,t)}var i="utf8"==e?rc(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(i,n);if(typeof Blob<"u"){var r=new Blob([hSe(i)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(r,n);if(typeof saveAs<"u")return saveAs(r,n);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var o=URL.createObjectURL(r);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(o)},6e4),chrome.downloads.download({url:o,filename:n,saveAs:!0});var s=document.createElement("a");if(null!=s.download)return s.download=n,s.href=o,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(o)},6e4),o}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var a=File(n);return a.open("w"),a.encoding="binary",Array.isArray(t)&&(t=nc(t)),a.write(t),a.close(),t}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+n)}function yi(n){for(var t=Object.keys(n),e=[],i=0;i0?e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3):t<0&&e.setTime(e.getTime()-60*e.getTimezoneOffset()*1e3),e;if(n instanceof Date)return n;if(1917==Ej.getFullYear()&&!isNaN(e.getFullYear())){var i=e.getFullYear();return n.indexOf(""+i)>-1||e.setFullYear(e.getFullYear()+100),e}var r=n.match(/\d+/g)||["2017","2","19","0","0","0"],o=new Date(+r[0],+r[1]-1,+r[2],+r[3]||0,+r[4]||0,+r[5]||0);return n.indexOf("Z")>-1&&(o=new Date(o.getTime()-60*o.getTimezoneOffset()*1e3)),o}function Gu(n,t){if(rn&&Buffer.isBuffer(n)){if(t&&X_){if(255==n[0]&&254==n[1])return rc(n.slice(2).toString("utf16le"));if(254==n[1]&&255==n[2])return rc(function Zz(n){for(var t=[],e=0;e>1;++e)t[e]=String.fromCharCode(n.charCodeAt(2*e+1)+(n.charCodeAt(2*e)<<8));return t.join("")}(n.slice(2).toString("binary")))}return n.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(255==n[0]&&254==n[1])return rc(new TextDecoder("utf-16le").decode(n.slice(2)));if(254==n[0]&&255==n[1])return rc(new TextDecoder("utf-16be").decode(n.slice(2)))}var e={"\u20ac":"\x80","\u201a":"\x82",\u0192:"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87",\u02c6:"\x88","\u2030":"\x89",\u0160:"\x8a","\u2039":"\x8b",\u0152:"\x8c",\u017d:"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99",\u0161:"\x9a","\u203a":"\x9b",\u0153:"\x9c",\u017e:"\x9e",\u0178:"\x9f"};return Array.isArray(n)&&(n=new Uint8Array(n)),new TextDecoder("latin1").decode(n).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,function(o){return e[o]||o})}catch{}for(var i=[],r=0;r!=n.length;++r)i.push(String.fromCharCode(n[r]));return i.join("")}function qn(n){if(typeof JSON<"u"&&!Array.isArray(n))return JSON.parse(JSON.stringify(n));if("object"!=typeof n||null==n)return n;if(n instanceof Date)return new Date(n.getTime());var t={};for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=qn(n[e]));return t}function In(n,t){for(var e="";e.length3&&-1==ySe.indexOf(t))return o}else if(t.replace(/[ap]m?/,"").match(/[a-z]/))return o;return s<0||s>8099||n.match(/[^-0-9:,\/\\]/)?o:r}function Jt(n,t,e){if(n.FullPaths){var i;if("string"==typeof e)return i=rn?tc(e):function BTe(n){for(var t=[],e=0,i=n.length+250,r=_d(n.length+255),o=0;o>6&31,r[e++]=128|63&s;else if(s>=55296&&s<57344){s=64+(1023&s);var a=1023&n.charCodeAt(++o);r[e++]=240|s>>8&7,r[e++]=128|s>>2&63,r[e++]=128|a>>6&15|(3&s)<<4,r[e++]=128|63&a}else r[e++]=224|s>>12&15,r[e++]=128|s>>6&63,r[e++]=128|63&s;e>i&&(t.push(r.slice(0,e)),e=0,r=_d(65535),i=65530)}return t.push(r.slice(0,e)),rr(t)}(e),wt.utils.cfb_add(n,t,i);wt.utils.cfb_add(n,t,e)}else n.file(t,e)}function VI(){return wt.utils.cfb_new()}var qi='\r\n',UI=U1({""":'"',"'":"'",">":">","<":"<","&":"&"}),HI=/[&<>'"]/g,SSe=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function en(n){return(n+"").replace(HI,function(e){return UI[e]}).replace(SSe,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}function Fj(n){return en(n).replace(/ /g,"_x0020_")}var Pj=/[\u0000-\u001f]/g;function $1(n){return(n+"").replace(HI,function(e){return UI[e]}).replace(/\n/g,"
").replace(Pj,function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"})}function zI(n){for(var t="",e=0,i=0,r=0,o=0,s=0,a=0;e191&&i<224?(s=(31&i)<<6,s|=63&r,t+=String.fromCharCode(s)):(o=n.charCodeAt(e++),i<240?t+=String.fromCharCode((15&i)<<12|(63&r)<<6|63&o):(a=((7&i)<<18|(63&r)<<12|(63&o)<<6|63&(s=n.charCodeAt(e++)))-65536,t+=String.fromCharCode(55296+(a>>>10&1023)),t+=String.fromCharCode(56320+(1023&a)))));return t}function Nj(n){var e,i,a,t=_d(2*n.length),r=1,o=0,s=0;for(i=0;i>>10&1023),e=56320+(1023&e)),0!==s&&(t[o++]=255&s,t[o++]=s>>>8,s=0),t[o++]=e%256,t[o++]=e>>>8;return t.slice(0,o).toString("ucs2")}function Lj(n){return tc(n,"binary").toString("utf8")}var G1="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",Kn=rn&&(Lj(G1)==zI(G1)&&Lj||Nj(G1)==zI(G1)&&Nj)||zI,rc=rn?function(n){return tc(n,"utf8").toString("binary")}:function(n){for(var t=[],e=0,i=0,r=0;e>6))),t.push(String.fromCharCode(128+(63&i)));break;case i>=55296&&i<57344:i-=55296,r=n.charCodeAt(e++)-56320+(i<<10),t.push(String.fromCharCode(240+(r>>18&7))),t.push(String.fromCharCode(144+(r>>12&63))),t.push(String.fromCharCode(128+(r>>6&63))),t.push(String.fromCharCode(128+(63&r)));break;default:t.push(String.fromCharCode(224+(i>>12))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(63&i)))}return t.join("")},Uj=/(^\s|\s$|\n)/;function qr(n,t){return"<"+n+(t.match(Uj)?' xml:space="preserve"':"")+">"+t+""}function o0(n){return yi(n).map(function(t){return" "+t+'="'+n[t]+'"'}).join("")}function Pe(n,t,e){return"<"+n+(null!=e?o0(e):"")+(null!=t?(t.match(Uj)?' xml:space="preserve"':"")+">"+t+""}function jI(n,t){try{return n.toISOString().replace(/\.\d*/,"")}catch(e){if(t)throw e}return""}var yr={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Wu=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],Cs={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"},Hj=function(n){for(var t=[],i=0;i0&&Buffer.isBuffer(n[0][0])?Buffer.concat(n[0].map(function(t){return Buffer.isBuffer(t)?t:tc(t)})):Hj(n)}:Hj,jj=function(n,t,e){for(var i=[],r=t;r0?Vm(n,t+4,t+4+e-1):""},$I=qj,Qj=function(n,t){var e=Fr(n,t);return e>0?Vm(n,t+4,t+4+e-1):""},GI=Qj,Kj=function(n,t){var e=2*Fr(n,t);return e>0?Vm(n,t+4,t+4+e-1):""},WI=Kj,Xj=function(t,e){var i=Fr(t,e);return i>0?q1(t,e+4,e+4+i):""},qI=Xj,Yj=function(n,t){var e=Fr(n,t);return e>0?Vm(n,t+4,t+4+e):""},QI=Yj,Zj=function(n,t){return function PSe(n,t){for(var e=1-2*(n[t+7]>>>7),i=((127&n[t+7])<<4)+(n[t+6]>>>4&15),r=15&n[t+6],o=5;o>=0;--o)r=256*r+n[t+o];return 2047==i?0==r?e*(1/0):NaN:(0==i?i=-1022:(i-=1023,r+=Math.pow(2,52)),e*Math.pow(2,i-52)*r)}(n,t)},Q1=Zj,KI=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};rn&&($I=function(t,e){if(!Buffer.isBuffer(t))return qj(t,e);var i=t.readUInt32LE(e);return i>0?t.toString("utf8",e+4,e+4+i-1):""},GI=function(t,e){if(!Buffer.isBuffer(t))return Qj(t,e);var i=t.readUInt32LE(e);return i>0?t.toString("utf8",e+4,e+4+i-1):""},WI=function(t,e){if(!Buffer.isBuffer(t)||!X_)return Kj(t,e);var i=2*t.readUInt32LE(e);return t.toString("utf16le",e+4,e+4+i-1)},qI=function(t,e){if(!Buffer.isBuffer(t)||!X_)return Xj(t,e);var i=t.readUInt32LE(e);return t.toString("utf16le",e+4,e+4+i)},QI=function(t,e){if(!Buffer.isBuffer(t))return Yj(t,e);var i=t.readUInt32LE(e);return t.toString("utf8",e+4,e+4+i)},Q1=function(t,e){return Buffer.isBuffer(t)?t.readDoubleLE(e):Zj(t,e)},KI=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array}),typeof Xt<"u"&&function Jj(){q1=function(n,t,e){return Xt.utils.decode(1200,n.slice(t,e)).replace(po,"")},Vm=function(n,t,e){return Xt.utils.decode(65001,n.slice(t,e))},$I=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(ju,n.slice(t+4,t+4+e-1)):""},GI=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(vr,n.slice(t+4,t+4+e-1)):""},WI=function(n,t){var e=2*Fr(n,t);return e>0?Xt.utils.decode(1200,n.slice(t+4,t+4+e-1)):""},qI=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(1200,n.slice(t+4,t+4+e)):""},QI=function(n,t){var e=Fr(n,t);return e>0?Xt.utils.decode(65001,n.slice(t+4,t+4+e)):""}}();var Um=function(n,t){return n[t]},ol=function(n,t){return 256*n[t+1]+n[t]},NSe=function(n,t){var e=256*n[t+1]+n[t];return e<32768?e:-1*(65535-e+1)},Fr=function(n,t){return n[t+3]*(1<<24)+(n[t+2]<<16)+(n[t+1]<<8)+n[t]},qu=function(n,t){return n[t+3]<<24|n[t+2]<<16|n[t+1]<<8|n[t]},LSe=function(n,t){return n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3]};function s0(n,t){var i,r,s,a,c,l,e="",o=[];switch(t){case"dbcs":if(l=this.l,rn&&Buffer.isBuffer(this)&&X_)e=this.slice(this.l,this.l+2*n).toString("utf16le");else for(c=0;c0?qu:LSe)(this,this.l),this.l+=4,i);case 8:case-8:if("f"===t)return r=8==n?Q1(this,this.l):Q1([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,r;n=8;case 16:e=Gj(this,this.l,n)}}return this.l+=n,e}var BSe=function(n,t,e){n[e]=255&t,n[e+1]=t>>>8&255,n[e+2]=t>>>16&255,n[e+3]=t>>>24&255},VSe=function(n,t,e){n[e]=255&t,n[e+1]=t>>8&255,n[e+2]=t>>16&255,n[e+3]=t>>24&255},USe=function(n,t,e){n[e]=255&t,n[e+1]=t>>>8&255};function HSe(n,t,e){var i=0,r=0;if("dbcs"===e){for(r=0;r!=t.length;++r)USe(this,t.charCodeAt(r),this.l+2*r);i=2*t.length}else if("sbcs"===e||"cpstr"==e)if(typeof Xt<"u"&&874==ju){for(r=0;r!=t.length;++r){var o=Xt.utils.encode(ju,t.charAt(r));this[this.l+r]=o[0]}i=t.length}else if(typeof Xt<"u"&&"cpstr"==e){if((o=Xt.utils.encode(vr,t)).length==t.length)for(r=0;r>8}for(;this.l>>=8);break;case 3:i=3,this[this.l]=255&t,this[this.l+1]=255&(t>>>=8),this[this.l+2]=255&(t>>>=8);break;case 4:i=4,BSe(this,t,this.l);break;case 8:if(i=8,"f"===e){!function OSe(n,t,e){var i=(t<0||1/t==-1/0?1:0)<<7,r=0,o=0,s=i?-t:t;isFinite(s)?0==s?r=o=0:(r=Math.floor(Math.log(s)/Math.LN2),o=s*Math.pow(2,52-r),r<=-1023&&(!isFinite(o)||o>4|i}(this,t,this.l);break}case 16:break;case-4:i=4,VSe(this,t,this.l)}}return this.l+=i,this}function e$(n,t){var e=Gj(this,this.l,n.length>>1);if(e!==n)throw new Error(t+"Expected "+n+" saw "+e);this.l+=n.length>>1}function xr(n,t){n.l=t,n.read_shift=s0,n.chk=e$,n.write_shift=HSe}function _o(n,t){n.l+=t}function se(n){var t=_d(n);return xr(t,0),t}function Jo(){var n=[],t=rn?256:2048,e=function(l){var d=se(l);return xr(d,0),d},i=e(t),r=function(){i&&(i.l&&(i.length>i.l&&((i=i.slice(0,i.l)).l=i.length),i.length>0&&n.push(i)),i=null)},o=function(l){return i&&l=128?1:0)+1,i>=128&&++o,i>=16384&&++o,i>=2097152&&++o;var s=n.next(o);r<=127?s.write_shift(1,r):(s.write_shift(1,128+(127&r)),s.write_shift(1,r>>7));for(var a=0;4!=a;++a){if(!(i>=128)){s.write_shift(1,i);break}s.write_shift(1,128+(127&i)),i>>=7}i>0&&KI(e)&&n.push(e)}}function a0(n,t,e){var i=qn(n);if(t.s?(i.cRel&&(i.c+=t.s.c),i.rRel&&(i.r+=t.s.r)):(i.cRel&&(i.c+=t.c),i.rRel&&(i.r+=t.r)),!e||e.biff<12){for(;i.c>=256;)i.c-=256;for(;i.r>=65536;)i.r-=65536}return i}function t$(n,t,e){var i=qn(n);return i.s=a0(i.s,t.s,e),i.e=a0(i.e,t.s,e),i}function c0(n,t){if(n.cRel&&n.c<0)for(n=qn(n);n.c<0;)n.c+=t>8?16384:256;if(n.rRel&&n.r<0)for(n=qn(n);n.r<0;)n.r+=t>8?1048576:t>5?65536:16384;var e=ln(n);return!n.cRel&&null!=n.cRel&&(e=function $Se(n){return n.replace(/^([A-Z])/,"$$$1")}(e)),!n.rRel&&null!=n.rRel&&(e=function zSe(n){return n.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(e)),e}function XI(n,t){return 0!=n.s.r||n.s.rRel||n.e.r!=(t.biff>=12?1048575:t.biff>=8?65536:16384)||n.e.rRel?0!=n.s.c||n.s.cRel||n.e.c!=(t.biff>=12?16383:255)||n.e.cRel?c0(n.s,t.biff)+":"+c0(n.e,t.biff):(n.s.rRel?"":"$")+yn(n.s.r)+":"+(n.e.rRel?"":"$")+yn(n.e.r):(n.s.cRel?"":"$")+on(n.s.c)+":"+(n.e.cRel?"":"$")+on(n.e.c)}function YI(n){return parseInt(function jSe(n){return n.replace(/\$(\d+)$/,"$1")}(n),10)-1}function yn(n){return""+(n+1)}function ZI(n){for(var t=function GSe(n){return n.replace(/^\$([A-Z])/,"$1")}(n),e=0,i=0;i!==t.length;++i)e=26*e+t.charCodeAt(i)-64;return e-1}function on(n){if(n<0)throw new Error("invalid column "+n);var t="";for(++n;n;n=Math.floor((n-1)/26))t=String.fromCharCode((n-1)%26+65)+t;return t}function zn(n){for(var t=0,e=0,i=0;i=48&&r<=57?t=10*t+(r-48):r>=65&&r<=90&&(e=26*e+(r-64))}return{c:e-1,r:t-1}}function ln(n){for(var t=n.c+1,e="";t;t=(t-1)/26|0)e=String.fromCharCode((t-1)%26+65)+e;return e+(n.r+1)}function wr(n){var t=n.indexOf(":");return-1==t?{s:zn(n),e:zn(n)}:{s:zn(n.slice(0,t)),e:zn(n.slice(t+1))}}function Wt(n,t){return typeof t>"u"||"number"==typeof t?Wt(n.s,n.e):("string"!=typeof n&&(n=ln(n)),"string"!=typeof t&&(t=ln(t)),n==t?n:n+":"+t)}function l0(n){var t=wr(n);return"$"+on(t.s.c)+"$"+yn(t.s.r)+":$"+on(t.e.c)+"$"+yn(t.e.r)}function d0(n,t){if(!(n||t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(n)?"'"+n.replace(/'/g,"''")+"'":n}function xn(n){var t={s:{c:0,r:0},e:{c:0,r:0}},e=0,i=0,r=0,o=n.length;for(e=0;i26);++i)e=26*e+r;for(t.s.c=--e,e=0;i9);++i)e=10*e+r;if(t.s.r=--e,i===o||10!=r)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++i,e=0;i!=o&&!((r=n.charCodeAt(i)-64)<1||r>26);++i)e=26*e+r;for(t.e.c=--e,e=0;i!=o&&!((r=n.charCodeAt(i)-48)<0||r>9);++i)e=10*e+r;return t.e.r=--e,t}function oc(n,t,e){return null==n||null==n.t||"z"==n.t?"":void 0!==n.w?n.w:("d"==n.t&&!n.z&&e&&e.dateNF&&(n.z=e.dateNF),"e"==n.t?al[n.v]||n.v:function n$(n,t){var e="d"==n.t&&t instanceof Date;if(null!=n.z)try{return n.w=Yo(n.z,e?or(t):t)}catch{}try{return n.w=Yo((n.XF||{}).numFmtId||(e?14:0),e?or(t):t)}catch{return""+t}}(n,null==t?n.v:t))}function xd(n,t){var e=t&&t.sheet?t.sheet:"Sheet1",i={};return i[e]=n,{SheetNames:[e],Sheets:i}}function i$(n,t,e){var i=e||{},r=n?null!=n["!data"]:i.dense;null!=Wi&&null==r&&(r=Wi);var o=n||{};r&&!o["!data"]&&(o["!data"]=[]);var s=0,a=0;if(o&&null!=i.origin){if("number"==typeof i.origin)s=i.origin;else{var c="string"==typeof i.origin?zn(i.origin):i.origin;s=c.r,a=c.c}o["!ref"]||(o["!ref"]="A1:A1")}var l={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(o["!ref"]){var d=xn(o["!ref"]);l.s.c=d.s.c,l.s.r=d.s.r,l.e.c=Math.max(l.e.c,d.e.c),l.e.r=Math.max(l.e.r,d.e.r),-1==s&&(l.e.r=s=d.e.r+1)}for(var u=[],h=0;h!=t.length;++h)if(t[h]){if(!Array.isArray(t[h]))throw new Error("aoa_to_sheet expects an array of arrays");var f=s+h,m=""+(f+1);r&&(o["!data"][f]||(o["!data"][f]=[]),u=o["!data"][f]);for(var g=0;g!=t[h].length;++g)if(!(typeof t[h][g]>"u")){var p={v:t[h][g]},b=a+g;if(l.s.r>f&&(l.s.r=f),l.s.c>b&&(l.s.c=b),l.e.r0&&t.write_shift(0,n,"dbcs"),e?t.slice(0,t.l):t}function QSe(n){return{ich:n.read_shift(2),ifnt:n.read_shift(2)}}function JI(n,t){var e=n.l,i=n.read_shift(1),r=bo(n),o=[],s={t:r,h:r};if(1&i){for(var a=n.read_shift(4),c=0;c!=a;++c)o.push(QSe(n));s.r=o}else s.r=[{ich:0,ifnt:0}];return n.l=e+t,s}var YSe=JI;function qs(n){var t=n.read_shift(4),e=n.read_shift(2);return e+=n.read_shift(1)<<16,n.l++,{c:t,iStyleRef:e}}function Qu(n,t){return null==t&&(t=se(8)),t.write_shift(-4,n.c),t.write_shift(3,n.iStyleRef||n.s),t.write_shift(1,0),t}function Ku(n){var t=n.read_shift(2);return t+=n.read_shift(1)<<16,n.l++,{c:-1,iStyleRef:t}}function Xu(n,t){return null==t&&(t=se(4)),t.write_shift(3,n.iStyleRef||n.s),t.write_shift(1,0),t}var JSe=bo,r$=Cr;function eM(n){var t=n.read_shift(4);return 0===t||4294967295===t?"":n.read_shift(t,"dbcs")}function u0(n,t){var e=!1;return null==t&&(e=!0,t=se(127)),t.write_shift(4,n.length>0?n.length:4294967295),n.length>0&&t.write_shift(0,n,"dbcs"),e?t.slice(0,t.l):t}var eDe=bo,tM=eM,nM=u0;function iM(n){var t=n.slice(n.l,n.l+4),e=1&t[0],i=2&t[0];n.l+=4;var r=0===i?Q1([0,0,0,0,252&t[0],t[1],t[2],t[3]],0):qu(t,0)>>2;return e?r/100:r}function o$(n,t){null==t&&(t=se(4));var e=0,i=0,r=100*n;if(n==(0|n)&&n>=-(1<<29)&&n<1<<29?i=1:r==(0|r)&&r>=-(1<<29)&&r<1<<29&&(i=1,e=1),!i)throw new Error("unsupported RkNumber "+n);t.write_shift(-4,((e?r:n)<<2)+(e+2))}function s$(n){var t={s:{},e:{}};return t.s.r=n.read_shift(4),t.e.r=n.read_shift(4),t.s.c=n.read_shift(4),t.e.c=n.read_shift(4),t}var Yu=s$,zm=function tDe(n,t){return t||(t=se(16)),t.write_shift(4,n.s.r),t.write_shift(4,n.e.r),t.write_shift(4,n.s.c),t.write_shift(4,n.e.c),t};function vo(n){if(n.length-n.l<8)throw"XLS Xnum Buffer underflow";return n.read_shift(8,"f")}function Zu(n,t){return(t||se(8)).write_shift(8,n,"f")}function K1(n,t){if(t||(t=se(8)),!n||n.auto)return t.write_shift(4,0),t.write_shift(4,0),t;null!=n.index?(t.write_shift(1,2),t.write_shift(1,n.index)):null!=n.theme?(t.write_shift(1,6),t.write_shift(1,n.theme)):(t.write_shift(1,5),t.write_shift(1,0));var e=n.tint||0;if(e>0?e*=32767:e<0&&(e*=32768),t.write_shift(2,e),n.rgb&&null==n.theme){var i=n.rgb||"FFFFFF";"number"==typeof i&&(i=("000000"+i.toString(16)).slice(-6)),t.write_shift(1,parseInt(i.slice(0,2),16)),t.write_shift(1,parseInt(i.slice(2,4),16)),t.write_shift(1,parseInt(i.slice(4,6),16)),t.write_shift(1,255)}else t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);return t}var oM={1:{n:"CodePage",t:2},2:{n:"Category",t:80},3:{n:"PresentationFormat",t:80},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:80},15:{n:"Company",t:80},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:80},27:{n:"ContentStatus",t:80},28:{n:"Language",t:80},29:{n:"Version",t:80},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},sM={1:{n:"CodePage",t:2},2:{n:"Title",t:80},3:{n:"Subject",t:80},4:{n:"Author",t:80},5:{n:"Keywords",t:80},6:{n:"Comments",t:80},7:{n:"Template",t:80},8:{n:"LastAuthor",t:80},9:{n:"RevNumber",t:80},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:80},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}};function fDe(n){return n.map(function(t){return[t>>16&255,t>>8&255,255&t]})}var Ju=qn(fDe([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),al={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},aM={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},cM=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],lM={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},J1={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function u$(n,t,e){var o,i=function mSe(n){for(var t=[],e=yi(n),i=0;i!==e.length;++i)null==t[n[e[i]]]&&(t[n[e[i]]]=[]),t[n[e[i]]].push(e[i]);return t}(lM),r=[];e||(r[r.length]=qi,r[r.length]=Pe("Types",null,{xmlns:yr.CT,"xmlns:xsd":yr.xsd,"xmlns:xsi":yr.xsi}),r=r.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(l){return Pe("Default",null,{Extension:l[0],ContentType:l[1]})})));var s=function(l){n[l]&&n[l].length>0&&(r[r.length]=Pe("Override",null,{PartName:("/"==(o=n[l][0])[0]?"":"/")+o,ContentType:J1[l][t.bookType]||J1[l].xlsx}))},a=function(l){(n[l]||[]).forEach(function(d){r[r.length]=Pe("Override",null,{PartName:("/"==d[0]?"":"/")+d,ContentType:J1[l][t.bookType]||J1[l].xlsx})})},c=function(l){(n[l]||[]).forEach(function(d){r[r.length]=Pe("Override",null,{PartName:("/"==d[0]?"":"/")+d,ContentType:i[l][0]})})};return s("workbooks"),a("sheets"),a("charts"),c("themes"),["strs","styles"].forEach(s),["coreprops","extprops","custprops"].forEach(c),c("vba"),c("comments"),c("threadedcomments"),c("drawings"),a("metadata"),c("people"),!e&&r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var tn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function h0(n){var t=n.lastIndexOf("/");return n.slice(0,t+1)+"_rels/"+n.slice(t+1)+".rels"}function jm(n){var t=[qi,Pe("Relationships",null,{xmlns:yr.RELS})];return yi(n["!id"]).forEach(function(e){t[t.length]=Pe("Relationship",null,n["!id"][e])}),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}function Xn(n,t,e,i,r,o){if(r||(r={}),n["!id"]||(n["!id"]={}),n["!idx"]||(n["!idx"]=1),t<0)for(t=n["!idx"];n["!id"]["rId"+t];++t);if(n["!idx"]=t+1,r.Id="rId"+t,r.Type=i,r.Target=e,o?r.TargetMode=o:[tn.HLINK,tn.XPATH,tn.XMISS].indexOf(r.Type)>-1&&(r.TargetMode="External"),n["!id"][r.Id])throw new Error("Cannot rewrite rId "+t);return n["!id"][r.Id]=r,n[("/"+r.Target).replace("//","/")]=r,t}function h$(n,t,e){return[' \n',' \n'," \n"].join("")}function vDe(n,t){return[' \n',' \n'," \n"].join("")}function f$(n,t){return'SheetJS '+Q_.version+""}var Qs=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function uM(n,t,e,i,r){null!=r[n]||null==t||""===t||(r[n]=t,t=en(t),i[i.length]=e?Pe(n,t,e):qr(n,t))}function p$(n,t){var e=t||{},i=[qi,Pe("cp:coreProperties",null,{"xmlns:cp":yr.CORE_PROPS,"xmlns:dc":yr.dc,"xmlns:dcterms":yr.dcterms,"xmlns:dcmitype":yr.dcmitype,"xmlns:xsi":yr.xsi})],r={};if(!n&&!e.Props)return i.join("");n&&(null!=n.CreatedDate&&uM("dcterms:created","string"==typeof n.CreatedDate?n.CreatedDate:jI(n.CreatedDate,e.WTF),{"xsi:type":"dcterms:W3CDTF"},i,r),null!=n.ModifiedDate&&uM("dcterms:modified","string"==typeof n.ModifiedDate?n.ModifiedDate:jI(n.ModifiedDate,e.WTF),{"xsi:type":"dcterms:W3CDTF"},i,r));for(var o=0;o!=Qs.length;++o){var s=Qs[o],a=e.Props&&null!=e.Props[s[1]]?e.Props[s[1]]:n?n[s[1]]:null;!0===a?a="1":!1===a?a="0":"number"==typeof a&&(a=String(a)),null!=a&&uM(s[0],a,null,i,r)}return i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}var eh=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],g$=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function b$(n){var t=[],e=Pe;return n||(n={}),n.Application="SheetJS",t[t.length]=qi,t[t.length]=Pe("Properties",null,{xmlns:yr.EXT_PROPS,"xmlns:vt":yr.vt}),eh.forEach(function(i){if(void 0!==n[i[1]]){var r;switch(i[2]){case"string":r=en(String(n[i[1]]));break;case"bool":r=n[i[1]]?"true":"false"}void 0!==r&&(t[t.length]=e(i[0],r))}}),t[t.length]=e("HeadingPairs",e("vt:vector",e("vt:variant","Worksheets")+e("vt:variant",e("vt:i4",String(n.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=e("TitlesOfParts",e("vt:vector",n.SheetNames.map(function(i){return""+en(i)+""}).join(""),{size:n.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}function v$(n){var t=[qi,Pe("Properties",null,{xmlns:yr.CUST_PROPS,"xmlns:vt":yr.vt})];if(!n)return t.join("");var e=1;return yi(n).forEach(function(r){++e,t[t.length]=Pe("property",function FSe(n,t){switch(typeof n){case"string":var e=Pe("vt:lpwstr",en(n));return t&&(e=e.replace(/"/g,"_x0022_")),e;case"number":return Pe((0|n)==n?"vt:i4":"vt:r8",en(String(n)));case"boolean":return Pe("vt:bool",n?"true":"false")}if(n instanceof Date)return Pe("vt:filetime",jI(n));throw new Error("Unable to serialize "+n)}(n[r],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e,name:en(r)})}),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}var hM={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function E$(n,t){var e=se(4),i=se(4);switch(e.write_shift(4,80==n?31:n),n){case 3:i.write_shift(-4,t);break;case 5:(i=se(8)).write_shift(8,t,"f");break;case 11:i.write_shift(4,t?1:0);break;case 64:i=function DDe(n){var e=("string"==typeof n?new Date(Date.parse(n)):n).getTime()/1e3+11644473600,i=e%Math.pow(2,32),r=(e-i)/Math.pow(2,32);r*=1e7;var o=(i*=1e7)/Math.pow(2,32)|0;o>0&&(i%=Math.pow(2,32),r+=o);var s=se(8);return s.write_shift(4,i),s.write_shift(4,r),s}(t);break;case 31:case 80:for((i=se(4+2*(t.length+1)+(t.length%2?0:2))).write_shift(4,t.length+1),i.write_shift(0,t,"dbcs");i.l!=i.length;)i.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+n+" "+t)}return rr([e,i])}var S$=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function ODe(n){switch(typeof n){case"boolean":return 11;case"number":return(0|n)==n?3:5;case"string":return 31;case"object":if(n instanceof Date)return 64}return-1}function D$(n,t,e){var i=se(8),r=[],o=[],s=8,a=0,c=se(8),l=se(8);if(c.write_shift(4,2),c.write_shift(4,1200),l.write_shift(4,1),o.push(c),r.push(l),s+=8+c.length,!t){(l=se(8)).write_shift(4,0),r.unshift(l);var d=[se(4)];for(d[0].write_shift(4,n.length),a=0;a-1||g$.indexOf(n[a][0])>-1)&&null!=n[a][1]){var h=n[a][1],f=0;if(t){var m=e[f=+t[n[a][0]]];if("version"==m.p&&"string"==typeof h){var g=h.split(".");h=(+g[0]<<16)+(+g[1]||0)}c=E$(m.t,h)}else{var p=ODe(h);-1==p&&(p=31,h=String(h)),c=E$(p,h)}o.push(c),(l=se(8)).write_shift(4,t?f:2+a),r.push(l),s+=8+c.length}var b=8*(o.length+1);for(a=0;a=12?2:1),r="sbcs-cont",o=vr;e&&e.biff>=8&&(vr=1200),e&&8!=e.biff?12==e.biff&&(r="wstr"):n.read_shift(1)&&(r="dbcs-cont"),e.biff>=2&&e.biff<=5&&(r="cpstr");var a=i?n.read_shift(i,r):"";return vr=o,a}function UDe(n){var t=n.t||"",i=se(3);i.write_shift(2,t.length),i.write_shift(1,1);var r=se(2*t.length);return r.write_shift(2*t.length,t,"utf16le"),rr([i,r])}function F$(n,t,e){return e||(e=se(3+2*n.length)),e.write_shift(2,n.length),e.write_shift(1,1),e.write_shift(31,n,"utf16le"),e}function P$(n,t){t||(t=se(6+2*n.length)),t.write_shift(4,1+n.length);for(var e=0;e-1?31:23;switch(i.charAt(0)){case"#":o=28;break;case".":o&=-3}t.write_shift(4,2),t.write_shift(4,o);var s=[8,6815827,6619237,4849780,83];for(e=0;e-1?i.slice(0,r):i;for(t.write_shift(4,2*(a.length+1)),e=0;e-1?i.slice(r+1):"",t)}else{for(s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),e=0;e8?4:2;return[n.read_shift(i),n.read_shift(i,"i"),n.read_shift(i,"i")]}function nw(n){var t=n.read_shift(2),e=n.read_shift(2);return{s:{c:n.read_shift(2),r:t},e:{c:n.read_shift(2),r:e}}}function B$(n,t){return t||(t=se(8)),t.write_shift(2,n.s.r),t.write_shift(2,n.e.r),t.write_shift(2,n.s.c),t.write_shift(2,n.e.c),t}function gM(n,t,e){var i=1536,r=16;switch(e.bookType){case"biff8":case"xla":break;case"biff5":i=1280,r=8;break;case"biff4":i=4,r=6;break;case"biff3":i=3,r=6;break;case"biff2":i=2,r=4;break;default:throw new Error("unsupported BIFF version")}var o=se(r);return o.write_shift(2,i),o.write_shift(2,t),r>4&&o.write_shift(2,29282),r>6&&o.write_shift(2,1997),r>8&&(o.write_shift(2,49161),o.write_shift(2,1),o.write_shift(2,1798),o.write_shift(2,0)),o}function a2e(n,t){var e=!t||t.biff>=8?2:1,i=se(8+e*n.name.length);i.write_shift(4,n.pos),i.write_shift(1,n.hs||0),i.write_shift(1,n.dt),i.write_shift(1,n.name.length),t.biff>=8&&i.write_shift(1,1),i.write_shift(e*n.name.length,n.name,t.biff<8?"sbcs":"utf16le");var r=i.slice(0,i.l);return r.l=i.l,r}function T2e(n,t,e,i){var r=e&&5==e.biff;i||(i=se(r?3+t.length:5+2*t.length)),i.write_shift(2,n),i.write_shift(r?1:2,t.length),r||i.write_shift(1,1),i.write_shift((r?1:2)*t.length,t,r?"sbcs":"utf16le");var o=i.length>i.l?i.slice(0,i.l):i;return null==o.l&&(o.l=o.length),o}function j$(n,t,e,i){var r=e&&5==e.biff;i||(i=se(r?16:20)),i.write_shift(2,0),n.style?(i.write_shift(2,n.numFmtId||0),i.write_shift(2,65524)):(i.write_shift(2,n.numFmtId||0),i.write_shift(2,t<<4));var o=0;return n.numFmtId>0&&r&&(o|=1024),i.write_shift(4,o),i.write_shift(4,0),r||i.write_shift(4,0),i.write_shift(2,0),i}function Z2e(n){var t=se(24),e=zn(n[0]);t.write_shift(2,e.r),t.write_shift(2,e.r),t.write_shift(2,e.c),t.write_shift(2,e.c);for(var i="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<16;++r)t.write_shift(1,parseInt(i[r],16));return rr([t,WDe(n[1])])}function eAe(n){var t=n[1].Tooltip,e=se(10+2*(t.length+1));e.write_shift(2,2048);var i=zn(n[0]);e.write_shift(2,i.r),e.write_shift(2,i.r),e.write_shift(2,i.c),e.write_shift(2,i.c);for(var r=0;r1048576&&(g=1e6),2!=u&&(p=d.read_shift(2));var b=d.read_shift(2),k=c.codepage||1252;2!=u&&(d.l+=16,d.read_shift(1),0!==d[d.l]&&(k=n[d[d.l]]),d.l+=1,d.l+=2),m&&(d.l+=36);for(var w=[],D={},j=Math.min(d.length,2==u?521:p-10-(f?264:0)),P=m?32:11;d.l0;)if(42!==d[d.l])for(++d.l,l[++S]=[],U=0,U=0;U!=w.length;++U){var V=d.slice(d.l,d.l+w[U].len);d.l+=w[U].len,xr(V,0);var q=typeof Xt<"u"?Xt.utils.decode(k,V):nc(V);switch(w[U].type){case"C":q.trim().length&&(l[S][U]=q.replace(/\s+$/,""));break;case"D":l[S][U]=8===q.length?new Date(+q.slice(0,4),+q.slice(4,6)-1,+q.slice(6,8)):q;break;case"F":l[S][U]=parseFloat(q.trim());break;case"+":case"I":l[S][U]=m?2147483648^V.read_shift(-4,"i"):V.read_shift(4,"i");break;case"L":switch(q.trim().toUpperCase()){case"Y":case"T":l[S][U]=!0;break;case"N":case"F":l[S][U]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+q+"|")}break;case"M":if(!h)throw new Error("DBF Unexpected MEMO for type "+u.toString(16));l[S][U]="##MEMO##"+(m?parseInt(q.trim(),10):V.read_shift(4));break;case"N":(q=q.replace(/\u0000/g,"").trim())&&"."!=q&&(l[S][U]=+q||0);break;case"@":l[S][U]=new Date(V.read_shift(-8,"f")-621356832e5);break;case"T":l[S][U]=new Date(864e5*(V.read_shift(4)-2440588)+V.read_shift(4));break;case"Y":l[S][U]=V.read_shift(4,"i")/1e4+V.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":l[S][U]=-V.read_shift(-8,"f");break;case"B":if(f&&8==w[U].len){l[S][U]=V.read_shift(8,"f");break}case"G":case"P":V.l+=w[U].len;break;case"0":if("_NullFlags"===w[U].name)break;default:throw new Error("DBF Unsupported data type "+w[U].type)}}else d.l+=b;if(2!=u&&d.l=0&&js(+l.codepage),"string"==l.type)throw new Error("Cannot write DBF to JS string");var u=Jo(),h=bw(a,{header:1,raw:!0,cellDates:!0}),f=h[0],m=h.slice(1),g=a["!cols"]||[],p=0,b=0,k=0,w=1;for(p=0;p250&&(q=250),"C"==(V=((g[p]||{}).DBF||{}).type)&&g[p].DBF.len>q&&(q=g[p].DBF.len),"B"==U&&"N"==V&&(U="N",S[p]=g[p].DBF.dec,q=g[p].DBF.len),P[p]="C"==U||"N"==V?q:o[U]||0,w+=P[p],j[p]=U}else j[p]="?"}var G=u.next(32);for(G.write_shift(4,318902576),G.write_shift(4,m.length),G.write_shift(2,296+32*k),G.write_shift(2,w),p=0;p<4;++p)G.write_shift(4,0);var ve=+t[vr]||3;for(G.write_shift(4,0|ve<<8),n[ve]!=+l.codepage&&(l.codepage&&console.error("DBF Unsupported codepage "+vr+", using 1252"),vr=1252),p=0,b=0;pP[b]&&(ge=ge.slice(0,P[b])),k=0;k":190,"?":191,"{":223},t=new RegExp("\x1bN("+yi(n).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),e=function(u,h){var f=n[h];return"number"==typeof f?RI(f):f},i=function(u,h,f){var m=h.charCodeAt(0)-32<<4|f.charCodeAt(0)-48;return 59==m?u:RI(m)};function o(u,h){var q,f=u.split(/[\n\r]+/),m=-1,g=-1,p=0,b=0,k=[],w=[],D=null,j={},P=[],S=[],U=[],V=0,J={Workbook:{WBProps:{},Names:[]}};for(+h.codepage>=0&&js(+h.codepage);p!==f.length;++p){V=0;var me,G=f[p].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,i).replace(t,e),ve=G.replace(/;;/g,"\0").split(";").map(function(ce){return ce.replace(/\u0000/g,";")});if(G.length>0)switch(ve[0]){case"ID":case"E":case"B":case"W":break;case"O":for(b=1;b=1&&re<=4&&(J.Workbook.WBProps.date1904=!0)}break;case"P":"P"===ve[1].charAt(0)&&w.push(G.slice(3).replace(/;;/g,";"));break;case"NN":var Y={Sheet:0};for(b=1;b-1&&k[st][Dt];if(!W||!W[1])throw new Error("SYLK shared formula cannot find base");F=hG(W[1],{r:m-st,c:g-Dt})}F&&(k[m][g]?k[m][g].f=F:k[m][g]={t:"n",f:F});break;case"F":var H=0;for(b=1;b0?(P[m].hpt=V,P[m].hpx=Gm(V)):0===V&&(P[m].hidden=!0);break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+G)}H<1&&(D=null);break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+G)}}return P.length>0&&(j["!rows"]=P),S.length>0&&(j["!cols"]=S),S.forEach(function(ce){Cd(ce)}),h&&h.sheetRows&&(k=k.slice(0,h.sheetRows)),[k,j,J]}function a(u,h,f,m){var g="C;Y"+(f+1)+";X"+(m+1)+";K";switch(u.t){case"n":g+=u.v||0,u.f&&!u.F&&(g+=";E"+lw(u.f,{r:f,c:m}));break;case"b":g+=u.v?"TRUE":"FALSE";break;case"e":g+=u.w||u.v;break;case"d":g+='"'+(u.w||u.v)+'"';break;case"s":g+='"'+(null==u.v?"":String(u.v)).replace(/"/g,"").replace(/;/g,";;")+'"'}return g}return n["|"]=254,{to_workbook:function s(u,h){var f=function r(u,h){switch(h.type){case"base64":return o(xs(u),h);case"binary":return o(u,h);case"buffer":return o(rn&&Buffer.isBuffer(u)?u.toString("binary"):nc(u),h);case"array":return o(Gu(u),h)}throw new Error("Unrecognized type "+h.type)}(u,h),m=f[0],g=f[1],p=f[2],b=qn(h);b.date1904=(((p||{}).Workbook||{}).WBProps||{}).date1904;var k=Hm(m,b);yi(g).forEach(function(D){k[D]=g[D]});var w=xd(k,h);return yi(p).forEach(function(D){w[D]=p[D]}),w.bookType="sylk",w},from_sheet:function d(u,h,f){var b,m=["ID;PSheetJS;N;E"],g=[],p=xn(u["!ref"]),k=null!=u["!data"],w="\r\n",D=(((f||{}).Workbook||{}).WBProps||{}).date1904;m.push("P;PGeneral"),m.push("F;P0;DG0G8;M255"),u["!cols"]&&function c(u,h){h.forEach(function(f,m){var g="F;W"+(m+1)+" "+(m+1)+" ";f.hidden?g+="0":("number"==typeof f.width&&!f.wpx&&(f.wpx=_0(f.width)),"number"==typeof f.wpx&&!f.wch&&(f.wch=b0(f.wpx)),"number"==typeof f.wch&&(g+=Math.round(f.wch)))," "!=g.charAt(g.length-1)&&u.push(g)})}(m,u["!cols"]),u["!rows"]&&function l(u,h){h.forEach(function(f,m){var g="F;";f.hidden?g+="M0;":f.hpt?g+="M"+20*f.hpt+";":f.hpx&&(g+="M"+20*v0(f.hpx)+";"),g.length>2&&u.push(g+"R"+(m+1))})}(m,u["!rows"]),m.push("B;Y"+(p.e.r-p.s.r+1)+";X"+(p.e.c-p.s.c+1)+";D"+[p.s.c,p.s.r,p.e.c,p.e.r].join(" ")),m.push("O;L;D;B"+(D?";V4":"")+";K47;G100 0.001");for(var j=p.s.r;j<=p.e.r;++j)if(!k||u["!data"][j]){for(var P=[],S=p.s.c;S<=p.e.c;++S)(b=k?u["!data"][j][S]:u[on(S)+yn(j)])&&(null!=b.v||b.f&&!b.F)&&P.push(a(b,0,j,S));g.push(P.join(w))}return m.join(w)+w+g.join(w)+w+"E"+w}}}(),J$=function(){function t(a,c){for(var l=a.split("\n"),d=-1,u=-1,h=0,f=[];h!==l.length;++h)if("BOT"!==l[h].trim()){if(!(d<0)){for(var m=l[h].trim().split(","),g=m[0],p=m[1],b=l[++h]||"";1&(b.match(/["]/g)||[]).length&&h=0||d.indexOf(",")>=0||d.indexOf(";")>=0?function o(d,u){var h=u||{},f="";null!=Wi&&null==h.dense&&(h.dense=Wi);var m={};h.dense&&(m["!data"]=[]);var g={s:{c:0,r:0},e:{c:0,r:0}};"sep="==d.slice(0,4)?13==d.charCodeAt(5)&&10==d.charCodeAt(6)?(f=d.charAt(4),d=d.slice(7)):13==d.charCodeAt(5)||10==d.charCodeAt(5)?(f=d.charAt(4),d=d.slice(6)):f=r(d.slice(0,1024)):f=h&&h.FS?h.FS:r(d.slice(0,1024));var p=0,b=0,k=0,w=0,D=0,j=f.charCodeAt(0),P=!1,S=0,U=d.charCodeAt(0),V=null!=h.dateNF?function cSe(n){var t="number"==typeof n?kt[n]:n;return t=t.replace(vj,"(\\d+)"),new RegExp("^"+t+"$")}(h.dateNF):null;function q(){var J=d.slice(w,D);"\r"==J.slice(-1)&&(J=J.slice(0,-1));var G={};if('"'==J.charAt(0)&&'"'==J.charAt(J.length-1)&&(J=J.slice(1,-1).replace(/""/g,'"')),0===J.length?G.t="z":h.raw||0===J.trim().length?(G.t="s",G.v=J):61==J.charCodeAt(0)?34==J.charCodeAt(1)&&34==J.charCodeAt(J.length-1)?(G.t="s",G.v=J.slice(2,-1).replace(/""/g,'"')):function WMe(n){return 1!=n.length}(J)?(G.t="n",G.f=J.slice(1)):(G.t="s",G.v=J):"TRUE"==J?(G.t="b",G.v=!0):"FALSE"==J?(G.t="b",G.v=!1):isNaN(k=ws(J))?!isNaN((k=Bm(J)).getDate())||V&&J.match(V)?(G.z=h.dateNF||kt[14],V&&J.match(V)&&(J=function lSe(n,t,e){var i=-1,r=-1,o=-1,s=-1,a=-1,c=-1;(t.match(vj)||[]).forEach(function(u,h){var f=parseInt(e[h+1],10);switch(u.toLowerCase().charAt(0)){case"y":i=f;break;case"d":o=f;break;case"h":s=f;break;case"s":c=f;break;case"m":s>=0?a=f:r=f}}),c>=0&&-1==a&&r>=0&&(a=r,r=-1);var l=(""+(i>=0?i:(new Date).getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(o>=1?o:1)).slice(-2);7==l.length&&(l="0"+l),8==l.length&&(l="20"+l);var d=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return-1==s&&-1==a&&-1==c?l:-1==i&&-1==r&&-1==o?d:l+"T"+d}(0,h.dateNF,J.match(V)||[]),k=xi(J,1)),h.cellDates?(G.t="d",G.v=k):(G.t="n",G.v=or(k)),!1!==h.cellText&&(G.w=Yo(G.z,G.v instanceof Date?or(G.v):G.v)),h.cellNF||delete G.z):(G.t="s",G.v=J):(G.t="n",!1!==h.cellText&&(G.w=J),G.v=k),"z"==G.t||(h.dense?(m["!data"][p]||(m["!data"][p]=[]),m["!data"][p][b]=G):m[ln({c:b,r:p})]=G),U=d.charCodeAt(w=D+1),g.e.c0&&q(),m["!ref"]=Wt(g),m}(d,u):Hm(function t(d,u){var h=u||{},f=[];if(!d||0===d.length)return f;for(var m=d.split(/[\r\n]/),g=m.length-1;g>=0&&0===m[g].length;)--g;for(var p=10,b=0,k=0;k<=g;++k)-1==(b=m[k].indexOf(" "))?b=m[k].length:b++,p=Math.max(p,b);for(k=0;k<=g;++k){f[k]=[];var w=0;for(n(m[k].slice(0,p).trim(),f,k,w,h),w=1;w<=(m[k].length-p)/10+1;++w)n(m[k].slice(p+10*(w-1),p+10*w).trim(),f,k,w,h)}return h.sheetRows&&(f=f.slice(0,h.sheetRows)),f}(d,u),u)}function a(d,u){var h="",f="string"==u.type?[0,0,0,0]:function VM(n,t){var e="";switch((t||{}).type||"base64"){case"buffer":case"array":return[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]];case"base64":e=xs(n.slice(0,12));break;case"binary":e=n;break;default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3),e.charCodeAt(4),e.charCodeAt(5),e.charCodeAt(6),e.charCodeAt(7)]}(d,u);switch(u.type){case"base64":h=xs(d);break;case"binary":case"string":h=d;break;case"buffer":h=65001==u.codepage?d.toString("utf8"):u.codepage&&typeof Xt<"u"?Xt.utils.decode(u.codepage,d):rn&&Buffer.isBuffer(d)?d.toString("binary"):nc(d);break;case"array":h=Gu(d);break;default:throw new Error("Unrecognized type "+u.type)}return 239==f[0]&&187==f[1]&&191==f[2]?h=Kn(h.slice(3)):"string"!=u.type&&"buffer"!=u.type&&65001==u.codepage?h=Kn(h):"binary"==u.type&&typeof Xt<"u"&&u.codepage&&(h=Xt.utils.decode(u.codepage,Xt.utils.encode(28591,h))),"socialcalc:version:"==h.slice(0,19)?eG.to_sheet("string"==u.type?h:Kn(h),u):s(h,u)}return{to_workbook:function c(d,u){return xd(a(d,u),u)},to_sheet:a,from_sheet:function l(d){for(var f,u=[],h=xn(d["!ref"]),m=null!=d["!data"],g=h.s.r;g<=h.e.r;++g){for(var p=[],b=h.s.c;b<=h.e.c;++b){var k=ln({r:g,c:b});if((f=m?(d["!data"][g]||[])[b]:d[k])&&null!=f.v){for(var w=(f.w||(oc(f),f.w)||"").slice(0,10);w.length<10;)w+=" ";p.push(w+(0===b?" ":""))}else p.push(" ")}u.push(p.join(""))}return u.join("\n")}}}(),rh=function(){function n(F,Z,W){if(F){xr(F,F.l||0);for(var H=W.Enum||de;F.l255||$e.s.r>999999)break;$e.e.c<$e.s.c&&($e.e.c=$e.s.c),$e.e.r<$e.s.r&&($e.e.r=$e.s.r),H["!ref"]=Wt($e),yw(dn,H,Ce);break;case 2561:Cn=mt.read_shift(2),$e.e.cCn&&($e.s.c=Cn),et=mt.read_shift(4),$e.s.r>et&&($e.s.r=et),et=mt.read_shift(4),$e.e.ret&&($e.s.r=et),$e.e.r0&&M>=0;){if(32&Zn)switch(31&Zn){case 2:Mn={t:"n",v:Mn.v+ko&65535};break;case 3:(Mn={t:"n",v:Mn.v+ko&65535}).v>32767&&(Mn.v-=65536);break;case 7:Mn={t:"s",v:ce[Rt=Rt+ko>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(31&Zn)}else switch(31&Zn){case 1:Mn={t:"z"};break;case 2:Mn={t:"n",v:mt.read_shift(2)};break;case 7:Mn={t:"s",v:ce[Rt=mt.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(31&Zn)}!W.sheetStubs&&"z"==Mn.t||(null!=H["!data"]?(H["!data"][et]||(H["!data"][et]=[]),H["!data"][et][Cn]=Mn):H[Co+yn(et)]=Mn),++et,--M}}}F.l+=Fn}return dn}(F,Z);if(0==F[2]&&(8==F[3]||9==F[3])&&F.length>=16&&5==F[14]&&108===F[15])throw new Error("Unsupported Works 3 for Mac file");if(2==F[2])W.Enum=de,n(F,function(qe,Co,Mn){switch(Mn){case 0:W.vers=qe,qe>=4096&&(W.qpro=!0);break;case 255:W.vers=qe,W.works=!0;break;case 6:et=qe;break;case 204:qe&&(Ce=qe);break;case 222:Ce=qe;break;case 15:case 51:(!W.qpro&&!W.works||51==Mn)&&qe[1].v.charCodeAt(0)<48&&(qe[1].v=qe[1].v.slice(1)),(W.works||W.works2)&&(qe[1].v=qe[1].v.replace(/\r\n/g,"\n"));case 13:case 14:case 16:14==Mn&&112==(112&qe[2])&&(15&qe[2])>1&&(15&qe[2])<15&&(qe[1].z=W.dateNF||kt[14],W.cellDates&&(qe[1].t="d",qe[1].v=j1(qe[1].v))),W.qpro&&qe[3]>Ue&&(H["!ref"]=Wt(et),$e[ce]=H,M.push(ce),H={},W.dense&&(Cn=H["!data"]=[]),et={s:{r:0,c:0},e:{r:0,c:0}},Ue=qe[3],ce=Ce||"Sheet"+(Ue+1),Ce="");var Zn=W.dense?(Cn[qe[0].r]||[])[qe[0].c]:H[ln(qe[0])];if(Zn){Zn.t=qe[1].t,Zn.v=qe[1].v,null!=qe[1].z&&(Zn.z=qe[1].z),null!=qe[1].f&&(Zn.f=qe[1].f);break}W.dense?(Cn[qe[0].r]||(Cn[qe[0].r]=[]),Cn[qe[0].r][qe[0].c]=qe[1]):H[ln(qe[0])]=qe[1];break;case 21509:W.works2=!0}},W);else{if(26!=F[2]&&14!=F[2])throw new Error("Unrecognized LOTUS BOF "+F[2]);W.Enum=st,14==F[2]&&(W.qpro=!0,F.l=0),n(F,function(qe,Co,Mn){switch(Mn){case 204:ce=qe;break;case 22:qe[1].v.charCodeAt(0)<48&&(qe[1].v=qe[1].v.slice(1)),qe[1].v=qe[1].v.replace(/\x0F./g,function(Zn){return String.fromCharCode(Zn.charCodeAt(1)-32)}).replace(/\r\n/g,"\n");case 23:case 24:case 25:case 37:case 39:case 40:if(qe[3]>Ue&&(H["!ref"]=Wt(et),$e[ce]=H,M.push(ce),H={},W.dense&&(Cn=H["!data"]=[]),et={s:{r:0,c:0},e:{r:0,c:0}},ce="Sheet"+((Ue=qe[3])+1)),dn>0&&qe[0].r>=dn)break;W.dense?(Cn[qe[0].r]||(Cn[qe[0].r]=[]),Cn[qe[0].r][qe[0].c]=qe[1]):H[ln(qe[0])]=qe[1],et.e.c=128?95:Ce)}return H.write_shift(1,0),H}function m(F,Z,W){var H=se(7);return H.write_shift(1,255),H.write_shift(2,Z),H.write_shift(2,F),H.write_shift(2,W,"i"),H}function p(F,Z,W){var H=se(13);return H.write_shift(1,255),H.write_shift(2,Z),H.write_shift(2,F),H.write_shift(8,W,"f"),H}function k(F,Z,W){var H=32768&Z;return Z=(H?F:0)+((Z&=-32769)>=8192?Z-16384:Z),(H?"":"$")+(W?on(Z):yn(Z))}var w={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],63:["ROUND",2],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},D=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function P(F){var Z=[{c:0,r:0},{t:"n",v:0},0];return Z[0].r=F.read_shift(2),Z[3]=F[F.l++],Z[0].c=F[F.l++],Z}function U(F,Z,W,H){var ce=se(6+H.length);ce.write_shift(2,F),ce.write_shift(1,W),ce.write_shift(1,Z),ce.write_shift(1,39);for(var Ce=0;Ce=128?95:Ue)}return ce.write_shift(1,0),ce}function q(F,Z){var W=P(F),H=F.read_shift(4),ce=F.read_shift(4),Ce=F.read_shift(2);if(65535==Ce)return 0===H&&3221225472===ce?(W[1].t="e",W[1].v=15):0===H&&3489660928===ce?(W[1].t="e",W[1].v=42):W[1].v=0,W;var Ue=32768&Ce;return Ce=(32767&Ce)-16446,W[1].v=(1-2*Ue)*(ce*Math.pow(2,Ce+32)+H*Math.pow(2,Ce)),W}function J(F,Z,W,H){var ce=se(14);if(ce.write_shift(2,F),ce.write_shift(1,W),ce.write_shift(1,Z),0==H)return ce.write_shift(4,0),ce.write_shift(4,0),ce.write_shift(2,65535),ce;var Ce=0,Ue=0,M=0;return H<0&&(Ce=1,H=-H),Ue=0|Math.log2(H),2147483648&(M=(H/=Math.pow(2,Ue-31))>>>0)||(++Ue,M=(H/=2)>>>0),H-=M,M|=2147483648,M>>>=0,H*=Math.pow(2,32),ce.write_shift(4,H>>>0),ce.write_shift(4,M),ce.write_shift(2,Ue+=16383+(Ce?32768:0)),ce}function Se(F,Z){var W=P(F),H=F.read_shift(8,"f");return W[1].v=H,W}function re(F,Z){return 0==F[F.l+Z-1]?F.read_shift(Z,"cstr"):""}function We(F,Z){var W=se(5+F.length);W.write_shift(2,14e3),W.write_shift(2,Z);for(var H=0;H127?95:ce}return W[W.l++]=0,W}var de={0:{n:"BOF",f:Ki},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function a(F,Z,W){var H={s:{c:0,r:0},e:{c:0,r:0}};return 8==Z&&W.qpro?(H.s.c=F.read_shift(1),F.l++,H.s.r=F.read_shift(2),H.e.c=F.read_shift(1),F.l++,H.e.r=F.read_shift(2),H):(H.s.c=F.read_shift(2),H.s.r=F.read_shift(2),12==Z&&W.qpro&&(F.l+=2),H.e.c=F.read_shift(2),H.e.r=F.read_shift(2),12==Z&&W.qpro&&(F.l+=2),65535==H.s.c&&(H.s.c=H.e.c=H.s.r=H.e.r=0),H)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function f(F,Z,W){var H=l(F,0,W);return H[1].v=F.read_shift(2,"i"),H}},14:{n:"NUMBER",f:function g(F,Z,W){var H=l(F,0,W);return H[1].v=F.read_shift(8,"f"),H}},15:{n:"LABEL",f:function d(F,Z,W){var H=F.l+Z,ce=l(F,0,W);if(ce[1].t="s",20768==W.vers){F.l++;var Ce=F.read_shift(1);return ce[1].v=F.read_shift(Ce,"utf8"),ce}return W.qpro&&F.l++,ce[1].v=F.read_shift(H-F.l,"cstr"),ce}},16:{n:"FORMULA",f:function b(F,Z,W){var H=F.l+Z,ce=l(F,0,W);if(ce[1].v=F.read_shift(8,"f"),W.qpro)F.l=H;else{var Ce=F.read_shift(2);(function j(F,Z){xr(F,0);for(var W=[],H=0,ce="",Ce="",Ue="",$e="";F.lW.length)return void console.error("WK1 bad formula parse 0x"+M.toString(16)+":|"+W.join("|")+"|");var dn=W.slice(-H);W.length-=H,W.push(w[M][0]+"("+dn.join(",")+")")}}}1==W.length?Z[1].f=""+W[0]:console.error("WK1 bad formula parse |"+W.join("|")+"|")})(F.slice(F.l,F.l+Ce),ce),F.l+=Ce}return ce}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:function h(F,Z,W){var H=F.l+Z,ce=l(F,0,W);if(ce[1].t="s",20768==W.vers){var Ce=F.read_shift(1);return ce[1].v=F.read_shift(Ce,"utf8"),ce}return ce[1].v=F.read_shift(H-F.l,"cstr"),ce}},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:re},222:{n:"SHEETNAMELP",f:function Y(F,Z){var W=F[F.l++];W>Z-1&&(W=Z-1);for(var H="";H.length>1;if(1&W[1].v)switch(7&H){case 0:H=5e3*(H>>3);break;case 1:H=500*(H>>3);break;case 2:H=(H>>3)/20;break;case 3:H=(H>>3)/200;break;case 4:H=(H>>3)/2e3;break;case 5:H=(H>>3)/2e4;break;case 6:H=(H>>3)/16;break;case 7:H=(H>>3)/64}return W[1].v=H,W}},25:{n:"FORMULA19",f:function G(F,Z){var W=q(F);return F.l+=Z-14,W}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function le(F,Z){for(var W={},H=F.l+Z;F.l>6,W}},38:{n:"??"},39:{n:"NUMBER27",f:Se},40:{n:"FORMULA28",f:function me(F,Z){var W=Se(F);return F.l+=Z-12,W}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:re},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function ge(F,Z,W){if(W.qpro&&!(Z<21)){var H=F.read_shift(1);return F.l+=17,F.l+=1,F.l+=2,[H,F.read_shift(Z-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:function i(F,Z){var W=Z||{};if(+W.codepage>=0&&js(+W.codepage),"string"==W.type)throw new Error("Cannot write WK1 to JS string");var H=Jo(),ce=xn(F["!ref"]),Ce=null!=F["!data"],Ue=[];Be(H,0,function o(F){var Z=se(2);return Z.write_shift(2,F),Z}(1030)),Be(H,6,function c(F){var Z=se(8);return Z.write_shift(2,F.s.c),Z.write_shift(2,F.s.r),Z.write_shift(2,F.e.c),Z.write_shift(2,F.e.r),Z}(ce));for(var $e=Math.min(ce.e.r,8191),M=ce.s.c;M<=ce.e.c;++M)Ue[M]=on(M);for(var Rt=ce.s.r;Rt<=$e;++Rt){var Cn=yn(Rt);for(M=ce.s.c;M<=ce.e.c;++M){var et=Ce?(F["!data"][Rt]||[])[M]:F[Ue[M]+Cn];et&&"z"!=et.t&&("n"==et.t?(0|et.v)==et.v&&et.v>=-32768&&et.v<=32767?Be(H,13,m(Rt,M,et.v)):Be(H,14,p(Rt,M,et.v)):Be(H,15,u(Rt,M,oc(et).slice(0,239))))}}return Be(H,1),H.end()},book_to_wk3:function r(F,Z){var W=Z||{};if(+W.codepage>=0&&js(+W.codepage),"string"==W.type)throw new Error("Cannot write WK3 to JS string");var H=Jo();Be(H,0,function s(F){var Z=se(26);Z.write_shift(2,4096),Z.write_shift(2,4),Z.write_shift(4,0);for(var W=0,H=0,ce=0,Ce=0;Ce8191&&(W=8191),Z.write_shift(2,W),Z.write_shift(1,ce),Z.write_shift(1,H),Z.write_shift(2,0),Z.write_shift(2,0),Z.write_shift(1,1),Z.write_shift(1,2),Z.write_shift(4,0),Z.write_shift(4,0),Z}(F));for(var ce=0,Ce=0;ce=0;--o)t=((16384&t?1:0)|t<<1&32767)^e[o];return 52811^t}function g0(n){for(var t=0,e=1;3!=t;++t)e=256*e+(n[t]>255?255:n[t]<0?0:n[t]);return e.toString(16).toUpperCase().slice(1)}var xo=6;function _0(n){return Math.floor((n+Math.round(128/xo)/256)*xo)}function b0(n){return Math.floor((n-5)/xo*100+.5)/100}function sw(n){return Math.round((n*xo+5)/xo*256)/256}function Cd(n){n.width?(n.wpx=_0(n.width),n.wch=b0(n.wpx),n.MDW=xo):n.wpx?(n.wch=b0(n.wpx),n.width=sw(n.wch),n.MDW=xo):"number"==typeof n.wch&&(n.width=sw(n.wch),n.wpx=_0(n.width),n.MDW=xo),n.customWidth&&delete n.customWidth}var sG=96;function v0(n){return 96*n/sG}function Gm(n){return n*sG/96}function kIe(n,t,e){e||(e=se(6+4*t.length)),e.write_shift(2,n),Cr(t,e);var i=e.length>e.l?e.slice(0,e.l):e;return null==e.l&&(e.l=e.length),i}var wM,SIe=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],DIe=_o;function aG(n,t){t||(t=se(84)),wM||(wM=U1(SIe));var e=wM[n.patternType];null==e&&(e=40),t.write_shift(4,e);var i=0;if(40!=e)for(K1({auto:1},t),K1({auto:1},t);i<12;++i)t.write_shift(4,0);else{for(;i<4;++i)t.write_shift(4,0);for(;i<12;++i)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function cG(n,t,e){return e||(e=se(16)),e.write_shift(2,t||0),e.write_shift(2,n.numFmtId||0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(1,0),e}function y0(n,t){return t||(t=se(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var IIe=_o;function $Ie(n,t){var e=Jo();return be(e,278),function OIe(n,t){if(t){var e=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(i){for(var r=i[0];r<=i[1];++r)null!=t[r]&&++e}),0!=e&&(be(n,615,Ca(e)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(i){for(var r=i[0];r<=i[1];++r)null!=t[r]&&be(n,44,kIe(r,t[r]))}),be(n,616))}}(e,n.SSF),function NIe(n){be(n,611,Ca(1)),be(n,43,function TIe(n,t){t||(t=se(153)),t.write_shift(2,20*n.sz),function rDe(n,t){t||(t=se(2)),t.write_shift(1,(n.italic?2:0)|(n.strike?8:0)|(n.outline?16:0)|(n.shadow?32:0)|(n.condense?64:0)|(n.extend?128:0)),t.write_shift(1,0)}(n,t),t.write_shift(2,n.bold?700:400);var e=0;"superscript"==n.vertAlign?e=1:"subscript"==n.vertAlign&&(e=2),t.write_shift(2,e),t.write_shift(1,n.underline||0),t.write_shift(1,n.family||0),t.write_shift(1,n.charset||0),t.write_shift(1,0),K1(n.color,t);var i=0;return"major"==n.scheme&&(i=1),"minor"==n.scheme&&(i=2),t.write_shift(1,i),Cr(n.name,t),t.length>t.l?t.slice(0,t.l):t}({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),be(n,612)}(e),function LIe(n){be(n,603,Ca(2)),be(n,45,aG({patternType:"none"})),be(n,45,aG({patternType:"gray125"})),be(n,604)}(e),function BIe(n){be(n,613,Ca(1)),be(n,46,function MIe(n,t){return t||(t=se(51)),t.write_shift(1,0),y0(0,t),y0(0,t),y0(0,t),y0(0,t),y0(0,t),t.length>t.l?t.slice(0,t.l):t}()),be(n,614)}(e),function VIe(n){be(n,626,Ca(1)),be(n,47,cG({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),be(n,627)}(e),function UIe(n,t){be(n,617,Ca(t.length)),t.forEach(function(e){be(n,47,cG(e,0))}),be(n,618)}(e,t.cellXfs),function HIe(n){be(n,619,Ca(1)),be(n,48,function RIe(n,t){return t||(t=se(52)),t.write_shift(4,n.xfId),t.write_shift(2,1),t.write_shift(1,+n.builtinId),t.write_shift(1,0),u0(n.name||"",t),t.length>t.l?t.slice(0,t.l):t}({xfId:0,builtinId:0,name:"Normal"})),be(n,620)}(e),function zIe(n){be(n,505,Ca(0)),be(n,506)}(e),function jIe(n){be(n,508,function FIe(n,t,e){var i=se(2052);return i.write_shift(4,n),u0(t,i),u0(e,i),i.length>i.l?i.slice(0,i.l):i}(0,"TableStyleMedium9","PivotStyleMedium4")),be(n,509)}(e),be(e,279),e.end()}function CM(n,t){if(t&&t.themeXLSX)return t.themeXLSX;if(n&&"string"==typeof n.raw)return n.raw;var e=[qi];return e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]='',e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]='',e[e.length]="",e[e.length]="",e[e.length]="",e[e.length]="",e.join("")}function dG(n,t){var e=[21600,21600],i=["m0,0l0",e[1],e[0],e[1],e[0],"0xe"].join(","),r=[Pe("xml",null,{"xmlns:v":Cs.v,"xmlns:o":Cs.o,"xmlns:x":Cs.x,"xmlns:mv":Cs.mv}).replace(/\/>/,">"),Pe("o:shapelayout",Pe("o:idmap",null,{"v:ext":"edit",data:n}),{"v:ext":"edit"})],o=65536*n,s=t||[];return s.length>0&&r.push(Pe("v:shapetype",[Pe("v:stroke",null,{joinstyle:"miter"}),Pe("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:e.join(","),"o:spt":202,path:i})),s.forEach(function(a){++o,r.push(function kMe(n,t){var e=zn(n[0]),i={color2:"#BEFF82",type:"gradient"};"gradient"==i.type&&(i.angle="-180");var r="gradient"==i.type?Pe("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,o=Pe("v:fill",r,i);return["",o,Pe("v:shadow",null,{on:"t",obscured:"t"}),Pe("v:path",null,{"o:connecttype":"none"}),'
','',"","",qr("x:Anchor",[e.c+1,0,e.r+1,0,e.c+3,20,e.r+5,20].join(",")),qr("x:AutoFill","False"),qr("x:Row",String(e.r)),qr("x:Column",String(e.c)),n[1].hidden?"":"","",""].join("")}(a,o))}),r.push(""),r.join("")}function TMe(n){var t=[qi,Pe("comments",null,{xmlns:Wu[0]})],e=[];return t.push(""),n.forEach(function(i){i[1].forEach(function(r){var o=en(r.a);-1==e.indexOf(o)&&(e.push(o),t.push(""+o+"")),r.T&&r.ID&&-1==e.indexOf("tc="+r.ID)&&(e.push("tc="+r.ID),t.push("tc="+r.ID+""))})}),0==e.length&&(e.push("SheetJ5"),t.push("SheetJ5")),t.push(""),t.push(""),n.forEach(function(i){var r=0,o=[],s=0;if(i[1][0]&&i[1][0].T&&i[1][0].ID&&(r=e.indexOf("tc="+i[1][0].ID)),i[1].forEach(function(l){l.a&&(r=e.indexOf(en(l.a))),l.T&&++s,o.push(null==l.t?"":en(l.t))}),0===s)i[1].forEach(function(l){t.push(''),t.push(qr("t",null==l.t?"":en(l.t))),t.push("")});else{t.push('');for(var a="Comment:\n "+o[0]+"\n",c=1;c")}}),t.push(""),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}function DMe(n,t,e){var i=[qi,Pe("ThreadedComments",null,{xmlns:yr.TCMNT}).replace(/[\/]>/,">")];return n.forEach(function(r){var o="";(r[1]||[]).forEach(function(s,a){if(s.T){s.a&&-1==t.indexOf(s.a)&&t.push(s.a);var c={ref:r[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+e.tcid++).slice(-12)+"}"};0==a?o=c.id:c.parentId=o,s.ID=c.id,s.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(s.a)).slice(-12)+"}"),i.push(Pe("threadedComment",qr("text",s.t||""),c))}else delete s.ID})}),i.push(""),i.join("")}var FMe=bo;function NMe(n){var t=Jo(),e=[];return be(t,628),be(t,630),n.forEach(function(i){i[1].forEach(function(r){e.indexOf(r.a)>-1||(e.push(r.a.slice(0,54)),be(t,632,function PMe(n){return Cr(n.slice(0,54))}(r.a)))})}),be(t,631),be(t,633),n.forEach(function(i){i[1].forEach(function(r){r.iauthor=e.indexOf(r.a);var o={s:zn(i[0]),e:zn(i[0])};be(t,635,function RMe(n,t){return null==t&&(t=se(36)),t.write_shift(4,n[1].iauthor),zm(n[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}([o,r])),r.t&&r.t.length>0&&be(t,637,function ZSe(n,t){var e=!1;return null==t&&(e=!0,t=se(23+4*n.t.length)),t.write_shift(1,1),Cr(n.t,t),t.write_shift(4,1),function KSe(n,t){t||(t=se(4)),t.write_shift(2,n.ich||0),t.write_shift(2,n.ifnt||0)}({ich:0,ifnt:0},t),e?t.slice(0,t.l):t}(r)),be(t,636),delete r.iauthor})}),be(t,634),be(t,629),t.end()}var UMe=["xlsb","xlsm","xlam","biff8","xla"],oh=function(){var n=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function e(i,r,o,s){var a=!1,c=!1;0==o.length?c=!0:"["==o.charAt(0)&&(c=!0,o=o.slice(1,-1)),0==s.length?a=!0:"["==s.charAt(0)&&(a=!0,s=s.slice(1,-1));var l=o.length>0?0|parseInt(o,10):0,d=s.length>0?0|parseInt(s,10):0;return a?d+=t.c:--d,c?l+=t.r:--l,r+(a?"":"$")+on(d)+(c?"":"$")+yn(l)}return function(r,o){return t=o,r.replace(n,e)}}(),kM=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,lw=function(){return function(t,e){return t.replace(kM,function(i,r,o,s,a,c){var l=ZI(s)-(o?0:e.c),d=YI(c)-(a?0:e.r);return r+"R"+("$"==a?d+1:0==d?"":"["+d+"]")+"C"+("$"==o?l+1:0==l?"":"["+l+"]")})}}();function hG(n,t){return n.replace(kM,function(e,i,r,o,s,a){return i+("$"==r?r+o:on(ZI(o)+t.c))+("$"==s?s+a:yn(YI(a)+t.r))})}function cr(n){n.l+=1}function kd(n,t){var e=n.read_shift(1==t?1:2);return[16383&e,e>>14&1,e>>15&1]}function mG(n,t,e){var i=2;if(e){if(e.biff>=2&&e.biff<=5)return pG(n);12==e.biff&&(i=4)}var r=n.read_shift(i),o=n.read_shift(i),s=kd(n,2),a=kd(n,2);return{s:{r,c:s[0],cRel:s[1],rRel:s[2]},e:{r:o,c:a[0],cRel:a[1],rRel:a[2]}}}function pG(n){var t=kd(n,2),e=kd(n,2),i=n.read_shift(1),r=n.read_shift(1);return{s:{r:t[0],c:i,cRel:t[1],rRel:t[2]},e:{r:e[0],c:r,cRel:e[1],rRel:e[2]}}}function gG(n,t,e){if(e&&e.biff>=2&&e.biff<=5)return function QMe(n){var t=kd(n,2),e=n.read_shift(1);return{r:t[0],c:e,cRel:t[1],rRel:t[2]}}(n);var i=n.read_shift(e&&12==e.biff?4:2),r=kd(n,2);return{r:i,c:r[0],cRel:r[1],rRel:r[2]}}function KMe(n){var t=n.read_shift(2),e=n.read_shift(2);return{r:t,c:255&e,fQuoted:!!(16384&e),cRel:e>>15,rRel:e>>15}}function _G(n){var t=1&n[n.l+1];return n.l+=4,[t,1]}function bG(n){return[n.read_shift(1),n.read_shift(1)]}function kRe(n,t){var e=[n.read_shift(1)];if(12==t)switch(e[0]){case 2:e[0]=4;break;case 4:e[0]=16;break;case 0:e[0]=1;break;case 1:e[0]=2}switch(e[0]){case 4:e[1]=function Qi(n,t){return 1===n.read_shift(t)}(n,1)?"TRUE":"FALSE",12!=t&&(n.l+=7);break;case 37:case 16:e[1]=al[n[n.l]],n.l+=12==t?4:8;break;case 0:n.l+=8;break;case 1:e[1]=vo(n);break;case 2:e[1]=function nh(n,t,e){if(e.biff>5)return function p0(n,t,e){var i=n.read_shift(e&&2==e.biff?1:2);return 0===i?(n.l++,""):function th(n,t,e){if(e){if(e.biff>=2&&e.biff<=5)return n.read_shift(t,"cpstr");if(e.biff>=12)return n.read_shift(t,"dbcs-cont")}var r=n.read_shift(1);return n.read_shift(t,0===r?"sbcs-cont":"dbcs-cont")}(n,i,e)}(n,0,e);var i=n.read_shift(1);return 0===i?(n.l++,""):n.read_shift(i,e.biff<=4||!n.lens?"cpstr":"sbcs-cont")}(n,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+e[0])}return e}function ERe(n,t,e){for(var i=n.read_shift(12==e.biff?4:2),r=[],o=0;o!=i;++o)r.push((12==e.biff?Yu:nw)(n,8));return r}function TRe(n,t,e){var i=0,r=0;12==e.biff?(i=n.read_shift(4),r=n.read_shift(4)):(r=1+n.read_shift(1),i=1+n.read_shift(2)),e.biff>=2&&e.biff<8&&(--i,0==--r&&(r=256));for(var o=0,s=[];o!=i&&(s[o]=[]);++o)for(var a=0;a!=r;++a)s[o][a]=kRe(n,e.biff);return s}function x0(n,t,e){return n.l+=2,[KMe(n)]}function EM(n){return n.l+=6,[]}function vG(n){return n.l+=2,[Ki(n),1&n.read_shift(2)]}var WRe=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],yG={1:{n:"PtgExp",f:function bRe(n,t,e){return n.l++,e&&12==e.biff?[n.read_shift(4,"i"),0]:[n.read_shift(2),n.read_shift(e&&2==e.biff?1:2)]}},2:{n:"PtgTbl",f:_o},3:{n:"PtgAdd",f:cr},4:{n:"PtgSub",f:cr},5:{n:"PtgMul",f:cr},6:{n:"PtgDiv",f:cr},7:{n:"PtgPower",f:cr},8:{n:"PtgConcat",f:cr},9:{n:"PtgLt",f:cr},10:{n:"PtgLe",f:cr},11:{n:"PtgEq",f:cr},12:{n:"PtgGe",f:cr},13:{n:"PtgGt",f:cr},14:{n:"PtgNe",f:cr},15:{n:"PtgIsect",f:cr},16:{n:"PtgUnion",f:cr},17:{n:"PtgRange",f:cr},18:{n:"PtgUplus",f:cr},19:{n:"PtgUminus",f:cr},20:{n:"PtgPercent",f:cr},21:{n:"PtgParen",f:cr},22:{n:"PtgMissArg",f:cr},23:{n:"PtgStr",f:function CRe(n,t,e){return n.l++,m0(n,0,e)}},26:{n:"PtgSheet",f:function KRe(n,t,e){return n.l+=5,n.l+=2,n.l+=2==e.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function XRe(n,t,e){return n.l+=2==e.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function vRe(n){return n.l++,al[n.read_shift(1)]}},29:{n:"PtgBool",f:function xRe(n){return n.l++,0!==n.read_shift(1)}},30:{n:"PtgInt",f:function yRe(n){return n.l++,n.read_shift(2)}},31:{n:"PtgNum",f:function wRe(n){return n.l++,vo(n)}},32:{n:"PtgArray",f:function iRe(n,t,e){var i=(96&n[n.l++])>>5;return n.l+=2==e.biff?6:12==e.biff?14:7,[i]}},33:{n:"PtgFunc",f:function mRe(n,t,e){var i=(96&n[n.l])>>5;n.l+=1;var r=n.read_shift(e&&e.biff<=3?1:2);return[DFe[r],kG[r],i]}},34:{n:"PtgFuncVar",f:function pRe(n,t,e){var i=n[n.l++],r=n.read_shift(1),o=e&&e.biff<=3?[88==i?-1:0,n.read_shift(1)]:function gRe(n){return[n[n.l+1]>>7,32767&n.read_shift(2)]}(n);return[r,(0===o[0]?kG:SFe)[o[1]]]}},35:{n:"PtgName",f:function SRe(n,t,e){var i=n.read_shift(1)>>>5&3,o=n.read_shift(!e||e.biff>=8?4:2);switch(e.biff){case 2:n.l+=5;break;case 3:case 4:n.l+=8;break;case 5:n.l+=12}return[i,0,o]}},36:{n:"PtgRef",f:function uRe(n,t,e){var i=(96&n[n.l])>>5;return n.l+=1,[i,gG(n,0,e)]}},37:{n:"PtgArea",f:function ZMe(n,t,e){return[(96&n[n.l++])>>5,mG(n,0,e)]}},38:{n:"PtgMemArea",f:function IRe(n,t,e){var i=n.read_shift(1)>>>5&3;return n.l+=e&&2==e.biff?3:4,[i,n.read_shift(e&&2==e.biff?1:2)]}},39:{n:"PtgMemErr",f:_o},40:{n:"PtgMemNoMem",f:_o},41:{n:"PtgMemFunc",f:function MRe(n,t,e){return[n.read_shift(1)>>>5&3,n.read_shift(e&&2==e.biff?1:2)]}},42:{n:"PtgRefErr",f:function RRe(n,t,e){var i=n.read_shift(1)>>>5&3;return n.l+=4,e.biff<8&&n.l--,12==e.biff&&(n.l+=2),[i]}},43:{n:"PtgAreaErr",f:function eRe(n,t,e){var i=(96&n[n.l++])>>5;return n.l+=e&&e.biff>8?12:e.biff<8?6:8,[i]}},44:{n:"PtgRefN",f:function hRe(n,t,e){var i=(96&n[n.l])>>5;n.l+=1;var r=function XMe(n,t,e){var i=e&&e.biff?e.biff:8;if(i>=2&&i<=5)return function YMe(n){var t=n.read_shift(2),e=n.read_shift(1),i=(32768&t)>>15,r=(16384&t)>>14;return t&=16383,1==i&&t>=8192&&(t-=16384),1==r&&e>=128&&(e-=256),{r:t,c:e,cRel:r,rRel:i}}(n);var r=n.read_shift(i>=12?4:2),o=n.read_shift(2),s=(16384&o)>>14,a=(32768&o)>>15;if(o&=16383,1==a)for(;r>524287;)r-=1048576;if(1==s)for(;o>8191;)o-=16384;return{r,c:o,cRel:s,rRel:a}}(n,0,e);return[i,r]}},45:{n:"PtgAreaN",f:function nRe(n,t,e){var i=(96&n[n.l++])>>5,r=function qMe(n,t,e){if(e.biff<8)return pG(n);var i=n.read_shift(12==e.biff?4:2),r=n.read_shift(12==e.biff?4:2),o=kd(n,2),s=kd(n,2);return{s:{r:i,c:o[0],cRel:o[1],rRel:o[2]},e:{r,c:s[0],cRel:s[1],rRel:s[2]}}}(n,0,e);return[i,r]}},46:{n:"PtgMemAreaN",f:function YRe(n){return[n.read_shift(1)>>>5&3,n.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function ZRe(n){return[n.read_shift(1)>>>5&3,n.read_shift(2)]}},57:{n:"PtgNameX",f:function DRe(n,t,e){return 5==e.biff?function ARe(n){var t=n.read_shift(1)>>>5&3,e=n.read_shift(2,"i");n.l+=8;var i=n.read_shift(2);return n.l+=12,[t,e,i]}(n):[n.read_shift(1)>>>5&3,n.read_shift(2),n.read_shift(4)]}},58:{n:"PtgRef3d",f:function fRe(n,t,e){var i=(96&n[n.l])>>5;n.l+=1;var r=n.read_shift(2);return e&&5==e.biff&&(n.l+=12),[i,r,gG(n,0,e)]}},59:{n:"PtgArea3d",f:function JMe(n,t,e){var i=(96&n[n.l++])>>5,r=n.read_shift(2,"i");if(e&&5===e.biff)n.l+=12;return[i,r,mG(n,0,e)]}},60:{n:"PtgRefErr3d",f:function FRe(n,t,e){var i=(96&n[n.l++])>>5,r=n.read_shift(2),o=4;if(e)switch(e.biff){case 5:o=15;break;case 12:o=6}return n.l+=o,[i,r]}},61:{n:"PtgAreaErr3d",f:function tRe(n,t,e){var i=(96&n[n.l++])>>5,r=n.read_shift(2),o=8;if(e)switch(e.biff){case 5:n.l+=12,o=6;break;case 12:o=12}return n.l+=o,[i,r]}},255:{}},eFe={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},tFe={1:{n:"PtgElfLel",f:vG},2:{n:"PtgElfRw",f:x0},3:{n:"PtgElfCol",f:x0},6:{n:"PtgElfRwV",f:x0},7:{n:"PtgElfColV",f:x0},10:{n:"PtgElfRadical",f:x0},11:{n:"PtgElfRadicalS",f:EM},13:{n:"PtgElfColS",f:EM},15:{n:"PtgElfColSV",f:EM},16:{n:"PtgElfRadicalLel",f:vG},25:{n:"PtgList",f:function qRe(n){n.l+=2;var t=n.read_shift(2),e=n.read_shift(2),i=n.read_shift(4),r=n.read_shift(2),o=n.read_shift(2);return{ixti:t,coltype:3&e,rt:WRe[e>>2&31],idx:i,c:r,C:o}}},29:{n:"PtgSxName",f:function QRe(n){return n.l+=2,[n.read_shift(4)]}},255:{}},nFe={0:{n:"PtgAttrNoop",f:function JRe(n){return n.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function cRe(n,t,e){var i=255&n[n.l+1]?1:0;return n.l+=e&&2==e.biff?3:4,[i]}},2:{n:"PtgAttrIf",f:function sRe(n,t,e){var i=255&n[n.l+1]?1:0;return n.l+=2,[i,n.read_shift(e&&2==e.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function rRe(n,t,e){n.l+=2;for(var i=n.read_shift(e&&2==e.biff?1:2),r=[],o=0;o<=i;++o)r.push(n.read_shift(e&&2==e.biff?1:2));return r}},8:{n:"PtgAttrGoto",f:function oRe(n,t,e){var i=255&n[n.l+1]?1:0;return n.l+=2,[i,n.read_shift(e&&2==e.biff?1:2)]}},16:{n:"PtgAttrSum",f:function _Re(n,t,e){n.l+=e&&2==e.biff?3:4}},32:{n:"PtgAttrBaxcel",f:_G},33:{n:"PtgAttrBaxcel",f:_G},64:{n:"PtgAttrSpace",f:function lRe(n){return n.read_shift(2),bG(n)}},65:{n:"PtgAttrSpaceSemi",f:function dRe(n){return n.read_shift(2),bG(n)}},128:{n:"PtgAttrIfError",f:function aRe(n){var t=255&n[n.l+1]?1:0;return n.l+=2,[t,n.read_shift(2)]}},255:{}};function w0(n,t,e,i){if(i.biff<8)return _o(n,t);for(var r=n.l+t,o=[],s=0;s!==e.length;++s)switch(e[s][0]){case"PtgArray":e[s][1]=TRe(n,0,i),o.push(e[s][1]);break;case"PtgMemArea":e[s][2]=ERe(n,0,i),o.push(e[s][2]);break;case"PtgExp":i&&12==i.biff&&(e[s][1][1]=n.read_shift(4),o.push(e[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+e[s][0]}return 0!=(t=r-n.l)&&o.push(_o(n,t)),o}function iFe(n){for(var t=[],e=0;e=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function oFe(n,t){var e=n.lastIndexOf("!"),i=t.lastIndexOf("!");return-1==e&&-1==i?n+":"+t:e>0&&i>0&&n.slice(0,e).toLowerCase()==t.slice(0,i).toLowerCase()?n+":"+t.slice(i+1):(console.error("Cannot hydrate range",n,t),n+":"+t)}function xG(n,t,e){if(!n)return"SH33TJSERR0";if(e.biff>8&&(!n.XTI||!n.XTI[t]))return n.SheetNames[t];if(!n.XTI)return"SH33TJSERR6";var i=n.XTI[t];if(e.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),0==t?"":n.XTI[t-1];if(!i)return"SH33TJSERR1";var r="";if(e.biff>8)switch(n[i[0]][0]){case 357:return r=-1==i[1]?"#REF":n.SheetNames[i[1]],i[1]==i[2]?r:r+":"+n.SheetNames[i[2]];case 358:return null!=e.SID?n.SheetNames[e.SID]:"SH33TJSSAME"+n[i[0]][0];default:return"SH33TJSSRC"+n[i[0]][0]}switch(n[i[0]][0][0]){case 1025:return r=-1==i[1]?"#REF":n.SheetNames[i[1]]||"SH33TJSERR3",i[1]==i[2]?r:r+":"+n.SheetNames[i[2]];case 14849:return n[i[0]].slice(1).map(function(o){return o.Name}).join(";;");default:return n[i[0]][0][3]?(r=-1==i[1]?"#REF":n[i[0]][0][3][i[1]]||"SH33TJSERR4",i[1]==i[2]?r:r+":"+n[i[0]][0][3][i[2]]):"SH33TJSERR2"}}function wG(n,t,e){var i=xG(n,t,e);return"#REF"==i?i:d0(i,e)}function wo(n,t,e,i,r){var c,l,d,f,o=r&&r.biff||8,s={s:{c:0,r:0},e:{c:0,r:0}},a=[],u=0,h=0,m="";if(!n[0]||!n[0][0])return"";for(var g=-1,p="",b=0,k=n[0].length;b=0){switch(n[0][g][1][0]){case 0:p=In(" ",n[0][g][1][1]);break;case 1:p=In("\r",n[0][g][1][1]);break;default:if(p="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+n[0][g][1][0])}l+=p,g=-1}a.push(l+rFe[w[0]]+c);break;case"PtgIsect":c=a.pop(),l=a.pop(),a.push(l+" "+c);break;case"PtgUnion":c=a.pop(),l=a.pop(),a.push(l+","+c);break;case"PtgRange":c=a.pop(),l=a.pop(),a.push(oFe(l,c));break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":d=a0(w[1][1],s,r),a.push(c0(d,o));break;case"PtgRefN":d=e?a0(w[1][1],e,r):w[1][1],a.push(c0(d,o));break;case"PtgRef3d":u=w[1][1],d=a0(w[1][2],s,r),m=wG(i,u,r),a.push(m+"!"+c0(d,o));break;case"PtgFunc":case"PtgFuncVar":var j=w[1][0],P=w[1][1];j||(j=0);var S=0==(j&=127)?[]:a.slice(-j);a.length-=j,"User"===P&&(P=S.shift()),a.push(P+"("+S.join(",")+")");break;case"PtgBool":a.push(w[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":a.push(w[1]);break;case"PtgNum":a.push(String(w[1]));break;case"PtgStr":a.push('"'+w[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":f=t$(w[1][1],e?{s:e}:s,r),a.push(XI(f,r));break;case"PtgArea":f=t$(w[1][1],s,r),a.push(XI(f,r));break;case"PtgArea3d":f=w[1][2],m=wG(i,u=w[1][1],r),a.push(m+"!"+XI(f,r));break;case"PtgAttrSum":a.push("SUM("+a.pop()+")");break;case"PtgName":var U=(i.names||[])[(h=w[1][2])-1]||(i[0]||[])[h],V=U?U.Name:"SH33TJSNAME"+String(h);V&&"_xlfn."==V.slice(0,6)&&!r.xlfn&&(V=V.slice(6)),a.push(V);break;case"PtgNameX":var J,q=w[1][1];if(h=w[1][2],!(r.biff<=5)){var G="";if(14849==((i[q]||[])[0]||[])[0]||(1025==((i[q]||[])[0]||[])[0]?i[q][h]&&i[q][h].itab>0&&(G=i.SheetNames[i[q][h].itab-1]+"!"):G=i.SheetNames[h-1]+"!"),i[q]&&i[q][h])G+=i[q][h].Name;else if(i[0]&&i[0][h])G+=i[0][h].Name;else{var ve=(xG(i,q,r)||"").split(";;");ve[h-1]?G=ve[h-1]:G+="SH33TJSERRX"}a.push(G);break}q<0&&(q=-q),i[q]&&(J=i[q][h]),J||(J={Name:"SH33TJSERRY"}),a.push(J.Name);break;case"PtgParen":var Se="(",me=")";if(g>=0){switch(p="",n[0][g][1][0]){case 2:Se=In(" ",n[0][g][1][1])+Se;break;case 3:Se=In("\r",n[0][g][1][1])+Se;break;case 4:me=In(" ",n[0][g][1][1])+me;break;case 5:me=In("\r",n[0][g][1][1])+me;break;default:if(r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+n[0][g][1][0])}g=-1}a.push(Se+a.pop()+me);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":a.push("#REF!");break;case"PtgExp":var re={c:e.c,r:e.r};if(i.sharedf[ln(d={c:w[1][1],r:w[1][0]})]){var Y=i.sharedf[ln(d)];a.push(wo(Y,0,re,i,r))}else{var ge=!1;for(c=0;c!=i.arrayf.length;++c)if(!(d.c<(l=i.arrayf[c])[0].s.c||d.c>l[0].e.c||d.rl[0].e.r)){a.push(wo(l[1],0,re,i,r)),ge=!0;break}ge||a.push(w[1])}break;case"PtgArray":a.push("{"+iFe(w[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=b;break;case"PtgMissArg":a.push("");break;case"PtgList":a.push("Table"+w[1].idx+"[#"+w[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(w))}if(3!=r.biff&&g>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(n[0][b][0])){var We=!0;switch((w=n[0][g])[1][0]){case 4:We=!1;case 0:p=In(" ",w[1][1]);break;case 5:We=!1;case 1:p=In("\r",w[1][1]);break;default:if(p="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+w[1][0])}a.push((We?p:"")+a.pop()+(We?"":p)),g=-1}}if(a.length>1&&r.WTF)throw new Error("bad formula stack");return"TRUE"==a[0]||"FALSE"!=a[0]&&a[0]}function dw(n,t,e){var i=n.read_shift(4),r=function C0(n,t,e){for(var r,o,i=n.l+t,s=[];i!=n.l;)t=i-n.l,r=yG[o=n[n.l]]||yG[eFe[o]],(24===o||25===o)&&(r=(24===o?tFe:nFe)[n[n.l+1]]),r&&r.f?s.push([r.n,r.f(n,t,e)]):_o(n,t);return s}(n,i,e),o=n.read_shift(4);return[r,o>0?w0(n,o,r,e):null]}var fFe=dw,uw=dw,mFe=dw,pFe=dw;function CG(n){if((0|n)==n&&n=0){var t=se(11);return t.write_shift(4,3),t.write_shift(1,30),t.write_shift(2,n),t.write_shift(4,0),t}var e=se(17);return e.write_shift(4,11),e.write_shift(1,31),e.write_shift(8,n),e.write_shift(4,0),e}var TFe=function EFe(n,t){if("number"==typeof n)return CG(n);if("boolean"==typeof n)return function _Fe(n){var t=se(10);return t.write_shift(4,2),t.write_shift(1,29),t.write_shift(1,n?1:0),t.write_shift(4,0),t}(n);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(n))return function gFe(n){var t=se(10);return t.write_shift(4,2),t.write_shift(1,28),t.write_shift(1,n),t.write_shift(4,0),t}(+aM[n]);if(n.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function vFe(n){var t=zn(n),e=se(15);return e.write_shift(4,7),e.write_shift(1,36),e.write_shift(4,t.r),e.write_shift(2,t.c|("$"==n.charAt(0)?0:1)<<14|(n.match(/\$\d/)?0:1)<<15),e.write_shift(4,0),e}(n);if(n.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function wFe(n){var t=n.split(":"),e=t[0],i=se(23);i.write_shift(4,15);var r=zn(e=t[0]);return i.write_shift(1,36),i.write_shift(4,r.r),i.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),i.write_shift(4,0),r=zn(e=t[1]),i.write_shift(1,36),i.write_shift(4,r.r),i.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),i.write_shift(4,0),i.write_shift(1,17),i.write_shift(4,0),i}(n);if(n.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function kFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e);n=n.slice(e+1),"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var r=wr(n),o=se(23);return o.write_shift(4,15),o.write_shift(1,59),o.write_shift(2,2+t.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,r.s.r),o.write_shift(4,r.e.r),o.write_shift(2,r.s.c),o.write_shift(2,r.e.c),o.write_shift(4,0),o}(n,t);if(n.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function yFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e),r=zn(n=n.slice(e+1));"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var o=se(17);return o.write_shift(4,9),o.write_shift(1,58),o.write_shift(2,2+t.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,r.r),o.write_shift(2,r.c|("$"==n.charAt(0)?0:1)<<14|(n.match(/\$\d/)?0:1)<<15),o.write_shift(4,0),o}(n,t);if(n.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function CFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e);n=n.slice(e+1),"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var r=n.split(":");s=r[0];var o=se(27);o.write_shift(4,19);var s=r[0],a=zn(s);return o.write_shift(1,58),o.write_shift(2,2+t.SheetNames.map(function(c){return c.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,a.r),o.write_shift(2,a.c|("$"==s.charAt(0)?0:1)<<14|(s.match(/\$\d/)?0:1)<<15),a=zn(s=r[1]),o.write_shift(1,58),o.write_shift(2,2+t.SheetNames.map(function(c){return c.toLowerCase()}).indexOf(i.toLowerCase())),o.write_shift(4,a.r),o.write_shift(2,a.c|("$"==s.charAt(0)?0:1)<<14|(s.match(/\$\d/)?0:1)<<15),o.write_shift(1,17),o.write_shift(4,0),o}(n,t);if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(n))return function xFe(n,t){var e=n.lastIndexOf("!"),i=n.slice(0,e);n=n.slice(e+1),"'"==i.charAt(0)&&(i=i.slice(1,-1).replace(/''/g,"'"));var r=se(17);return r.write_shift(4,9),r.write_shift(1,60),r.write_shift(2,2+t.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(i.toLowerCase())),r.write_shift(4,0),r.write_shift(2,0),r.write_shift(4,0),r}(n,t);if(/^".*"$/.test(n))return function bFe(n){var t=se(7);t.write_shift(4,3+2*n.length),t.write_shift(1,23),t.write_shift(2,n.length);var e=se(2*n.length);e.write_shift(2*n.length,n,"utf16le");var i=se(4);return i.write_shift(4,0),rr([t,e,i])}(n);if(/^[+-]\d+$/.test(n))return CG(parseInt(n,10));throw"Formula |"+n+"| not supported for XLSB"},SFe={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},kG={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},DFe={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function AFe(n){return("of:="+n.replace(kM,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")}function TG(n){return n.replace(/!/,".")}var E0=typeof Map<"u";function DM(n,t,e){var i=0,r=n.length;if(e){if(E0?e.has(t):Object.prototype.hasOwnProperty.call(e,t))for(var o=E0?e.get(t):e[t];i-1?(e.width=sw(i),e.customWidth=1):null!=t.width&&(e.width=t.width),t.hidden&&(e.hidden=!0),null!=t.level&&(e.outlineLevel=e.level=t.level),e}function sh(n,t){if(n){var e=[.7,.7,.75,.75,.3,.3];"xlml"==t&&(e=[1,1,1,1,.5,.5]),null==n.left&&(n.left=e[0]),null==n.right&&(n.right=e[1]),null==n.top&&(n.top=e[2]),null==n.bottom&&(n.bottom=e[3]),null==n.header&&(n.header=e[4]),null==n.footer&&(n.footer=e[5])}}function Ed(n,t,e){var i=e.revssf[null!=t.z?t.z:"General"],r=60,o=n.length;if(null==i&&e.ssf)for(;r<392;++r)if(null==e.ssf[r]){yd(t.z,r),e.ssf[r]=t.z,e.revssf[t.z]=i=r;break}for(r=0;r!=o;++r)if(n[r].numFmtId===i)return r;return n[o]={numFmtId:i,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},o}function IFe(n,t,e){if(n&&n["!ref"]){var i=xn(n["!ref"]);if(i.e.c"u")return"";var r="",o=n.t,s=n.v;if("z"!==n.t)switch(n.t){case"b":r=n.v?"1":"0";break;case"n":r=""+n.v;break;case"e":r=al[n.v];break;case"d":i&&i.cellDates?r=xi(n.v,-1).toISOString():((n=qn(n)).t="n",r=""+(n.v=or(xi(n.v)))),typeof n.z>"u"&&(n.z=kt[14]);break;default:r=n.v}var a="z"==n.t||null==n.v?"":qr("v",en(r)),c={r:t},l=Ed(i.cellXfs,n,i);switch(0!==l&&(c.s=l),n.t){case"n":case"z":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;default:if(null==n.v){delete n.t;break}if(n.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(i&&i.bookSST){a=qr("v",""+DM(i.Strings,n.v,i.revStrings)),c.t="s";break}c.t="str"}if(n.t!=o&&(n.t=o,n.v=s),"string"==typeof n.f&&n.f){var d=n.F&&n.F.slice(0,t.length)==t?{t:"array",ref:n.F}:null;a=Pe("f",en(n.f),d)+(null!=n.v?a:"")}return n.l&&(n.l.display=en(r),e["!links"].push([t,n.l])),n.D&&(c.cm=1),Pe("c",a,c)}function aPe(n,t,e,i){var s,r=[qi,Pe("worksheet",null,{xmlns:Wu[0],"xmlns:r":yr.r})],a="",c=e.Sheets[e.SheetNames[n]];null==c&&(c={});var l=c["!ref"]||"A1",d=xn(l);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+l+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),l=Wt(d)}i||(i={}),c["!comments"]=[];var u=[];(function $Fe(n,t,e,i,r){var o=!1,s={},a=null;if("xlsx"!==i.bookType&&t.vbaraw){var c=t.SheetNames[e];try{t.Workbook&&(c=t.Workbook.Sheets[e].CodeName||c)}catch{}o=!0,s.codeName=rc(en(c))}if(n&&n["!outline"]){var l={summaryBelow:1,summaryRight:1};n["!outline"].above&&(l.summaryBelow=0),n["!outline"].left&&(l.summaryRight=0),a=(a||"")+Pe("outlinePr",null,l)}!o&&!a||(r[r.length]=Pe("sheetPr",a,s))})(c,e,n,t,r),r[r.length]=Pe("dimension",null,{ref:l}),r[r.length]=function iPe(n,t,e,i){var r={workbookViewId:"0"};return(((i||{}).Workbook||{}).Views||[])[0]&&(r.rightToLeft=i.Workbook.Views[0].RTL?"1":"0"),Pe("sheetViews",Pe("sheetView",null,r),{})}(0,0,0,e),t.sheetFormat&&(r[r.length]=Pe("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),null!=c["!cols"]&&c["!cols"].length>0&&(r[r.length]=function ZFe(n,t){for(var i,e=[""],r=0;r!=t.length;++r)(i=t[r])&&(e[e.length]=Pe("col",null,hw(r,i)));return e[e.length]="",e.join("")}(0,c["!cols"])),r[s=r.length]="",c["!links"]=[],null!=c["!ref"]&&(a=function sPe(n,t,e,i){var c,p,r=[],o=[],s=xn(n["!ref"]),a="",l="",d=[],u=0,h=0,f=n["!rows"],m=null!=n["!data"],g={r:l},b=-1;for(h=s.s.c;h<=s.e.c;++h)d[h]=on(h);for(u=s.s.r;u<=s.e.r;++u){for(o=[],l=yn(u),h=s.s.c;h<=s.e.c;++h){c=d[h]+l;var k=m?(n["!data"][u]||[])[h]:n[c];void 0!==k&&null!=(a=rPe(k,c,n,t))&&o.push(a)}(o.length>0||f&&f[u])&&(g={r:l},f&&f[u]&&((p=f[u]).hidden&&(g.hidden=1),b=-1,p.hpx?b=v0(p.hpx):p.hpt&&(b=p.hpt),b>-1&&(g.ht=b,g.customHeight=1),p.level&&(g.outlineLevel=p.level)),r[r.length]=Pe("row",o.join(""),g))}if(f)for(;u-1&&(g.ht=b,g.customHeight=1),p.level&&(g.outlineLevel=p.level),r[r.length]=Pe("row","",g));return r.join("")}(c,t),a.length>0&&(r[r.length]=a)),r.length>s+1&&(r[r.length]="",r[s]=r[s].replace("/>",">")),c["!protect"]&&(r[r.length]=function qFe(n){var t={sheet:1};return GFe.forEach(function(e){null!=n[e]&&n[e]&&(t[e]="1")}),WFe.forEach(function(e){null!=n[e]&&!n[e]&&(t[e]="0")}),n.password&&(t.password=vM(n.password).toString(16).toUpperCase()),Pe("sheetProtection",null,t)}(c["!protect"])),null!=c["!autofilter"]&&(r[r.length]=function ePe(n,t,e,i){var r="string"==typeof n.ref?n.ref:Wt(n.ref);e.Workbook||(e.Workbook={Sheets:[]}),e.Workbook.Names||(e.Workbook.Names=[]);var o=e.Workbook.Names,s=wr(r);s.s.r==s.e.r&&(s.e.r=wr(t["!ref"]).e.r,r=Wt(s));for(var a=0;a0&&(r[r.length]=function zFe(n){if(0===n.length)return"";for(var t='',e=0;e!=n.length;++e)t+='';return t+""}(c["!merges"]));var f,h=-1,m=-1;return c["!links"].length>0&&(r[r.length]="",c["!links"].forEach(function(g){g[1].Target&&(f={ref:g[0]},"#"!=g[1].Target.charAt(0)&&(m=Xn(i,-1,en(g[1].Target).replace(/#.*$/,""),tn.HLINK),f["r:id"]="rId"+m),(h=g[1].Target.indexOf("#"))>-1&&(f.location=en(g[1].Target.slice(h+1))),g[1].Tooltip&&(f.tooltip=en(g[1].Tooltip)),f.display=g[1].display,r[r.length]=Pe("hyperlink",null,f))}),r[r.length]=""),delete c["!links"],null!=c["!margins"]&&(r[r.length]=function XFe(n){return sh(n),Pe("pageMargins",null,n)}(c["!margins"])),(!t||t.ignoreEC||null==t.ignoreEC)&&(r[r.length]=qr("ignoredErrors",Pe("ignoredError",null,{numberStoredAsText:1,sqref:l}))),u.length>0&&(m=Xn(i,-1,"../drawings/drawing"+(n+1)+".xml",tn.DRAW),r[r.length]=Pe("drawing",null,{"r:id":"rId"+m}),c["!drawing"]=u),c["!comments"].length>0&&(m=Xn(i,-1,"../drawings/vmlDrawing"+(n+1)+".vml",tn.VML),r[r.length]=Pe("legacyDrawing",null,{"r:id":"rId"+m}),c["!legacy"]=m),r.length>1&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function dPe(n,t,e,i){var r=function lPe(n,t,e){var i=se(145),r=(e["!rows"]||[])[n]||{};i.write_shift(4,n),i.write_shift(4,0);var o=320;r.hpx?o=20*v0(r.hpx):r.hpt&&(o=20*r.hpt),i.write_shift(2,o),i.write_shift(1,0);var s=0;r.level&&(s|=r.level),r.hidden&&(s|=16),(r.hpx||r.hpt)&&(s|=32),i.write_shift(1,s),i.write_shift(1,0);var a=0,c=i.l;i.l+=4;for(var l={r:n,c:0},d=null!=e["!data"],u=0;u<16;++u)if(!(t.s.c>u+1<<10||t.e.ci.l?i.slice(0,i.l):i}(i,e,t);(r.length>17||(t["!rows"]||[])[i])&&be(n,0,r)}var uPe=Yu,hPe=zm;var QPe=Yu,KPe=zm,IG=["left","right","top","bottom","header","footer"];function hOe(n,t,e,i,r,o,s){var a={r:e,c:i};if(t.c&&o["!comments"].push([ln(a),t.c]),void 0===t.v)return!1;var c="";switch(t.t){case"b":c=t.v?"1":"0";break;case"d":(t=qn(t)).z=t.z||kt[14],t.v=or(xi(t.v)),t.t="n";break;case"n":case"e":c=""+t.v;break;default:c=t.v}switch(a.s=Ed(r.cellXfs,t,r),t.l&&o["!links"].push([ln(a),t.l]),t.t){case"s":case"str":return r.bookSST?(c=DM(r.Strings,null==t.v?"":String(t.v),r.revStrings),a.t="s",a.v=c,s?be(n,18,function MPe(n,t,e){return null==e&&(e=se(8)),Xu(t,e),e.write_shift(4,t.v),e}(0,a)):be(n,7,function APe(n,t,e){return null==e&&(e=se(12)),Qu(t,e),e.write_shift(4,t.v),e}(0,a))):(a.t="str",s?be(n,17,function jPe(n,t,e){var i=null==n.v?"":String(n.v);return null==e&&(e=se(8+4*i.length)),Xu(t,e),Cr(i,e),e.length>e.l?e.slice(0,e.l):e}(t,a)):be(n,6,function HPe(n,t,e){var i=null==n.v?"":String(n.v);return null==e&&(e=se(12+4*n.v.length)),Qu(t,e),Cr(i,e),e.length>e.l?e.slice(0,e.l):e}(t,a))),!0;case"n":return t.v==(0|t.v)&&t.v>-1e3&&t.v<1e3?s?be(n,13,function BPe(n,t,e){return null==e&&(e=se(8)),Xu(t,e),o$(n.v,e),e}(t,a)):be(n,2,function NPe(n,t,e){return null==e&&(e=se(12)),Qu(t,e),o$(n.v,e),e}(t,a)):s?be(n,16,function PPe(n,t,e){return null==e&&(e=se(12)),Xu(t,e),Zu(n.v,e),e}(t,a)):be(n,5,function FPe(n,t,e){return null==e&&(e=se(16)),Qu(t,e),Zu(n.v,e),e}(t,a)),!0;case"b":return a.t="b",s?be(n,15,function CPe(n,t,e){return null==e&&(e=se(5)),Xu(t,e),e.write_shift(1,n.v?1:0),e}(t,a)):be(n,4,function xPe(n,t,e){return null==e&&(e=se(9)),Qu(t,e),e.write_shift(1,n.v?1:0),e}(t,a)),!0;case"e":return a.t="e",s?be(n,14,function SPe(n,t,e){return null==e&&(e=se(8)),Xu(t,e),e.write_shift(1,n.v),e.write_shift(2,0),e.write_shift(1,0),e}(t,a)):be(n,3,function EPe(n,t,e){return null==e&&(e=se(9)),Qu(t,e),e.write_shift(1,n.v),e}(t,a)),!0}return s?be(n,12,function vPe(n,t,e){return null==e&&(e=se(4)),Xu(t,e)}(0,a)):be(n,1,function _Pe(n,t,e){return null==e&&(e=se(8)),Qu(t,e)}(0,a)),!0}function wOe(n,t,e,i){var r=Jo(),o=e.SheetNames[n],s=e.Sheets[o]||{},a=o;try{e&&e.Workbook&&(a=e.Workbook.Sheets[n].CodeName||a)}catch{}var c=xn(s["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return s["!links"]=[],s["!comments"]=[],be(r,129),(e.vbaraw||s["!outline"])&&be(r,147,function pPe(n,t,e){null==e&&(e=se(84+4*n.length));var i=192;t&&(t.above&&(i&=-65),t.left&&(i&=-129)),e.write_shift(1,i);for(var r=1;r<3;++r)e.write_shift(1,0);return K1({auto:1},e),e.write_shift(-4,-1),e.write_shift(-4,-1),r$(n,e),e.slice(0,e.l)}(a,s["!outline"])),be(r,148,hPe(c)),function yOe(n,t,e){be(n,133),be(n,137,function sOe(n,t,e){null==e&&(e=se(30));var i=924;return(((t||{}).Views||[])[0]||{}).RTL&&(i|=32),e.write_shift(2,i),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(2,0),e.write_shift(2,100),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(4,0),e}(0,e)),be(n,138),be(n,134)}(r,0,e.Workbook),function pOe(n,t){!t||!t["!cols"]||(be(n,390),t["!cols"].forEach(function(e,i){e&&be(n,60,function nOe(n,t,e){null==e&&(e=se(18));var i=hw(n,t);e.write_shift(-4,n),e.write_shift(-4,n),e.write_shift(4,256*(i.width||10)),e.write_shift(4,0);var r=0;return t.hidden&&(r|=1),"number"==typeof i.width&&(r|=2),t.level&&(r|=t.level<<8),e.write_shift(2,r),e}(i,e))}),be(n,391))}(r,s),function fOe(n,t,e,i){var r=xn(t["!ref"]||"A1"),s="",a=[];be(n,145);var c=null!=t["!data"],l=r.e.r;t["!rows"]&&(l=Math.max(r.e.r,t["!rows"].length-1));for(var d=r.s.r;d<=l;++d){s=yn(d),dPe(n,t,r,d);var u=!1;if(d<=r.e.r)for(var h=r.s.c;h<=r.e.c;++h){d===r.s.r&&(a[h]=on(h));var f=c?(t["!data"][d]||[])[h]:t[a[h]+s];u=!!f&&hOe(n,f,d,h,i,t,u)}}be(n,146)}(r,s,0,t),function xOe(n,t){t["!protect"]&&be(n,535,function cOe(n,t){return null==t&&(t=se(66)),t.write_shift(2,n.password?vM(n.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(e){t.write_shift(4,e[1]?null==n[e[0]]||n[e[0]]?0:1:null!=n[e[0]]&&n[e[0]]?0:1)}),t}(t["!protect"]))}(r,s),function vOe(n,t,e,i){if(t["!autofilter"]){var r=t["!autofilter"],o="string"==typeof r.ref?r.ref:Wt(r.ref);e.Workbook||(e.Workbook={Sheets:[]}),e.Workbook.Names||(e.Workbook.Names=[]);var s=e.Workbook.Names,a=wr(o);a.s.r==a.e.r&&(a.e.r=wr(t["!ref"]).e.r,o=Wt(a));for(var c=0;c0){var r=Xn(i,-1,"../drawings/vmlDrawing"+(e+1)+".vml",tn.VML);be(n,551,nM("rId"+r)),t["!legacy"]=r}}(r,s,n,i),be(r,130),r.end()}var IM=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],ROe=":][*?/\\".split("");function PG(n,t){try{if(""==n)throw new Error("Sheet name cannot be blank");if(n.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(39==n.charCodeAt(0)||39==n.charCodeAt(n.length-1))throw new Error("Sheet name cannot start or end with apostrophe (')");if("history"==n.toLowerCase())throw new Error("Sheet name cannot be 'History'");ROe.forEach(function(e){if(-1!=n.indexOf(e))throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(e){if(t)return!1;throw e}return!0}function BOe(n,t){return t||(t=se(127)),t.write_shift(4,n.Hidden),t.write_shift(4,n.iTabID),nM(n.strRelID,t),Cr(n.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function ZOe(n,t){var e=Jo();return be(e,131),be(e,128,function WOe(n,t){t||(t=se(127));for(var e=0;4!=e;++e)t.write_shift(4,0);return Cr("SheetJS",t),Cr(Q_.version,t),Cr(Q_.version,t),Cr("7262",t),t.length>t.l?t.slice(0,t.l):t}()),be(e,153,function UOe(n,t){t||(t=se(72));var e=0;return n&&(n.date1904&&(e|=1),n.filterPrivacy&&(e|=8)),t.write_shift(4,e),t.write_shift(4,0),r$(n&&n.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}(n.Workbook&&n.Workbook.WBProps||null)),function QOe(n,t){if(t.Workbook&&t.Workbook.Sheets){for(var e=t.Workbook.Sheets,i=0,r=-1,o=-1;ir||(be(n,135),be(n,158,function qOe(n,t){return t||(t=se(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,n),t.write_shift(4,n),t.write_shift(1,120),t.length>t.l?t.slice(0,t.l):t}(r)),be(n,136))}}(e,n),function GOe(n,t){be(n,143);for(var e=0;e!=t.SheetNames.length;++e)be(n,156,BOe({Hidden:t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[e]&&t.Workbook.Sheets[e].Hidden||0,iTabID:e+1,strRelID:"rId"+(e+1),name:t.SheetNames[e]}));be(n,144)}(e,n),function YOe(n,t){be(n,353),be(n,357),be(n,362,function XOe(n){var t=n.SheetNames.length,e=se(12*t+28);e.write_shift(4,t+2),e.write_shift(4,0),e.write_shift(4,-2),e.write_shift(4,-2),e.write_shift(4,0),e.write_shift(4,-1),e.write_shift(4,-1);for(var i=0;i-1&&(i|=32,r=r.slice(6)),e.write_shift(4,i),e.write_shift(1,0),e.write_shift(4,null==n.Sheet?4294967295:n.Sheet);var o=[e,Cr(r),TFe(n.Ref,t)];if(n.Comment)o.push(u0(n.Comment));else{var s=se(4);s.write_shift(4,4294967295),o.push(s)}return rr(o)}(e,t))}catch{console.error("Could not serialize defined name "+JSON.stringify(e))}})}(e,n),be(e,132),e.end()}function BG(n){return Pe("NamedRange",null,{"ss:Name":"_xlnm."==n.Name.slice(0,6)?n.Name.slice(6):n.Name,"ss:RefersTo":"="+lw(n.Ref,{r:0,c:0})})}function E4e(n,t,e,i,r,o,s){if(!n||null==n.v&&null==n.f)return"";var a={};if(n.f&&(a["ss:Formula"]="="+en(lw(n.f,s))),n.F&&n.F.slice(0,t.length)==t){var c=zn(n.F.slice(t.length+1));a["ss:ArrayRange"]="RC:R"+(c.r==s.r?"":"["+(c.r-s.r)+"]")+"C"+(c.c==s.c?"":"["+(c.c-s.c)+"]")}if(n.l&&n.l.Target&&(a["ss:HRef"]=en(n.l.Target),n.l.Tooltip&&(a["x:HRefScreenTip"]=en(n.l.Tooltip))),e["!merges"])for(var l=e["!merges"],d=0;d!=l.length;++d)l[d].s.c!=s.c||l[d].s.r!=s.r||(l[d].e.c>l[d].s.c&&(a["ss:MergeAcross"]=l[d].e.c-l[d].s.c),l[d].e.r>l[d].s.r&&(a["ss:MergeDown"]=l[d].e.r-l[d].s.r));var u="",h="";switch(n.t){case"z":if(!i.sheetStubs)return"";break;case"n":u="Number",h=String(n.v);break;case"b":u="Boolean",h=n.v?"1":"0";break;case"e":u="Error",h=al[n.v];break;case"d":u="DateTime",h=new Date(n.v).toISOString(),null==n.z&&(n.z=n.z||kt[14]);break;case"s":u="String",h=function DSe(n){return(n+"").replace(HI,function(e){return UI[e]}).replace(Pj,function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"})}(n.v||"")}var f=Ed(i.cellXfs,n,i);a["ss:StyleID"]="s"+(21+f),a["ss:Index"]=s.c+1;var g="z"==n.t?"":''+(null!=n.v?h:"")+"";return(n.c||[]).length>0&&(g+=function k4e(n){return n.map(function(t){var e=function ASe(n){return n.replace(/(\r\n|[\r\n])/g," ")}(t.t||""),i=Pe("ss:Data",e,{xmlns:"http://www.w3.org/TR/REC-html40"});return Pe("Comment",i,{"ss:Author":t.a})}).join("")}(n.c)),Pe("Cell",g,a)}function T4e(n,t){var e='"}function D4e(n,t,e){var i=[],o=e.Sheets[e.SheetNames[n]],s=o?function w4e(n,t,e,i){if(!n||!((i||{}).Workbook||{}).Names)return"";for(var r=i.Workbook.Names,o=[],s=0;s0&&i.push(""+s+""),s=o?function S4e(n,t,e,i){if(!n["!ref"])return"";var r=xn(n["!ref"]),o=n["!merges"]||[],s=0,a=[];n["!cols"]&&n["!cols"].forEach(function(p,b){Cd(p);var k=!!p.width,w=hw(b,p),D={"ss:Index":b+1};k&&(D["ss:Width"]=_0(w.width)),p.hidden&&(D["ss:Hidden"]="1"),a.push(Pe("Column",null,D))});for(var c=null!=n["!data"],l=r.s.r;l<=r.e.r;++l){for(var d=[T4e(l,(n["!rows"]||[])[l])],u=r.s.c;u<=r.e.c;++u){var h=!1;for(s=0;s!=o.length;++s)if(!(o[s].s.c>u||o[s].s.r>l||o[s].e.c"),d.length>2&&a.push(d.join(""))}return a.join("")}(o,t):"",s.length>0&&i.push(""+s+"
"),i.push(function C4e(n,t,e,i){if(!n)return"";var r=[];if(n["!margins"]&&(r.push(""),n["!margins"].header&&r.push(Pe("Header",null,{"x:Margin":n["!margins"].header})),n["!margins"].footer&&r.push(Pe("Footer",null,{"x:Margin":n["!margins"].footer})),r.push(Pe("PageMargins",null,{"x:Bottom":n["!margins"].bottom||"0.75","x:Left":n["!margins"].left||"0.7","x:Right":n["!margins"].right||"0.7","x:Top":n["!margins"].top||"0.75"})),r.push("")),i&&i.Workbook&&i.Workbook.Sheets&&i.Workbook.Sheets[e])if(i.Workbook.Sheets[e].Hidden)r.push(Pe("Visible",1==i.Workbook.Sheets[e].Hidden?"SheetHidden":"SheetVeryHidden",{}));else{for(var o=0;o")}return((((i||{}).Workbook||{}).Views||[])[0]||{}).RTL&&r.push(""),n["!protect"]&&(r.push(qr("ProtectContents","True")),n["!protect"].objects&&r.push(qr("ProtectObjects","True")),n["!protect"].scenarios&&r.push(qr("ProtectScenarios","True")),null==n["!protect"].selectLockedCells||n["!protect"].selectLockedCells?null!=n["!protect"].selectUnlockedCells&&!n["!protect"].selectUnlockedCells&&r.push(qr("EnableSelection","UnlockedCells")):r.push(qr("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(s){n["!protect"][s[0]]&&r.push("<"+s[1]+"/>")})),0==r.length?"":Pe("WorksheetOptions",r.join(""),{xmlns:Cs.x})}(o,0,n,e)),o["!autofilter"]&&i.push(''),i.join("")}function A4e(n,t){t||(t={}),n.SSF||(n.SSF=qn(kt)),n.SSF&&(Lm(),e0(n.SSF),t.revssf=H1(n.SSF),t.revssf[n.SSF[65535]]=0,t.ssf=n.SSF,t.cellXfs=[],Ed(t.cellXfs,{},{revssf:{General:0}}));var e=[];e.push(function b4e(n,t){var e=[];return n.Props&&e.push(function TDe(n,t){var e=[];return yi(hM).map(function(i){for(var r=0;r'+r.join("")+""}(n.Props,n.Custprops)),e.join("")}(n,t)),e.push(function v4e(n){return(((n||{}).Workbook||{}).WBProps||{}).date1904?'':""}(n)),e.push(""),e.push("");for(var i=0;i'];return t.cellXfs.forEach(function(i,r){var o=[];o.push(Pe("NumberFormat",null,{"ss:Format":en(kt[i.numFmtId])}));var s={"ss:ID":"s"+(21+r)};e.push(Pe("Style",o.join(""),s))}),Pe("Styles",e.join(""))}(0,t),e[3]=function x4e(n){if(!((n||{}).Workbook||{}).Names)return"";for(var t=n.Workbook.Names,e=[],i=0;i0&&(i.family=a);var c=n.read_shift(1);switch(c>0&&(i.charset=c),n.l++,i.color=function nDe(n){var t={},i=n.read_shift(1)>>>1,r=n.read_shift(1),o=n.read_shift(2,"i"),s=n.read_shift(1),a=n.read_shift(1),c=n.read_shift(1);switch(n.l++,i){case 0:t.auto=1;break;case 1:t.index=r;var l=Ju[r];l&&(t.rgb=g0(l));break;case 2:t.rgb=g0([s,a,c]);break;case 3:t.theme=r}return 0!=o&&(t.tint=o>0?o/32767:o/32768),t}(n),n.read_shift(1)){case 1:i.scheme="major";break;case 2:i.scheme="minor"}return i.name=bo(n),i}},44:{f:function CIe(n,t){return[n.read_shift(2),bo(n)]}},45:{f:DIe},46:{f:IIe},47:{f:function AIe(n,t){var e=n.l+t,i=n.read_shift(2),r=n.read_shift(2);return n.l=e,{ixfe:i,numFmtId:r}}},48:{},49:{f:function qSe(n){return n.read_shift(4,"i")}},50:{},51:{f:function dMe(n){for(var t=[],e=n.read_shift(4);e-- >0;)t.push([n.read_shift(4),n.read_shift(4)]);return t}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:function Y$(n,t,e){if(!e.cellStyles)return _o(n,t);var i=e&&e.biff>=12?4:2,r=n.read_shift(i),o=n.read_shift(i),s=n.read_shift(i),a=n.read_shift(i),c=n.read_shift(2);2==i&&(n.l+=2);var l={s:r,e:o,w:s,ixfe:a,flags:c};return(e.biff>=5||!e.biff)&&(l.level=c>>8&7),l}},62:{f:function VPe(n){return[qs(n),JI(n),"is"]}},63:{f:function yMe(n){var t={};t.i=n.read_shift(4);var e={};e.r=n.read_shift(4),e.c=n.read_shift(4),t.r=ln(e);var i=n.read_shift(1);return 2&i&&(t.l="1"),8&i&&(t.a="1"),t}},64:{f:function lOe(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:_o,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function oOe(n){var t=n.read_shift(2);return n.l+=28,{RTL:32&t}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function mPe(n,t){var e={},i=n[n.l];return++n.l,e.above=!(64&i),e.left=!(128&i),n.l+=18,e.name=JSe(n,t-19),e}},148:{f:uPe,p:16},151:{f:function JPe(){}},152:{},153:{f:function VOe(n,t){var e={},i=n.read_shift(4);e.defaultThemeVersion=n.read_shift(4);var r=t>8?bo(n):"";return r.length>0&&(e.CodeName=r),e.autoCompressPictures=!!(65536&i),e.backupFile=!!(64&i),e.checkCompatibility=!!(4096&i),e.date1904=!!(1&i),e.filterPrivacy=!!(8&i),e.hidePivotFieldList=!!(1024&i),e.promptedSolutions=!!(16&i),e.publishItems=!!(2048&i),e.refreshAllConnections=!!(262144&i),e.saveExternalLinkValues=!!(128&i),e.showBorderUnselectedTables=!!(4&i),e.showInkAnnotation=!!(32&i),e.showObjects=["all","placeholders","none"][i>>13&3],e.showPivotChartFilter=!!(32768&i),e.updateLinks=["userSet","never","always"][i>>8&3],e}},154:{},155:{},156:{f:function LOe(n,t){var e={};return e.Hidden=n.read_shift(4),e.iTabID=n.read_shift(4),e.strRelID=tM(n,t-8),e.name=bo(n),e}},157:{},158:{},159:{T:1,f:function NAe(n){return[n.read_shift(4),n.read_shift(4)]}},160:{T:-1},161:{T:1,f:Yu},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:QPe},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function cMe(n,t){return{flags:n.read_shift(4),version:n.read_shift(4),name:bo(n)}}},336:{T:-1},337:{f:function fMe(n){return n.l+=4,0!=n.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:tM},357:{},358:{},359:{},360:{T:1},361:{},362:{f:function Q$(n,t,e){if(e.biff<8||!(e.biff>8)&&t==n[n.l]+(3==n[n.l+1]?1:0)+1)return function K$(n,t,e){3==n[n.l+1]&&n[n.l]++;var i=m0(n,0,e);return 3==i.charCodeAt(0)?i.slice(1):i}(n,0,e);for(var i=[],r=n.l+t,o=n.read_shift(e.biff>8?4:2);0!=o--;)i.push(KDe(n,0,e));if(n.l!=r)throw new Error("Bad ExternSheet: "+n.l+" != "+r);return i}},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function eOe(n,t,e){var i=n.l+t,r=s$(n),o=n.read_shift(1),s=[r];if(s[2]=o,e.cellFormula){var a=fFe(n,i-n.l,e);s[1]=a}else n.l=i;return s}},427:{f:function tOe(n,t,e){var i=n.l+t,o=[Yu(n,16)];if(e.cellFormula){var s=pFe(n,i-n.l,e);o[1]=s,n.l=i}else n.l=i;return o}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function iOe(n){var t={};return IG.forEach(function(e){t[e]=vo(n)}),t}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function fPe(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function YPe(n,t){var e=n.l+t,i=Yu(n,16),r=eM(n),o=bo(n),s=bo(n),a=bo(n);n.l=e;var c={rfx:i,relId:r,loc:o,display:a};return s&&(c.Tooltip=s),c}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:tM},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:FMe},633:{T:1},634:{T:-1},635:{T:1,f:function MMe(n){var t={};t.iauthor=n.read_shift(4);var e=Yu(n,16);return t.rfx=e.s,t.ref=ln(e.s),n.l+=16,t}},636:{T:-1},637:{f:YSe},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function TOe(n,t){return n.l+=10,{name:bo(n)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function dOe(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Be(n,t,e,i){var r=t;if(!isNaN(r)){var o=i||(e||[]).length||0,s=n.next(4);s.write_shift(2,r),s.write_shift(2,o),o>0&&KI(e)&&n.push(e)}}function A0(n,t,e){return n||(n=se(7)),n.write_shift(2,t),n.write_shift(2,e),n.write_shift(2,0),n.write_shift(1,0),n}function U4e(n,t,e,i){if(null!=t.v)switch(t.t){case"d":case"n":var r="d"==t.t?or(xi(t.v)):t.v;return void(r==(0|r)&&r>=0&&r<65536?Be(n,2,function bAe(n,t,e){var i=se(9);return A0(i,n,t),i.write_shift(2,e),i}(e,i,r)):Be(n,3,function gAe(n,t,e){var i=se(15);return A0(i,n,t),i.write_shift(8,e,"f"),i}(e,i,r)));case"b":case"e":return void Be(n,5,function B4e(n,t,e,i){var r=se(9);return A0(r,n,t),R$(e,i||"b",r),r}(e,i,t.v,t.t));case"s":case"str":return void Be(n,4,function V4e(n,t,e){var i=se(8+2*e.length);return A0(i,n,t),i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i.l255||f.e.r>=m){if(t.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:IV16384");f.e.c=Math.min(f.e.c,255),f.e.r=Math.min(f.e.c,m-1)}Be(i,2057,gM(0,16,t)),Be(i,13,Ks(1)),Be(i,12,Ks(100)),Be(i,15,Vo(!0)),Be(i,17,Vo(!1)),Be(i,16,Zu(.001)),Be(i,95,Vo(!0)),Be(i,42,Vo(!1)),Be(i,43,Vo(!1)),Be(i,130,Ks(1)),Be(i,128,function O2e(n){var t=se(8);return t.write_shift(4,0),t.write_shift(2,n[0]?n[0]+1:0),t.write_shift(2,n[1]?n[1]+1:0),t}([0,0])),Be(i,131,Vo(!1)),Be(i,132,Vo(!1)),l&&function Q4e(n,t){if(t){var e=0;t.forEach(function(i,r){++e<=256&&i&&Be(n,125,function sAe(n,t){var e=se(12);e.write_shift(2,t),e.write_shift(2,t),e.write_shift(2,256*n.width),e.write_shift(2,0);var i=0;return n.hidden&&(i|=1),e.write_shift(1,i),e.write_shift(1,i=n.level||0),e.write_shift(2,0),e}(hw(r,i),r))})}}(i,o["!cols"]),Be(i,512,function D2e(n,t){var e=8!=t.biff&&t.biff?2:4,i=se(2*e+6);return i.write_shift(e,n.s.r),i.write_shift(e,n.e.r+1),i.write_shift(2,n.s.c),i.write_shift(2,n.e.c+1),i.write_shift(2,0),i}(f,t)),l&&(o["!links"]=[]);for(var g=[],p=[],b=f.s.c;b<=f.e.c;++b)h[b]=on(b);for(var k=f.s.r;k<=f.e.r;++k)for(c&&(p=o["!data"][k]||[]),u=yn(k),b=f.s.c;b<=f.e.c;++b){d=h[b]+u;var w=c?p[b]:o[d];w&&(K4e(i,w,k,b,t),l&&w.l&&o["!links"].push([d,w.l]),l&&w.c&&g.push([d,w.c]))}var D=a.CodeName||a.name||r;return l&&Be(i,574,function _2e(n){var t=se(18),e=1718;return n&&n.RTL&&(e|=64),t.write_shift(2,e),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}((s.Views||[])[0])),l&&(o["!merges"]||[]).length&&Be(i,229,function W2e(n){var t=se(2+8*n.length);t.write_shift(2,n.length);for(var e=0;e255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+n.SheetNames[e]+"' extends beyond column IV (255). Data may be lost.")}var o=t||{};switch(o.biff||2){case 8:case 5:return function Z4e(n,t){var e=t||{},i=[];n&&!n.SSF&&(n.SSF=qn(kt)),n&&n.SSF&&(Lm(),e0(n.SSF),e.revssf=H1(n.SSF),e.revssf[n.SSF[65535]]=0,e.ssf=n.SSF),e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,BM(e),e.cellXfs=[],Ed(e.cellXfs,{},{revssf:{General:0}}),n.Props||(n.Props={});for(var r=0;r255||o.e.r>16383){if(i.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");o.e.c=Math.min(o.e.c,255),o.e.r=Math.min(o.e.c,16383)}for(var l=[],d=o.s.c;d<=o.e.c;++d)c[d]=on(d);for(var u=o.s.r;u<=o.e.r;++u)for(r&&(l=t["!data"][u]||[]),a=yn(u),d=o.s.c;d<=o.e.c;++d){var h=r?l[d]:t[c[d]+a];h&&U4e(n,h,u,d)}}(i,n.Sheets[n.SheetNames[r]],0,e),Be(i,10),i.end()}(n,t)}throw new Error("invalid type "+o.bookType+" for BIFF")}function HG(n,t,e,i){for(var r=n["!merges"]||[],o=[],s={},a=null!=n["!data"],c=t.s.c;c<=t.e.c;++c){for(var l=0,d=0,u=0;ue||r[u].s.c>c||r[u].e.r1&&(s.rowspan=l),d>1&&(s.colspan=d),i.editable?m=''+m+"":f&&(s["data-t"]=f&&f.t||"z",null!=f.v&&(s["data-v"]=f.v),null!=f.z&&(s["data-z"]=f.z),f.l&&"#"!=(f.l.Target||"#").charAt(0)&&(m=''+m+"")),s.id=(i.id||"sjs")+"-"+h,o.push(Pe("td",m,s))}}return""+o.join("")+""}var zG='SheetJS Table Export',jG="";function GG(n,t){var e=t||{},r=null!=e.footer?e.footer:jG,o=[null!=e.header?e.header:zG],s=wr(n["!ref"]);o.push(function $G(n,t,e){return[].join("")+""}(0,0,e));for(var a=s.s.r;a<=s.e.r;++a)o.push(HG(n,s,a,e));return o.push(""+r),o.join("")}var iNe=function(){var n=["",'',"",'',"",'',"",""].join(""),t=""+n+"";return function(){return qi+t}}();function rNe(n,t){var e="number",i="",r={"style:name":t},o="",s=0;e:if((n=n.replace(/"[$]"/g,"$")).indexOf(";")>-1&&(console.error("Unsupported ODS Style Map exported. Using first branch of "+n),n=n.slice(0,n.indexOf(";"))),"@"!=n){if(n.indexOf(/\$/)>-1&&(e="currency"),'"'==n[s]){for(o="";'"'!=n[++s]||'"'==n[++s];)o+=n[s];"*"==n[1+--s]?(s++,i+=""+en(o.replace(/""/g,'"'))+""):i+=""+en(o.replace(/""/g,'"'))+"",n=n.slice(s+1),s=0}var a=n.match(/# (\?+)\/(\?+)/);if(a)i+=Pe("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":a[1].length,"number:max-denominator-value":Math.max(+a[1].replace(/./g,"9"),+a[2].replace(/./g,"9"))});else if(a=n.match(/# (\?+)\/(\d+)/))i+=Pe("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":a[1].length,"number:denominator-value":+a[2]});else if(a=n.match(/(\d+)(|\.\d+)%/))e="percentage",i+=Pe("number:number",null,{"number:decimal-places":a[2]&&a.length-1||0,"number:min-decimal-places":a[2]&&a.length-1||0,"number:min-integer-digits":a[1].length})+"%";else{var c=!1;if(["y","m","d"].indexOf(n[0])>-1){e="date";t:for(;s";break;case"yyy":case"yyyy":i+='';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":case"mm":case"mmm":case"mmmm":i+='';break;case"d":case"dd":i+='';break;case"ddd":case"dddd":i+=''}break;case'"':for(;'"'!=n[++s]||'"'==n[++s];)o+=n[s];--s,i+=""+en(o.slice(1).replace(/""/g,'"'))+"";break;case"/":i+=""+en(o)+"";break;default:console.error("unrecognized character "+o+" in ODF format "+n)}if(!c)break e;n=n.slice(s+1),s=0}if(n.match(/^\[?[hms]/))for("number"==e&&(e="time"),n.match(/\[/)&&(n=n.replace(/[\[\]]/g,""),r["number:truncate-on-overflow"]="false");s';break;case"m":case"mm":i+='';break;case"s":case"ss":if("."==n[s+1])do{o+=n[s+1],++s}while("0"==n[s+1]);i+='"}break;case'"':for(;'"'!=n[++s]||'"'==n[++s];)o+=n[s];--s,i+=""+en(o.slice(1).replace(/""/g,'"'))+"";break;case"/":i+=""+en(o)+"";break;case"a":if("a/p"==n.slice(s,s+3).toLowerCase()){i+="",s+=2;break}if("am/pm"==n.slice(s,s+5).toLowerCase()){i+="",s+=4;break}default:console.error("unrecognized character "+o+" in ODF format "+n)}else{if(n.indexOf(/\$/)>-1&&(e="currency"),"$"==n[0]&&(i+='$',n=n.slice(1),s=0),'"'==n[s=0]){for(;'"'!=n[++s]||'"'==n[++s];)o+=n[s];"*"==n[1+--s]?(s++,i+=""+en(o.replace(/""/g,'"'))+""):i+=""+en(o.replace(/""/g,'"'))+"",n=n.slice(s+1),s=0}var d=n.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(d&&d[0]){var u=d[1].replace(/,/g,"");i+="-1?' number:grouping="true"':"")+(d[2]&&' number:decimal-places="'+(d[2].length-1)+'"'||' number:decimal-places="0"')+(d[3]&&d[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(d[3]?' number:min-exponent-digits="'+d[3].match(/0+/)[0].length+'"':"")+">",s=d.index+d[0].length}else console.error("Could not find numeric part of "+n);if('"'==n[s]){for(o="";'"'!=n[++s]||'"'==n[++s];)o+=n[s];--s,i+=""+en(o.replace(/""/g,'"'))+""}}}}else e="text",i="";return i?Pe("number:"+e+"-style",i,r):(console.error("Could not generate ODS number format for |"+n+"|"),"")}function JG(n,t,e){var i=n.filter(function(r){return r.Sheet==(-1==e?null:e)});return i.length?" \n"+i.map(function(r){var o=TG(r.Ref);return" "+Pe("table:named-range",null,{"table:name":r.Name,"table:cell-range-address":o,"table:base-cell-address":o.replace(/[\.]?[^\.]*$/,".$A$1")})}).join("\n")+"\n \n":""}var eW=function(){var n=function(o){return en(o).replace(/ +/g,function(s){return''}).replace(/\t/g,"").replace(/\n/g,"
").replace(/^ /,"").replace(/ $/,"")},t=" \n",i=function(o,s,a,c,l){var d=[];d.push(' \n');var u=0,h=0,f=wr(o["!ref"]||"A1"),m=o["!merges"]||[],g=0,p=null!=o["!data"];if(o["!cols"])for(h=0;h<=f.e.c;++h)d.push(" \n");var k=o["!rows"]||[];for(u=0;u\n");for(;u<=f.e.r;++u){for(d.push(" \n"),h=0;hh||m[g].s.r>u||m[g].e.c\n");else{var P=ln({r:u,c:h}),S=p?(o["!data"][u]||[])[h]:o[P];if(S&&S.f&&(D["table:formula"]=en(AFe(S.f)),S.F&&S.F.slice(0,P.length)==P)){var U=wr(S.F);D["table:number-matrix-columns-spanned"]=U.e.c-U.s.c+1,D["table:number-matrix-rows-spanned"]=U.e.r-U.s.r+1}if(S){switch(S.t){case"b":j=S.v?"TRUE":"FALSE",D["office:value-type"]="boolean",D["office:boolean-value"]=S.v?"true":"false";break;case"n":j=S.w||String(S.v||0),D["office:value-type"]="float",D["office:value"]=S.v||0;break;case"s":case"str":j=null==S.v?"":S.v,D["office:value-type"]="string";break;case"d":j=S.w||xi(S.v).toISOString(),D["office:value-type"]="date",D["office:date-value"]=xi(S.v).toISOString(),D["table:style-name"]="ce1";break;default:d.push(t);continue}var V=n(j);if(S.l&&S.l.Target){var q=S.l.Target;"#"!=(q="#"==q.charAt(0)?"#"+TG(q.slice(1)):q).charAt(0)&&!q.match(/^\w+:/)&&(q="../"+q),V=Pe("text:a",V,{"xlink:href":q.replace(/&/g,"&")})}l[S.z]&&(D["table:style-name"]="ce"+l[S.z].slice(1)),d.push(" "+Pe("table:table-cell",Pe("text:p",V,{}),D)+"\n")}else d.push(t)}}d.push(" \n")}return(s.Workbook||{}).Names&&d.push(JG(s.Workbook.Names,0,a)),d.push(" \n"),d.join("")};return function(s,a){var c=[qi],l=o0({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=o0({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==a.bookType?(c.push("\n"),c.push(f$().replace(//,"").replace(/<\/office:document-meta>/,"")+"\n")):c.push("\n");var u=function(o,s){o.push(" \n");var a=0;s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u&&u["!cols"])for(var h=0;h\n'),o.push(' \n'),o.push(" \n"),++a}});var c=0;s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u&&u["!rows"])for(var h=0;h\n'),o.push(' \n'),o.push(" \n"),++c}}),o.push(' \n'),o.push(' \n'),o.push(" \n"),o.push(' \n'),o.push(' \n'),o.push(" /\n"),o.push(' \n'),o.push(" /\n"),o.push(" \n"),o.push(" \n");var l={},d=69;return s.SheetNames.map(function(u){return s.Sheets[u]}).forEach(function(u){if(u)for(var h=null!=u["!data"],f=wr(u["!ref"]),m=0;m<=f.e.r;++m)for(var g=0;g<=f.e.c;++g){var p=h?(u["!data"][m]||[])[g]:u[ln({r:m,c:g})];if(p&&p.z&&"general"!=p.z.toLowerCase()&&!l[p.z]){var b=rNe(p.z,"N"+d);b&&(l[p.z]="N"+d,++d,o.push(b+"\n"))}}}),o.push(' \n'),yi(l).forEach(function(u){o.push('\n')}),o.push(" \n"),l}(c,s);c.push(" \n"),c.push(" \n"),((s.Workbook||{}).WBProps||{}).date1904&&c.push(' \n \n \n');for(var h=0;h!=s.SheetNames.length;++h)c.push(i(s.Sheets[s.SheetNames[h]],s,h,0,u));return(s.Workbook||{}).Names&&c.push(JG(s.Workbook.Names,0,-1)),c.push(" \n"),c.push(" \n"),c.push("fods"==a.bookType?"":""),c.join("")}}();function tW(n,t){if("fods"==t.bookType)return eW(n,t);var e=VI(),i="",r=[],o=[];return Jt(e,i="mimetype","application/vnd.oasis.opendocument.spreadsheet"),Jt(e,i="content.xml",eW(n,t)),r.push([i,"text/xml"]),o.push([i,"ContentFile"]),Jt(e,i="styles.xml",iNe(n,t)),r.push([i,"text/xml"]),o.push([i,"StylesFile"]),Jt(e,i="meta.xml",qi+f$()),r.push([i,"text/xml"]),o.push([i,"MetadataFile"]),Jt(e,i="manifest.rdf",function yDe(n){var t=[qi];t.push('\n');for(var e=0;e!=n.length;++e)t.push(h$(n[e][0],n[e][1])),t.push(vDe("",n[e][0]));return t.push(h$("","Document","pkg")),t.push(""),t.join("")}(o)),r.push([i,"application/rdf+xml"]),Jt(e,i="META-INF/manifest.xml",function bDe(n){var t=[qi];t.push('\n'),t.push(' \n');for(var e=0;e\n');return t.push(""),t.join("")}(r)),e}var lr=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":("function"==typeof Buffer.from?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function ll(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Or(n){return typeof TextDecoder<"u"?(new TextDecoder).decode(n):Kn(nc(n))}function Ea(n){return typeof TextEncoder<"u"?(new TextEncoder).encode(n):Lo(rc(n))}function Td(n){for(var t=0,e=0;e=128&&(i|=(127&n[e])<<7,n[e++]<128||(i|=(127&n[e])<<14,n[e++]<128)||(i|=(127&n[e])<<21,n[e++]<128)||(i+=(127&n[e])*Math.pow(2,28),++e,n[e++]<128)||(i+=(127&n[e])*Math.pow(2,35),++e,n[e++]<128)||(i+=(127&n[e])*Math.pow(2,42),++e,n[e++]<128)))break e;return t.l=e,i}function bt(n){var t=new Uint8Array(7);t[0]=127&n;var e=1;e:if(n>127){if(t[e-1]|=128,t[e]=n>>7&127,++e,n<=16383||(t[e-1]|=128,t[e]=n>>14&127,++e,n<=2097151)||(t[e-1]|=128,t[e]=n>>21&127,++e,n<=268435455)||(t[e-1]|=128,t[e]=n/256>>>21&127,++e,n<=34359738367)||(t[e-1]|=128,t[e]=n/65536>>>21&127,++e,n<=4398046511103))break e;t[e-1]|=128,t[e]=n/16777216>>>21&127,++e}return t[lr](0,e)}function nW(n){for(var t={l:0},e=[];t.l=128){if(e|=(127&n[t])<<7,n[t++]<128||(e|=(127&n[t])<<14,n[t++]<128)||(e|=(127&n[t])<<21,n[t++]<128))break e;e|=(127&n[t])<<28}return e}function Xe(n){for(var t=[],e={l:0};e.l=128;);s=n[lr](e.l,a),e.l=a;break;case 1:s=n[lr](a,a+8),e.l=a+8;break;case 2:var c=I0(n,e);s=n[lr](e.l,e.l+c),e.l+=c;break;case 5:s=n[lr](a,a+4),e.l=a+4;break;default:throw new Error("PB Type ".concat(o," for Field ").concat(r," at offset ").concat(i))}var l={data:s,type:o};null==t[r]&&(t[r]=[]),t[r].push(l)}return t}function Ct(n){var t=[];return n.forEach(function(e,i){0!=i&&e.forEach(function(r){r.data&&(t.push(bt(8*i+r.type)),2==r.type&&t.push(bt(r.data.length)),t.push(r.data))})}),Td(t)}function ah(n,t){return n?.map(function(e){return t(e.data)})||[]}function M0(n){for(var t,e=[],i={l:0};i.l>>0>0),e.push(s)}return e}function R0(n){var t=[];return n.forEach(function(e){var i=[[],[{data:bt(e.id),type:0}],[]];null!=e.merge&&(i[3]=[{data:bt(+!!e.merge),type:0}]);var r=[];e.messages.forEach(function(s){r.push(s.data),s.meta[3]=[{type:0,data:bt(s.data.length)}],i[2].push({data:Ct(s.meta),type:2})});var o=Ct(i);t.push(bt(o.length)),t.push(o),r.forEach(function(s){return t.push(s)})}),Td(t)}function aNe(n,t){if(0!=n)throw new Error("Unexpected Snappy chunk type ".concat(n));for(var e={l:0},i=I0(t,e),r=[],o=e.l;o>2&7),l=(224&t[o++])<<3,l|=t[o++]):(d=1+(t[o++]>>2),2==s?(l=t[o]|t[o+1]<<8,o+=2):(l=(t[o]|t[o+1]<<8|t[o+2]<<16|t[o+3]<<24)>>>0,o+=4)),0==l)throw new Error("Invalid offset 0");for(var u=r.length-1,h=l;u>=0&&h>=r[u].length;)h-=r[u].length,--u;if(u<0){if(0!=h)throw new Error("Invalid offset beyond length");h=r[u=0].length}if(d0&&(r.push(r[u][lr](r[u].length-h)),d-=h),++u;d>=r[u].length;)r.push(r[u]),d-=r[u].length,++u;d&&r.push(r[u][lr](0,d))}r.length>25&&(r=[Td(r)])}else{var a=t[o++]>>2;if(a<60)++a;else{var c=a-59;a=t[o],c>1&&(a|=t[o+1]<<8),c>2&&(a|=t[o+2]<<16),c>3&&(a|=t[o+3]<<24),a>>>=0,a++,o+=c}r.push(t[lr](o,o+a)),o+=a}}for(var f=0,m=0;m>8&255]))):i<=16777216?(s+=4,t.push(new Uint8Array([248,i-1&255,i-1>>8&255,i-1>>16&255]))):i<=4294967296&&(s+=5,t.push(new Uint8Array([252,i-1&255,i-1>>8&255,i-1>>16&255,i-1>>>24&255]))),t.push(n[lr](e,e+i)),s+=i,r[0]=0,r[1]=255&s,r[2]=s>>8&255,r[3]=s>>16&255,e+=i}return Td(t)}function mw(n,t){var e=new Uint8Array(32),i=ll(e),r=12,o=0;switch(e[0]=5,n.t){case"n":e[1]=2,function sNe(n,t,e){var i=Math.floor(0==e?0:Math.LOG10E*Math.log(Math.abs(e)))+6176-16,r=e/Math.pow(10,i-6176);n[t+15]|=i>>7,n[t+14]|=(127&i)<<1;for(var o=0;r>=1;++o,r/=256)n[t+o]=255&r;n[t+15]|=e>=0?0:128}(e,r,n.v),o|=1,r+=16;break;case"b":e[1]=6,i.setFloat64(r,n.v?1:0,!0),o|=2,r+=8;break;case"s":var s=null==n.v?"":String(n.v),a=t.indexOf(s);-1==a&&(t[a=t.length]=s),e[1]=3,i.setUint32(r,a,!0),o|=8,r+=4;break;default:throw"unsupported cell type "+n.t}return i.setUint32(8,o,!0),e[lr](0,r)}function pw(n,t){var e=new Uint8Array(32),i=ll(e),r=12,o=0;switch(e[0]=4,n.t){case"n":e[2]=2,i.setFloat64(r,n.v,!0),o|=32,r+=8;break;case"b":e[2]=6,i.setFloat64(r,n.v?1:0,!0),o|=32,r+=8;break;case"s":var s=null==n.v?"":String(n.v),a=t.indexOf(s);-1==a&&(t[a=t.length]=s),e[2]=3,i.setUint32(r,a,!0),o|=16,r+=4;break;default:throw"unsupported cell type "+n.t}return i.setUint32(8,o,!0),e[lr](0,r)}function Yn(n){return wn(Xe(n)[1][0].data)}function dl(n){return Ct([[],[{type:0,data:bt(n)}]])}function Sd(n,t){var e,i=null!=(e=n.messages[0].meta[5])&&e[0]?nW(n.messages[0].meta[5][0].data):[];-1==i.indexOf(t)&&(i.push(t),n.messages[0].meta[5]=[{type:2,data:iW(i)}])}function ul(n,t){var e,i=null!=(e=n.messages[0].meta[5])&&e[0]?nW(n.messages[0].meta[5][0].data):[];n.messages[0].meta[5]=[{type:2,data:iW(i.filter(function(r){return r!=t}))}]}function bNe(n,t,e){var i,r,o=[[],[{type:0,data:bt(0)}],[{type:0,data:bt(0)}],[{type:2,data:new Uint8Array([])}],[{type:2,data:new Uint8Array(Array.from({length:510},function(){return 255}))}],[{type:0,data:bt(5)}],[{type:2,data:new Uint8Array([])}],[{type:2,data:new Uint8Array(Array.from({length:510},function(){return 255}))}],[{type:0,data:bt(1)}]];if(null==(i=o[6])||!i[0]||null==(r=o[7])||!r[0])throw"Mutation only works on post-BNC storages!";var s=0;if(o[7][0].data.length<2*n.length){var a=new Uint8Array(2*n.length);a.set(o[7][0].data),o[7][0].data=a}if(o[4][0].data.length<2*n.length){var c=new Uint8Array(2*n.length);c.set(o[4][0].data),o[4][0].data=c}for(var l=ll(o[7][0].data),d=0,u=[],h=ll(o[4][0].data),f=0,m=[],g=e?4:1,p=0;p-1,r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};BM(t=t||{});var o=VI(),s="",a=0;if(t.cellXfs=[],Ed(t.cellXfs,{},{revssf:{General:0}}),n.Props||(n.Props={}),Jt(o,s="docProps/core.xml",p$(n.Props,t)),r.coreprops.push(s),Xn(t.rels,2,s,tn.CORE_PROPS),s="docProps/app.xml",!n.Props||!n.Props.SheetNames)if(n.Workbook&&n.Workbook.Sheets){for(var c=[],l=0;l0&&(Jt(o,s="docProps/custom.xml",v$(n.Custprops)),r.custprops.push(s),Xn(t.rels,4,s,tn.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,a=1;a<=n.SheetNames.length;++a){var u={"!id":{}},h=n.Sheets[n.SheetNames[a-1]];if(Jt(o,s="xl/worksheets/sheet"+a+"."+e,aPe(a-1,t,n,u)),r.sheets.push(s),Xn(t.wbrels,-1,"worksheets/sheet"+a+"."+e,tn.WS[0]),h){var m=h["!comments"],g=!1,p="";if(m&&m.length>0){var b=!1;m.forEach(function(k){k[1].forEach(function(w){1==w.T&&(b=!0)})}),b&&(Jt(o,p="xl/threadedComments/threadedComment"+a+".xml",DMe(m,d,t)),r.threadedcomments.push(p),Xn(u,-1,"../threadedComments/threadedComment"+a+".xml",tn.TCMNT)),Jt(o,p="xl/comments"+a+"."+e,TMe(m)),r.comments.push(p),Xn(u,-1,"../comments"+a+"."+e,tn.CMNT),g=!0}h["!legacy"]&&g&&Jt(o,"xl/drawings/vmlDrawing"+a+".vml",dG(a,h["!comments"])),delete h["!comments"],delete h["!legacy"]}u["!id"].rId1&&Jt(o,h0(s),jm(u))}return null!=t.Strings&&t.Strings.length>0&&(Jt(o,s="xl/sharedStrings."+e,function OAe(n,t){if(!t.bookSST)return"";var e=[qi];e[e.length]=Pe("sst",null,{xmlns:Wu[0],count:n.Count,uniqueCount:n.Unique});for(var i=0;i!=n.length;++i)if(null!=n[i]){var r=n[i],o="";r.r?o+=r.r:(o+=""),e[e.length]=o+=""}return e.length>2&&(e[e.length]="",e[1]=e[1].replace("/>",">")),e.join("")}(t.Strings,t)),r.strs.push(s),Xn(t.wbrels,-1,"sharedStrings."+e,tn.SST)),Jt(o,s="xl/workbook."+e,function NOe(n){var t=[qi];t[t.length]=Pe("workbook",null,{xmlns:Wu[0],"xmlns:r":yr.r});var e=n.Workbook&&(n.Workbook.Names||[]).length>0,i={codeName:"ThisWorkbook"};n.Workbook&&n.Workbook.WBProps&&(IM.forEach(function(a){null!=n.Workbook.WBProps[a[0]]&&n.Workbook.WBProps[a[0]]!=a[1]&&(i[a[0]]=n.Workbook.WBProps[a[0]])}),n.Workbook.WBProps.CodeName&&(i.codeName=n.Workbook.WBProps.CodeName,delete i.CodeName)),t[t.length]=Pe("workbookPr",null,i);var r=n.Workbook&&n.Workbook.Sheets||[],o=0;if(r&&r[0]&&r[0].Hidden){for(t[t.length]="",o=0;o!=n.SheetNames.length&&r[o]&&r[o].Hidden;++o);o==n.SheetNames.length&&(o=0),t[t.length]='',t[t.length]=""}for(t[t.length]="",o=0;o!=n.SheetNames.length;++o){var s={name:en(n.SheetNames[o].slice(0,31))};if(s.sheetId=""+(o+1),s["r:id"]="rId"+(o+1),r[o])switch(r[o].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden"}t[t.length]=Pe("sheet",null,s)}return t[t.length]="",e&&(t[t.length]="",n.Workbook&&n.Workbook.Names&&n.Workbook.Names.forEach(function(a){var c={name:a.Name};a.Comment&&(c.comment=a.Comment),null!=a.Sheet&&(c.localSheetId=""+a.Sheet),a.Hidden&&(c.hidden="1"),a.Ref&&(t[t.length]=Pe("definedName",en(a.Ref),c))}),t[t.length]=""),t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(n)),r.workbooks.push(s),Xn(t.rels,1,s,tn.WB),Jt(o,s="xl/theme/theme1.xml",CM(n.Themes,t)),r.themes.push(s),Xn(t.wbrels,-1,"theme/theme1.xml",tn.THEME),Jt(o,s="xl/styles."+e,function wIe(n,t){var i,e=[qi,Pe("styleSheet",null,{xmlns:Wu[0],"xmlns:vt":yr.vt})];return n.SSF&&null!=(i=function bIe(n){var t=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(e){for(var i=e[0];i<=e[1];++i)null!=n[i]&&(t[t.length]=Pe("numFmt",null,{numFmtId:i,formatCode:en(n[i])}))}),1===t.length?"":(t[t.length]="",t[0]=Pe("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(n.SSF))&&(e[e.length]=i),e[e.length]='',e[e.length]='',e[e.length]='',e[e.length]='',(i=function yIe(n){var t=[];return t[t.length]=Pe("cellXfs",null),n.forEach(function(e){t[t.length]=Pe("xf",null,e)}),t[t.length]="",2===t.length?"":(t[0]=Pe("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(t.cellXfs))&&(e[e.length]=i),e[e.length]='',e[e.length]='',e[e.length]='',e.length>2&&(e[e.length]="",e[1]=e[1].replace("/>",">")),e.join("")}(n,t)),r.styles.push(s),Xn(t.wbrels,-1,"styles."+e,tn.STY),n.vbaraw&&i&&(Jt(o,s="xl/vbaProject.bin",n.vbaraw),r.vba.push(s),Xn(t.wbrels,-1,"vbaProject.bin",tn.VBA)),Jt(o,s="xl/metadata."+e,function bMe(){var n=[qi];return n.push('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),n.join("")}()),r.metadata.push(s),Xn(t.wbrels,-1,"metadata."+e,tn.XLMETA),d.length>1&&(Jt(o,s="xl/persons/person.xml",function IMe(n){var t=[qi,Pe("personList",null,{xmlns:yr.TCMNT,"xmlns:x":Wu[0]}).replace(/[\/]>/,">")];return n.forEach(function(e,i){t.push(Pe("person",null,{displayName:e,id:"{54EE7950-7262-4200-6969-"+("000000000000"+i).slice(-12)+"}",userId:e,providerId:"None"}))}),t.push(""),t.join("")}(d)),r.people.push(s),Xn(t.wbrels,-1,"persons/person.xml",tn.PEOPLE)),Jt(o,"[Content_Types].xml",u$(r,t)),Jt(o,"_rels/.rels",jm(t.rels)),Jt(o,"xl/_rels/workbook.xml.rels",jm(t.wbrels)),delete t.revssf,delete t.ssf,o}function hW(n,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return t0(t.file,wt.write(n,{type:rn?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return wt.write(n,t)}function PNe(n,t){switch(t.bookType){case"ods":return tW(n,t);case"numbers":return function yNe(n,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var e=wt.read(t.numbers,{type:"base64"}),i=function vNe(n){var t={},e=[];return n.FileIndex.map(function(i,r){return[i,n.FullPaths[r]]}).forEach(function(i){var r=i[0],o=i[1];2==r.type&&r.name.match(/\.iwa/)&&0==r.content[0]&&M0(F0(r.content)).forEach(function(s){e.push(s.id),t[s.id]={deps:[],location:o,type:wn(s.messages[0].meta[1][0].data)}})}),n.FileIndex.forEach(function(i){i.name.match(/\.iwa/)&&0==i.content[0]&&M0(F0(i.content)).forEach(function(r){r.messages.forEach(function(o){[5,6].forEach(function(s){o.meta[s]&&o.meta[s].forEach(function(a){t[r.id].deps.push(wn(a.data))})})})})}),t}(e),r=cc(e,i,1);if(null==r)throw"Could not find message ".concat(1," in Numbers template");var o=ah(Xe(r.messages[0].data)[1],Yn);if(o.length>1)throw new Error("Template NUMBERS file must have exactly one sheet");return n.SheetNames.forEach(function(s,a){a>=1&&(function xNe(n,t,e){var i=-1,r=-1,o={};kr(n,t,1,function(l,d){var u=Xe(l.messages[0].data);i=Yn(Xe(l.messages[0].data)[1][0].data),r=Dd({deps:[1],location:t[i].location,type:2},t),o[i]=r,Sd(l,r),u[1].push({type:2,data:dl(r)});var h=cc(n,t,i);h.id=r,t[1].location==t[r].location?d.push(h):kr(n,t,r,function(f,m){return m.push(h)}),l.messages[0].data=Ct(u)});var s=-1;kr(n,t,r,function(l,d){for(var u=Xe(l.messages[0].data),h=3;h<=69;++h)delete u[h];var f=ah(u[2],Yn);f.forEach(function(p){return ul(l,p)}),s=Dd({deps:[r],location:t[f[0]].location,type:t[f[0]].type},t),Sd(l,s),o[f[0]]=s,u[2]=[{type:2,data:dl(s)}];var m=cc(n,t,f[0]);if(m.id=s,t[f[0]].location==t[r].location)d.push(m);else{var g=t[r].location;g=(g=g.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,2,function(p){var b=Xe(p.messages[0].data),k=b[3].findIndex(function(D){var j,P,S=Xe(D.data);return null!=(j=S[3])&&j[0]?Or(S[3][0].data)==g:!(null==(P=S[2])||!P[0]||Or(S[2][0].data)!=g)}),w=Xe(b[3][k].data);w[6]||(w[6]=[]),w[6].push({type:2,data:Ct([[],[{type:0,data:bt(s)}]])}),b[3][k].data=Ct(w),p.messages[0].data=Ct(b)}),kr(n,t,s,function(p,b){return b.push(m)})}l.messages[0].data=Ct(u)});var a=-1;kr(n,t,s,function(l,d){for(var u=Xe(l.messages[0].data),h=Xe(u[1][0].data),f=3;f<=69;++f)delete h[f];var m=Yn(h[2][0].data);h[2][0].data=dl(o[m]),u[1][0].data=Ct(h);var g=Yn(u[2][0].data);ul(l,g),Sd(l,a=Dd({deps:[s],location:t[g].location,type:t[g].type},t)),o[g]=a,u[2][0].data=dl(a);var p=cc(n,t,g);p.id=a,t[s].location==t[a].location?d.push(p):kr(n,t,a,function(b,k){return k.push(p)}),l.messages[0].data=Ct(u)});var c=t[a].location;c=(c=c.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,a,function(l,d){var u,h,f=Xe(l.messages[0].data),g=Or(f[1][0].data).replace(/-[A-Z0-9]*/,"-".concat(e.toString(16).padStart(4,"0")));if(f[1][0].data=Ea(g),[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(P){return delete f[P]}),f[45]){var b=Yn(Xe(f[45][0].data)[1][0].data);ul(l,b),delete f[45]}f[70]&&(null==(u=Xe(f[70][0].data)[2])||u.forEach(function(P){var S=Xe(P.data);[2,3].map(function(U){return S[U][0]}).forEach(function(U){var V=Xe(U.data);if(V[8]){var q=Yn(V[8][0].data);ul(l,q)}})}),delete f[70]),[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(P){if(f[P]){var S=Yn(f[P][0].data);delete f[P],ul(l,S)}});var w=Xe(f[4][0].data);[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(P){var S;if(null!=(S=w[P])&&S[0]){var U=Yn(w[P][0].data),V=Dd({deps:[a],location:t[U].location,type:t[U].type},t);ul(l,U),Sd(l,V),o[U]=V;var q=cc(n,t,U);if(q.id=V,t[U].location==t[a].location)d.push(q);else{t[V].location=t[U].location.replace(U.toString(),V.toString()),t[V].location==t[U].location&&(t[V].location=t[V].location.replace(/\.iwa/,"-".concat(V,".iwa"))),wt.utils.cfb_add(n,t[V].location,P0(R0([q])));var J=t[V].location;J=(J=J.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,2,function(G){var ve=Xe(G.messages[0].data);ve[3].push({type:2,data:Ct([[],[{type:0,data:bt(V)}],[{type:2,data:Ea(J.replace(/-.*$/,""))}],[{type:2,data:Ea(J)}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:bt(0)}],[],[{type:0,data:bt(0)}]])}),ve[1]=[{type:0,data:bt(Math.max(V+1,wn(ve[1][0].data)))}];var Se=ve[3].findIndex(function(re){var Y,ge,le=Xe(re.data);return null!=(Y=le[3])&&Y[0]?Or(le[3][0].data)==c:!(null==(ge=le[2])||!ge[0]||Or(le[2][0].data)!=c)}),me=Xe(ve[3][Se].data);me[6]||(me[6]=[]),me[6].push({type:2,data:Ct([[],[{type:0,data:bt(V)}]])}),ve[3][Se].data=Ct(me),G.messages[0].data=Ct(ve)})}w[P][0].data=dl(V)}});var D=Xe(w[1][0].data);null==(h=D[2])||h.forEach(function(P){var S=Yn(P.data),U=Dd({deps:[a],location:t[S].location,type:t[S].type},t);ul(l,S),Sd(l,U),o[S]=U;var V=cc(n,t,S);if(V.id=U,t[S].location==t[a].location)d.push(V);else{t[U].location=t[S].location.replace(S.toString(),U.toString()),t[U].location==t[S].location&&(t[U].location=t[U].location.replace(/\.iwa/,"-".concat(U,".iwa"))),wt.utils.cfb_add(n,t[U].location,P0(R0([V])));var q=t[U].location;q=(q=q.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,""),kr(n,t,2,function(J){var G=Xe(J.messages[0].data);G[3].push({type:2,data:Ct([[],[{type:0,data:bt(U)}],[{type:2,data:Ea(q.replace(/-.*$/,""))}],[{type:2,data:Ea(q)}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:bt(0)}],[],[{type:0,data:bt(0)}]])}),G[1]=[{type:0,data:bt(Math.max(U+1,wn(G[1][0].data)))}];var ve=G[3].findIndex(function(me){var re,Y,ge=Xe(me.data);return null!=(re=ge[3])&&re[0]?Or(ge[3][0].data)==c:!(null==(Y=ge[2])||!Y[0]||Or(ge[2][0].data)!=c)}),Se=Xe(G[3][ve].data);Se[6]||(Se[6]=[]),Se[6].push({type:2,data:Ct([[],[{type:0,data:bt(U)}]])}),G[3][ve].data=Ct(Se),J.messages[0].data=Ct(G)})}P.data=dl(U)}),w[1][0].data=Ct(D);var j=Xe(w[3][0].data);j[1].forEach(function(P){var S=Xe(P.data),U=Yn(S[2][0].data),V=o[U];if(!o[U]){V=Dd({deps:[a],location:"",type:t[U].type},t),t[V].location="Root Entry/Index/Tables/Tile-".concat(V,".iwa"),o[U]=V;var q=cc(n,t,U);q.id=V,ul(l,U),Sd(l,V),wt.utils.cfb_add(n,"/Index/Tables/Tile-".concat(V,".iwa"),P0(R0([q]))),kr(n,t,2,function(J){var G=Xe(J.messages[0].data);G[3].push({type:2,data:Ct([[],[{type:0,data:bt(V)}],[{type:2,data:Ea("Tables/Tile")}],[{type:2,data:Ea("Tables/Tile-".concat(V))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:bt(0)}],[],[{type:0,data:bt(0)}]])}),G[1]=[{type:0,data:bt(Math.max(V+1,wn(G[1][0].data)))}];var ve=G[3].findIndex(function(me){var re,Y,ge=Xe(me.data);return null!=(re=ge[3])&&re[0]?Or(ge[3][0].data)==c:!(null==(Y=ge[2])||!Y[0]||Or(ge[2][0].data)!=c)}),Se=Xe(G[3][ve].data);Se[6]||(Se[6]=[]),Se[6].push({type:2,data:Ct([[],[{type:0,data:bt(V)}]])}),G[3][ve].data=Ct(Se),J.messages[0].data=Ct(G)})}S[2][0].data=dl(V),P.data=Ct(S)}),w[3][0].data=Ct(j),f[4][0].data=Ct(w),l.messages[0].data=Ct(f)})}(e,i,a+1),r=cc(e,i,1),o=ah(Xe(r.messages[0].data)[1],Yn)),function wNe(n,t,e,i,r,o){var s=[];kr(n,t,o,function(l){var d=Xe(l.messages[0].data);d[1]=[{type:2,data:Ea(i)}],s=ah(d[2],Yn),l.messages[0].data=Ct(d)});var c=Yn(Xe(cc(n,t,s[0]).messages[0].data)[2][0].data);kr(n,t,c,function(l,d){return function CNe(n,t,e,i,r,o){var s=wr(e["!ref"]);s.s.r=s.s.c=0;var a=!1;s.e.c>999&&(a=!0,s.e.c=999),s.e.r>999999&&(a=!0,s.e.r=999999),a&&console.error("Truncating to ".concat(Wt(s)));var c=bw(e,{range:s,header:1}),l=["~Sh33tJ5~"],d=t[o].location;d=(d=d.replace(/^Root Entry\//,"")).replace(/^Index\//,"").replace(/\.iwa$/,"");var u=Xe(i.messages[0].data);u[6][0].data=bt(s.e.r+1),u[7][0].data=bt(s.e.c+1),delete u[46];var h=Xe(u[4][0].data);kr(n,t,Yn(Xe(h[1][0].data)[2][0].data),function(Se,me){var re,Y=Xe(Se.messages[0].data);if(null!=(re=Y?.[2])&&re[0])for(var ge=0;ge0&&(Jt(o,s="docProps/custom.xml",v$(n.Custprops)),r.custprops.push(s),Xn(t.rels,4,s,tn.CUST_PROPS)),a=1;a<=n.SheetNames.length;++a){var d={"!id":{}},u=n.Sheets[n.SheetNames[a-1]];if(Jt(o,s="xl/worksheets/sheet"+a+"."+e,wOe(a-1,t,n,d)),r.sheets.push(s),Xn(t.wbrels,-1,"worksheets/sheet"+a+"."+e,tn.WS[0]),u){var f=u["!comments"],m=!1,g="";f&&f.length>0&&(Jt(o,g="xl/comments"+a+"."+e,NMe(f)),r.comments.push(g),Xn(d,-1,"../comments"+a+"."+e,tn.CMNT),m=!0),u["!legacy"]&&m&&Jt(o,"xl/drawings/vmlDrawing"+a+".vml",dG(a,u["!comments"])),delete u["!comments"],delete u["!legacy"]}d["!id"].rId1&&Jt(o,h0(s),jm(d))}return null!=t.Strings&&t.Strings.length>0&&(Jt(o,s="xl/sharedStrings."+e,function UAe(n){var t=Jo();be(t,159,function BAe(n,t){return t||(t=se(8)),t.write_shift(4,n.Count),t.write_shift(4,n.Unique),t}(n));for(var e=0;e22)throw new Error("Bad Code Name: Worksheet"+s)}})}(n.SheetNames,n.Workbook&&n.Workbook.Sheets||[],!!n.vbaraw);for(var e=0;e255&&(e=95),o=e>>2,(i=n.charCodeAt(l++))>255&&(i=95),s=(3&e)<<4|i>>4,(r=n.charCodeAt(l++))>255&&(r=95),a=(15&i)<<2|r>>6,c=63&r,isNaN(i)?a=c=64:isNaN(r)&&(c=64),t+=$s.charAt(o)+$s.charAt(s)+$s.charAt(a)+$s.charAt(c);return t}(n);case"binary":case"string":return n;case"file":return t0(t.file,n,"binary");case"buffer":return rn?tc(n,"binary"):n.split("").map(function(e){return e.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}(bW(n.Sheets[n.SheetNames[r]],e),e);case"csv":return lc(jM(n.Sheets[n.SheetNames[r]],e),e,"\ufeff");case"dif":return lc(J$.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"dbf":return _w(_M.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"prn":return lc($m.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"rtf":return lc(function sIe(n,t){var e=["{\\rtf1\\ansi"];if(!n["!ref"])return e[0]+"}";for(var r,i=xn(n["!ref"]),o=null!=n["!data"],s=[],a=i.s.r;a<=i.e.r;++a){e.push("\\trowd\\trautofit1");for(var c=i.s.c;c<=i.e.c;++c)e.push("\\cellx"+(c+1));for(e.push("\\pard\\intbl"),o&&(s=n["!data"][a]||[]),c=i.s.c;c<=i.e.c;++c){var l=ln({r:a,c});(r=o?s[c]:n[l])&&(null!=r.v||r.f&&!r.F)?(e.push(" "+(r.w||(oc(r),r.w)||"").replace(/[\r\n]/g,"\\par ")),e.push("\\cell")):e.push(" \\cell")}e.push("\\pard\\intbl\\row")}return e.join("")+"}"}(n.Sheets[n.SheetNames[r]]),e);case"eth":return lc(eG.from_sheet(n.Sheets[n.SheetNames[r]],e),e);case"fods":return lc(tW(n,e),e);case"wk1":return _w(rh.sheet_to_wk1(n.Sheets[n.SheetNames[r]],e),e);case"wk3":return _w(rh.book_to_wk3(n,e),e);case"biff2":e.biff||(e.biff=2);case"biff3":e.biff||(e.biff=3);case"biff4":return e.biff||(e.biff=4),_w(VG(n,e),e);case"biff5":e.biff||(e.biff=5);case"biff8":case"xla":case"xls":return e.biff||(e.biff=8),function LNe(n,t){var e=t||{};return hW(function N4e(n,t){var e=t||{},i=wt.utils.cfb_new({root:"R"}),r="/Workbook";switch(e.bookType||"xls"){case"xls":e.bookType="biff8";case"xla":e.bookType||(e.bookType="xla");case"biff8":r="/Workbook",e.biff=8;break;case"biff5":r="/Book",e.biff=5;break;default:throw new Error("invalid type "+e.bookType+" for XLS CFB")}return wt.utils.cfb_add(i,r,VG(n,e)),8==e.biff&&(n.Props||n.Custprops)&&function O4e(n,t){var s,e=[],i=[],r=[],o=0,a=xj(oM,"n"),c=xj(sM,"n");if(n.Props)for(s=yi(n.Props),o=0;o-1||g$.indexOf(r[o][0])>-1||null!=r[o][1]&&l.push(r[o]);i.length&&wt.utils.cfb_add(t,"/\x05SummaryInformation",I$(i,S0.SI,c,sM)),(e.length||l.length)&&wt.utils.cfb_add(t,"/\x05DocumentSummaryInformation",I$(e,S0.DSI,a,oM,l.length?l:null,S0.UDI))}(n,i),8==e.biff&&n.vbaraw&&function VMe(n,t){t.FullPaths.forEach(function(e,i){if(0!=i){var r=e.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==r.slice(-1)&&wt.utils.cfb_add(n,r,t.FileIndex[i].content)}})}(i,wt.read(n.vbaraw,{type:"string"==typeof n.vbaraw?"binary":"buffer"})),i}(n,e),e)}(n,e);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function ONe(n,t){var e=qn(t||{});return function fW(n,t){var e={},i=rn?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(e.compression="DEFLATE"),t.password)e.type=i;else switch(t.type){case"base64":e.type="base64";break;case"binary":e.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":e.type=i;break;default:throw new Error("Unrecognized type "+t.type)}var r=n.FullPaths?wt.write(n,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[e.type]||e.type,compression:!!t.compression}):n.generate(e);if(typeof Deno<"u"&&"string"==typeof r){if("binary"==t.type||"base64"==t.type)return r;r=new Uint8Array(Y_(r))}return t.password&&typeof encrypt_agile<"u"?hW(encrypt_agile(r,t.password),t):"file"===t.type?t0(t.file,r):"string"==t.type?Kn(r):r}(PNe(n,e),e)}(n,e);default:throw new Error("Unrecognized bookType |"+e.bookType+"|")}}function pW(n,t,e,i,r,o,s){var a=yn(e),c=s.defval,l=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),d=!0,u=null!=n["!data"],h=1===r?[]:{};if(1!==r)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:e,enumerable:!1})}catch{h.__rowNum__=e}else h.__rowNum__=e;if(!u||n["!data"][e])for(var f=t.s.c;f<=t.e.c;++f){var m=u?(n["!data"][e]||[])[f]:n[i[f]+a];if(void 0!==m&&void 0!==m.t){var g=m.v;switch(m.t){case"z":if(null==g)break;continue;case"e":g=0==g?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+m.t)}if(null!=o[f]){if(null==g)if("e"==m.t&&null===g)h[o[f]]=null;else if(void 0!==c)h[o[f]]=c;else{if(!l||null!==g)continue;h[o[f]]=null}else h[o[f]]=l&&("n"!==m.t||"n"===m.t&&!1!==s.rawNumbers)?g:oc(m,g,s);null!=g&&(d=!1)}}else{if(void 0===c)continue;null!=o[f]&&(h[o[f]]=c)}}return{row:h,isempty:d}}function bw(n,t){if(null==n||null==n["!ref"])return[];var e={t:"n",v:0},i=0,r=1,o=[],s=0,a="",c={s:{r:0,c:0},e:{r:0,c:0}},l=t||{},d=null!=l.range?l.range:n["!ref"];switch(1===l.header?i=1:"A"===l.header?i=2:Array.isArray(l.header)?i=3:null==l.header&&(i=0),typeof d){case"string":c=xn(d);break;case"number":(c=xn(n["!ref"])).s.r=d;break;default:c=d}i>0&&(r=0);var u=yn(c.s.r),h=[],f=[],m=0,g=0,p=null!=n["!data"],b=c.s.r,k=0,w={};p&&!n["!data"][b]&&(n["!data"][b]=[]);var D=l.skipHidden&&n["!cols"]||[],j=l.skipHidden&&n["!rows"]||[];for(k=c.s.c;k<=c.e.c;++k)if(!(D[k]||{}).hidden)switch(h[k]=on(k),e=p?n["!data"][b][k]:n[h[k]+u],i){case 1:o[k]=k-c.s.c;break;case 2:o[k]=h[k];break;case 3:o[k]=l.header[k-c.s.c];break;default:if(null==e&&(e={w:"__EMPTY",t:"s"}),a=s=oc(e,null,l),g=w[s]||0){do{a=s+"_"+g++}while(w[a]);w[s]=g,w[a]=1}else w[s]=1;o[k]=a}for(b=c.s.r+r;b<=c.e.r;++b)if(!(j[b]||{}).hidden){var P=pW(n,c,b,h,i,o,l);(!1===P.isempty||(1===i?!1!==l.blankrows:l.blankrows))&&(f[m++]=P.row)}return f.length=m,f}var gW=/"/g;function _W(n,t,e,i,r,o,s,a){for(var c=!0,l=[],d="",u=yn(e),h=null!=n["!data"],f=h&&n["!data"][e]||[],m=t.s.c;m<=t.e.c;++m)if(i[m]){var g=h?f[m]:n[i[m]+u];if(null==g)d="";else if(null!=g.v){c=!1,d=""+(a.rawNumbers&&"n"==g.t?g.v:oc(g,null,a));for(var p=0,b=0;p!==d.length;++p)if((b=d.charCodeAt(p))===r||b===o||34===b||a.forceQuotes){d='"'+d.replace(gW,'""')+'"';break}"ID"==d&&(d='"ID"')}else null==g.f||g.F?d="":(c=!1,(d="="+g.f).indexOf(",")>=0&&(d='"'+d.replace(gW,'""')+'"'));l.push(d)}return!1===a.blankrows&&c?null:l.join(s)}function jM(n,t){var e=[],i=t??{};if(null==n||null==n["!ref"])return"";for(var r=xn(n["!ref"]),o=void 0!==i.FS?i.FS:",",s=o.charCodeAt(0),a=void 0!==i.RS?i.RS:"\n",c=a.charCodeAt(0),l=new RegExp(("|"==o?"\\|":o)+"+$"),d="",u=[],h=i.skipHidden&&n["!cols"]||[],f=i.skipHidden&&n["!rows"]||[],m=r.s.c;m<=r.e.c;++m)(h[m]||{}).hidden||(u[m]=on(m));for(var g=0,p=r.s.r;p<=r.e.r;++p)(f[p]||{}).hidden||null!=(d=_W(n,r,p,u,s,c,o,i))&&(i.strip&&(d=d.replace(l,"")),(d||!1!==i.blankrows)&&e.push((g++?a:"")+d));return e.join("")}function bW(n,t){t||(t={}),t.FS="\t",t.RS="\n";var e=jM(n,t);if(typeof Xt>"u"||"string"==t.type)return e;var i=Xt.utils.encode(1200,e,"str");return String.fromCharCode(255)+String.fromCharCode(254)+i}function vW(n,t,e){var i=e||{},r=n?null!=n["!data"]:i.dense;null!=Wi&&null==r&&(r=Wi);var o=+!i.skipHeader,s=n||{};!n&&r&&(s["!data"]=[]);var a=0,c=0;if(s&&null!=i.origin)if("number"==typeof i.origin)a=i.origin;else{var l="string"==typeof i.origin?zn(i.origin):i.origin;a=l.r,c=l.c}var d={s:{c:0,r:0},e:{c,r:a+t.length-1+o}};if(s["!ref"]){var u=xn(s["!ref"]);d.e.c=Math.max(d.e.c,u.e.c),d.e.r=Math.max(d.e.r,u.e.r),-1==a&&(d.e.r=(a=u.e.r+1)+t.length-1+o)}else-1==a&&(a=0,d.e.r=t.length-1+o);var h=i.header||[],f=0,m=[];t.forEach(function(p,b){r&&!s["!data"][a+b+o]&&(s["!data"][a+b+o]=[]),r&&(m=s["!data"][a+b+o]),yi(p).forEach(function(k){-1==(f=h.indexOf(k))&&(h[f=h.length]=k);var w=p[k],D="z",j="",P=r?"":on(c+f)+yn(a+b+o),S=r?m[c+f]:s[P];!w||"object"!=typeof w||w instanceof Date?("number"==typeof w?D="n":"boolean"==typeof w?D="b":"string"==typeof w?D="s":w instanceof Date?(D="d",i.cellDates||(D="n",w=or(w)),j=null!=S&&S.z&&vd(S.z)?S.z:i.dateNF||kt[14]):null===w&&i.nullError&&(D="e",w=0),S?(S.t=D,S.v=w,delete S.w,delete S.R,j&&(S.z=j)):r?m[c+f]=S={t:D,v:w}:s[P]=S={t:D,v:w},j&&(S.z=j)):r?m[c+f]=w:s[P]=w})}),d.e.c=Math.max(d.e.c,c+h.length-1);var g=yn(a);if(r&&!s["!data"][a]&&(s["!data"][a]=[]),o)for(f=0;f=65535)throw new Error("Too many worksheets");if(i&&n.SheetNames.indexOf(e)>=0){var o=e.match(/(^.*?)(\d+)$/);r=o&&+o[2]||0;var s=o&&o[1]||e;for(++r;r<=65535&&-1!=n.SheetNames.indexOf(e=s+r);++r);}if(PG(e),n.SheetNames.indexOf(e)>=0)throw new Error("Worksheet with name |"+e+"| already exists!");return n.SheetNames.push(e),n.Sheets[e]=t,e}var xW_json_to_sheet=function zNe(n,t){return vW(null,n,t)};let nLe=(()=>{class n{constructor(){}exportAsExcelFile(e,i){const s=O0({Sheets:{data:xW_json_to_sheet(e)},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(s,i)}saveAsExcelFile(e,i){const r=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});Wa.saveAs(r,i+"_export_"+(new Date).getTime()+".xlsx")}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();const iLe=["*",[["mat-toolbar-row"]]],rLe=["*","mat-toolbar-row"],oLe=Pl(class{constructor(n){this._elementRef=n}});let sLe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=X({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),aLe=(()=>{class n extends oLe{constructor(e,i,r){super(e),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(Hn),y(gt))},n.\u0275cmp=Ve({type:n,selectors:[["mat-toolbar"]],contentQueries:function(e,i,r){if(1&e&&qt(r,sLe,5),2&e){let o;Ae(o=Ie())&&(i._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,i){2&e&&ot("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[ye],ngContentSelectors:rLe,decls:2,vars:0,template:function(e,i){1&e&&(Rn(iLe),dt(0),dt(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),n})(),cLe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})();const wW=["*"],lLe=["content"];function dLe(n,t){if(1&n){const e=Le();_(0,"div",2),z("click",function(){return he(e),fe(O()._onBackdropClicked())}),v()}2&n&&ot("mat-drawer-shown",O()._isShowingBackdrop())}function uLe(n,t){1&n&&(_(0,"mat-drawer-content"),dt(1,2),v())}const hLe=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],fLe=["mat-drawer","mat-drawer-content","*"],mLe={transformDrawer:$n("transform",[pn("open, open-instant",ze({transform:"none",visibility:"visible"})),pn("void",ze({"box-shadow":"none",visibility:"hidden"})),Qt("void => open-instant",Gt("0ms")),Qt("void <=> open, open-instant => void",Gt("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},pLe=new ae("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function gLe(){return!1}}),CW=new ae("MAT_DRAWER_CONTAINER");let GM=(()=>{class n extends xg{constructor(e,i,r,o,s){super(r,o,s),this._changeDetectorRef=e,this._container=i}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(y(an),y(hn(()=>EW)),y(Ne),y(ou),y(Ye))},n.\u0275cmp=Ve({type:n,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(e,i){2&e&&Ai("margin-left",i._container._contentMargins.left,"px")("margin-right",i._container._contentMargins.right,"px")},features:[nt([{provide:xg,useExisting:n}]),ye],ngContentSelectors:wW,decls:1,vars:0,template:function(e,i){1&e&&(Rn(),dt(0))},encapsulation:2,changeDetection:0}),n})(),kW=(()=>{class n{get position(){return this._position}set position(e){(e="end"===e?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=Ke(e)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(e){("true"===e||"false"===e||null==e)&&(e=Ke(e)),this._autoFocus=e}get opened(){return this._opened}set opened(e){this.toggle(Ke(e))}constructor(e,i,r,o,s,a,c,l){this._elementRef=e,this._focusTrapFactory=i,this._focusMonitor=r,this._platform=o,this._ngZone=s,this._interactivityChecker=a,this._doc=c,this._container=l,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new Me,this._animationEnd=new Me,this._animationState="void",this.openedChange=new De(!0),this._openedStream=this.openedChange.pipe(mn(d=>d),ct(()=>{})),this.openedStart=this._animationStarted.pipe(mn(d=>d.fromState!==d.toState&&0===d.toState.indexOf("open")),Cv(void 0)),this._closedStream=this.openedChange.pipe(mn(d=>!d),ct(()=>{})),this.closedStart=this._animationStarted.pipe(mn(d=>d.fromState!==d.toState&&"void"===d.toState),Cv(void 0)),this._destroyed=new Me,this.onPositionChanged=new De,this._modeChanged=new Me,this.openedChange.subscribe(d=>{d?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{ga(this._elementRef.nativeElement,"keydown").pipe(mn(d=>27===d.keyCode&&!this.disableClose&&!so(d)),St(this._destroyed)).subscribe(d=>this._ngZone.run(()=>{this.close(),d.stopPropagation(),d.preventDefault()}))}),this._animationEnd.pipe(ja((d,u)=>d.fromState===u.fromState&&d.toState===u.toState)).subscribe(d=>{const{fromState:u,toState:h}=d;(0===h.indexOf("open")&&"void"===u||"void"===h&&0===u.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_takeFocus(){if(!this._focusTrap)return;const e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{!i&&"function"==typeof this._elementRef.nativeElement.focus&&e.focus()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(e){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState(),"end"===this._position&&this._updatePositionInParent("end")}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,i){e&&i&&(this._openedVia=i);const r=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),r}_setOpen(e,i,r){return this._opened=e,e?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",i&&this._restoreFocus(r)),this._updateFocusTrapState(),new Promise(o=>{this.openedChange.pipe(An(1)).subscribe(s=>o(s?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_updatePositionInParent(e){const i=this._elementRef.nativeElement,r=i.parentNode;"end"===e?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),r.insertBefore(this._anchor,i)),r.appendChild(i)):this._anchor&&this._anchor.parentNode.insertBefore(i,this._anchor)}}return n.\u0275fac=function(e){return new(e||n)(y(Ne),y(ny),y(ms),y(Hn),y(Ye),y(mg),y(gt,8),y(CW,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-drawer"]],viewQuery:function(e,i){if(1&e&&pt(lLe,5),2&e){let r;Ae(r=Ie())&&(i._content=r.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(e,i){1&e&&Ub("@transform.start",function(o){return i._animationStarted.next(o)})("@transform.done",function(o){return i._animationEnd.next(o)}),2&e&&(vt("align",null),$b("@transform",i._animationState),ot("mat-drawer-end","end"===i.position)("mat-drawer-over","over"===i.mode)("mat-drawer-push","push"===i.mode)("mat-drawer-side","side"===i.mode)("mat-drawer-opened",i.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:wW,decls:3,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"],["content",""]],template:function(e,i){1&e&&(Rn(),_(0,"div",0,1),dt(2),v())},dependencies:[xg],encapsulation:2,data:{animation:[mLe.transformDrawer]},changeDetection:0}),n})(),EW=(()=>{class n{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=Ke(e)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(e){this._backdropOverride=null==e?null:Ke(e)}get scrollable(){return this._userContent||this._content}constructor(e,i,r,o,s,a=!1,c){this._dir=e,this._element=i,this._ngZone=r,this._changeDetectorRef=o,this._animationMode=c,this._drawers=new yl,this.backdropClick=new De,this._destroyed=new Me,this._doCheckSubject=new Me,this._contentMargins={left:null,right:null},this._contentMarginChanges=new Me,e&&e.change.pipe(St(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),s.change().pipe(St(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=a}ngAfterContentInit(){this._allDrawers.changes.pipe(er(this._allDrawers),St(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(i=>!i._container||i._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(er(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Pc(10),St(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,i=0;if(this._left&&this._left.opened)if("side"==this._left.mode)e+=this._left._getWidth();else if("push"==this._left.mode){const r=this._left._getWidth();e+=r,i-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)i+=this._right._getWidth();else if("push"==this._right.mode){const r=this._right._getWidth();i+=r,e-=r}e=e||null,i=i||null,(e!==this._contentMargins.left||i!==this._contentMargins.right)&&(this._contentMargins={left:e,right:i},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe(mn(i=>i.fromState!==i.toState),St(this._drawers.changes)).subscribe(i=>{"open-instant"!==i.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==e.mode&&e.openedChange.pipe(St(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e&&e.onPositionChanged.pipe(St(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(An(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(e){e&&e._modeChanged.pipe(St(oi(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){const i=this._element.nativeElement.classList,r="mat-drawer-container-has-open";e?i.add(r):i.remove(r)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{"end"==e.position?this._end=e:this._start=e}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._canHaveBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(e){return"side"!==e.mode||!!this._backdropOverride}_isDrawerOpen(e){return null!=e&&e.opened}}return n.\u0275fac=function(e){return new(e||n)(y(Hi,8),y(Ne),y(Ye),y(an),y(_a),y(pLe),y(Jn,8))},n.\u0275cmp=Ve({type:n,selectors:[["mat-drawer-container"]],contentQueries:function(e,i,r){if(1&e&&(qt(r,GM,5),qt(r,kW,5)),2&e){let o;Ae(o=Ie())&&(i._content=o.first),Ae(o=Ie())&&(i._allDrawers=o)}},viewQuery:function(e,i){if(1&e&&pt(GM,5),2&e){let r;Ae(r=Ie())&&(i._userContent=r.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,i){2&e&&ot("mat-drawer-container-explicit-backdrop",i._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[nt([{provide:CW,useExisting:n}])],ngContentSelectors:fLe,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,i){1&e&&(Rn(hLe),A(0,dLe,1,2,"div",0),dt(1),dt(2,1),A(3,uLe,2,0,"mat-drawer-content",1)),2&e&&(E("ngIf",i.hasBackdrop),x(3),E("ngIf",!i._content))},dependencies:[ri,GM],styles:['.mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0}),n})(),_Le=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Br,Ft,Vc,Vc,Ft]}),n})();function bLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O().setFhirServer(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e.name)}}function vLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(2).setEdition(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e.resource.version)}}function yLe(n,t){if(1&n&&(zt(0),_(1,"button",15),C(2),v(),_(3,"mat-menu",null,16)(5,"span",11),C(6,"Versions / Releases"),v(),A(7,vLe,2,1,"button",9),v(),jt()),2&n){const e=t.$implicit,i=Pt(4);x(1),E("matMenuTriggerFor",i),x(1),Je(e.editionName),x(5),E("ngForOf",e.editions)}}function xLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O().setLanguage(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e)}}function wLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(2).setFhirServer(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e.name)}}function CLe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(3).setEdition(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e.resource.version)}}function kLe(n,t){if(1&n&&(zt(0),_(1,"button",15),C(2),v(),_(3,"mat-menu",null,16)(5,"span",11),C(6,"Versions / Releases"),v(),A(7,CLe,2,1,"button",9),v(),jt()),2&n){const e=t.$implicit,i=Pt(4);x(1),E("matMenuTriggerFor",i),x(1),Je(e.editionName),x(5),E("ngForOf",e.editions)}}function ELe(n,t){if(1&n){const e=Le();_(0,"button",7),z("click",function(){const o=he(e).$implicit;return fe(O(2).setLanguage(o))}),C(1),v()}if(2&n){const e=t.$implicit;x(1),Je(e)}}function TLe(n,t){if(1&n){const e=Le();_(0,"mat-toolbar")(1,"button",17),z("click",function(){return he(e),O(),fe(Pt(2).toggle())}),_(2,"mat-icon"),C(3,"menu"),v()(),_e(4,"img",18),_(5,"span",19),C(6,"SNOMED CT Implementation Demos"),v(),_(7,"span",20),C(8,"Implementation Demos"),v(),_e(9,"span",21),_(10,"button",22),C(11,"Select Demonstrator"),v(),_(12,"mat-menu",5,23)(14,"button",7),z("click",function(){return he(e),fe(O().navigate("/allergies"))}),C(15,"Allergies CRG"),v(),_(16,"button",7),z("click",function(){return he(e),fe(O().navigate("/sandbox"))}),C(17,"Terminology Bindings Sandbox"),v(),_(18,"button",7),z("click",function(){return he(e),fe(O().navigate("/questionnaires"))}),C(19,"SNOMED & FHIR Questionnaires"),v(),_(20,"button",7),z("click",function(){return he(e),fe(O().navigate("/context"))}),C(21,"Context Representation"),v(),_(22,"button",7),z("click",function(){return he(e),fe(O().navigate("/snoguess"))}),C(23,"Playground"),v()(),_(24,"button",24),C(25),v(),_(26,"mat-menu",null,25),A(28,wLe,2,1,"button",9),v(),_(29,"button",24),C(30),v(),_(31,"mat-menu",5,26)(33,"span",11),C(34,"Editions"),v(),A(35,kLe,8,3,"ng-container",12),v(),_(36,"button",24),C(37),v(),_(38,"mat-menu",null,27),A(40,ELe,2,1,"button",9),v(),_(41,"a",28)(42,"mat-icon"),C(43,"info"),v()()()}if(2&n){const e=Pt(13),i=Pt(27),r=Pt(32),o=Pt(39),s=O();x(10),E("matMenuTriggerFor",e),x(14),E("matMenuTriggerFor",i),x(1),Qe("FHIR Server: ",s.selectedServer.name,""),x(3),E("ngForOf",s.fhirServers),x(1),E("matMenuTriggerFor",r),x(1),Je(s.selectedEdition),x(5),E("ngForOf",s.editionsDetails),x(1),E("matMenuTriggerFor",o),x(1),Je(s.selectedLanguage),x(3),E("ngForOf",s.languages)}}let SLe=(()=>{class n{constructor(e,i,r,o,s){this.codingSpecService=e,this.excelService=i,this.terminologyService=r,this.router=o,this.activatedRoute=s,this.title="sct-implementation-demonstrator",this.bindingsForExport=[],this.editions=[],this.editionsDetails=[],this.languages=["be","en","es","fr","no"],this.selectedEdition="Edition",this.selectedLanguage="en",this.fhirServers=[{name:"SNOMED Dev IS",url:"https://dev-is-browser.ihtsdotools.org/fhir"},{name:"SNOMED Public",url:"https://snowstorm.ihtsdotools.org/fhir"},{name:"SNOMED Dev 2",url:"https://snowstorm-temp.kaicode.io/fhir"}],this.selectedServer=this.fhirServers[1],this.embeddedMode=!1,this.router.events.subscribe(a=>{a instanceof Sl&>ag("config","G-7SK998GPMX",{page_path:a.urlAfterRedirects})})}ngOnInit(){this.setFhirServer(this.selectedServer),this.bindingsForExport=[];let e=this.codingSpecService.getCodingSpec();for(const i of e)for(const r of i.bindings)this.bindingsForExport.push({section:i.title,title:r.title,ecl:r.ecl.replace(/\s\s+/g," ")});this.activatedRoute.queryParams.subscribe(i=>{this.embeddedMode="true"===i.embedded,i.edition?this.updateCodeSystemOptions(i.edition):this.updateCodeSystemOptions()})}navigate(e){this.router.navigate([e])}updateCodeSystemOptions(e){this.terminologyService.getCodeSystems().subscribe(i=>{this.editionsDetails=[],this.editions=i.entry;let r=new Set;this.editions.forEach(s=>{r.add(s.resource.title)}),r.forEach(s=>{this.editionsDetails.push({editionName:s,editions:this.editions.filter(a=>a.resource.title.includes(s)).sort(this.compare)})});let o=this.editionsDetails.findIndex(s=>"International Edition"===s.editionName);e?this.editions.forEach(s=>{s.resource.version===e&&this.setEdition(s)}):this.setEdition(o>=0?this.editionsDetails[o].editions[0]:this.editions[0])})}compare(e,i){return e.resource.datei.resource.date?-1:0}setFhirServer(e){this.selectedServer=e,this.terminologyService.setSnowstormFhirBase(e.url),this.selectedEdition="Edition",this.editions=[],this.editionsDetails=[],this.updateCodeSystemOptions()}setEdition(e){this.selectedEdition=e.resource.title?.replace("SNOMED CT release ",""),this.terminologyService.setFhirUrlParam(e.resource.version)}setLanguage(e){this.selectedLanguage=e,this.terminologyService.setLang(e)}static#e=this.\u0275fac=function(i){return new(i||n)(y(MTe),y(nLe),y(Ur),y(ro),y(Dl))};static#t=this.\u0275cmp=Ve({type:n,selectors:[["app-root"]],decls:37,vars:11,consts:[["autosize","",1,"example-container"],["mode","over",1,"example-sidenav"],["drawer",""],[1,"flex","flex-col","justify-center"],["mat-button","",3,"matMenuTriggerFor"],[1,"wide-menu"],["demosMenuN","matMenu"],["mat-menu-item","",3,"click"],["serverMenuN","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["editionsMenuN","matMenu"],[1,"ml-4"],[4,"ngFor","ngForOf"],["menuN","matMenu"],[4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor"],["sub_menu","matMenu"],["mat-icon-button","","id","menu-button",3,"click"],["src","assets/img/small_logo.png","id","logo"],["id","title"],["id","short-title"],[1,"example-spacer"],["mat-flat-button","","color","accent",1,"bar-button",3,"matMenuTriggerFor"],["demosMenu","matMenu"],["mat-flat-button","","color","primary",1,"bar-button",3,"matMenuTriggerFor"],["serverMenu","matMenu"],["editionsMenu","matMenu"],["menu","matMenu"],["mat-flat-button","","href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank","color","primary","id","info-button"]],template:function(i,r){if(1&i&&(_(0,"mat-drawer-container",0)(1,"mat-drawer",1,2)(3,"div",3)(4,"button",4),C(5,"Select Demonstrator"),v(),_(6,"mat-menu",5,6)(8,"button",7),z("click",function(){return r.navigate("/allergies")}),C(9,"Allergies CRG"),v(),_(10,"button",7),z("click",function(){return r.navigate("/sandbox")}),C(11,"Terminology Bindings Sandbox"),v(),_(12,"button",7),z("click",function(){return r.navigate("/questionnaires")}),C(13,"SNOMED & FHIR Questionnaires"),v(),_(14,"button",7),z("click",function(){return r.navigate("/context")}),C(15,"Context Representation"),v(),_(16,"button",7),z("click",function(){return r.navigate("/snoguess")}),C(17,"Playground"),v()(),_(18,"button",4),C(19),v(),_(20,"mat-menu",null,8),A(22,bLe,2,1,"button",9),v(),_(23,"button",4),C(24),v(),_(25,"mat-menu",5,10)(27,"span",11),C(28,"Editions"),v(),A(29,yLe,8,3,"ng-container",12),v(),_(30,"button",4),C(31),v(),_(32,"mat-menu",null,13),A(34,xLe,2,1,"button",9),v()()(),A(35,TLe,44,10,"mat-toolbar",14),_e(36,"router-outlet"),v()),2&i){const o=Pt(7),s=Pt(21),a=Pt(26),c=Pt(33);x(4),E("matMenuTriggerFor",o),x(14),E("matMenuTriggerFor",s),x(1),Qe("FHIR Server: ",r.selectedServer.name,""),x(3),E("ngForOf",r.fhirServers),x(1),E("matMenuTriggerFor",a),x(1),Qe("Edition: ",r.selectedEdition,""),x(5),E("ngForOf",r.editionsDetails),x(1),E("matMenuTriggerFor",c),x(1),Qe("Language: ",r.selectedLanguage,""),x(3),E("ngForOf",r.languages),x(1),E("ngIf",!r.embeddedMode)}},dependencies:[io,ri,sT,aLe,Wce,Fo,Vs,co,lu,$a,du,kW,EW],styles:[".mat-toolbar[_ngcontent-%COMP%]{background-color:#000;color:#fff;font-size:1.8rem;font-weight:700}button[_ngcontent-%COMP%]{font-weight:700;font-size:medium}.bar-button[_ngcontent-%COMP%]{margin-left:15px}#title[_ngcontent-%COMP%]{margin-left:15px;font-size:1.4rem}.example-spacer[_ngcontent-%COMP%]{flex:1 1 auto}a[_ngcontent-%COMP%]{margin-left:15px} .mat-mdc-menu-panel{max-width:-moz-fit-content!important;max-width:fit-content!important;overflow-x:hidden!important}.mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-raised-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{margin:0!important}#demo-selector[_ngcontent-%COMP%]{margin:5px 15px;padding:10px}#menu-button[_ngcontent-%COMP%], #short-title[_ngcontent-%COMP%]{display:none}#logo[_ngcontent-%COMP%]{height:4rem}@media (max-width: 768px){#title[_ngcontent-%COMP%]{display:none}#short-title[_ngcontent-%COMP%]{display:block;margin-left:15px;font-size:.9rem}#logo[_ngcontent-%COMP%]{height:3.5rem}#info-button[_ngcontent-%COMP%]{display:none}}@media (max-width: 1200px){.bar-button[_ngcontent-%COMP%]{display:none}#menu-button[_ngcontent-%COMP%]{display:block}}"]})}return n})();function TW(n){return new pe(3e3,!1)}function c3e(){return typeof window<"u"&&typeof window.document<"u"}function WM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ad(n){switch(n.length){case 0:return new bg;case 1:return n[0];default:return new D5(n)}}function SW(n,t,e,i,r=new Map,o=new Map){const s=[],a=[];let c=-1,l=null;if(i.forEach(d=>{const u=d.get("offset"),h=u==c,f=h&&l||new Map;d.forEach((m,g)=>{let p=g,b=m;if("offset"!==g)switch(p=t.normalizePropertyName(p,s),b){case YT:b=r.get(g);break;case Nc:b=o.get(g);break;default:b=t.normalizeStyleValue(g,p,b,s)}f.set(p,b)}),h||a.push(f),l=f,c=u}),s.length)throw function XLe(n){return new pe(3502,!1)}();return a}function qM(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&QM(e,"start",n)));break;case"done":n.onDone(()=>i(e&&QM(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&QM(e,"destroy",n)))}}function QM(n,t,e){const o=KM(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function KM(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function ks(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function DW(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let XM=(n,t)=>!1,AW=(n,t,e)=>[],IW=null;function YM(n){const t=n.parentNode||n.host;return t===IW?null:t}(WM()||typeof Element<"u")&&(c3e()?(IW=(()=>document.documentElement)(),XM=(n,t)=>{for(;t;){if(t===n)return!0;t=YM(t)}return!1}):XM=(n,t)=>n.contains(t),AW=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let ch=null,MW=!1;const RW=XM,FW=AW;let PW=(()=>{class n{validateStyleProperty(e){return function d3e(n){ch||(ch=function u3e(){return typeof document<"u"?document.body:null}()||{},MW=!!ch.style&&"WebkitAppearance"in ch.style);let t=!0;return ch.style&&!function l3e(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in ch.style,!t&&MW&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ch.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return RW(e,i)}getParentElement(e){return YM(e)}query(e,i,r){return FW(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],c){return new bg(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),ZM=(()=>{class n{}return n.NOOP=new PW,n})();const h3e=1e3,JM="ng-enter",ww="ng-leave",Cw="ng-trigger",kw=".ng-trigger",NW="ng-animating",eR=".ng-animating";function hl(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:tR(parseFloat(t[1]),t[2])}function tR(n,t){return"s"===t?n*h3e:n}function Ew(n,t,e){return n.hasOwnProperty("duration")?n:function m3e(n,t,e){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(TW()),{duration:0,delay:0,easing:""};r=tR(parseFloat(a[1]),a[2]);const c=a[3];null!=c&&(o=tR(parseFloat(c),a[4]));const l=a[5];l&&(s=l)}else r=n;if(!e){let a=!1,c=t.length;r<0&&(t.push(function DLe(){return new pe(3100,!1)}()),a=!0),o<0&&(t.push(function ALe(){return new pe(3101,!1)}()),a=!0),a&&t.splice(c,0,TW())}return{duration:r,delay:o,easing:s}}(n,t,e)}function N0(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function LW(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Id(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function VW(n,t,e){return e?t+":"+e+";":""}function UW(n){let t="";for(let e=0;e{const o=iR(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),WM()&&UW(n))}function lh(n,t){n.style&&(t.forEach((e,i)=>{const r=iR(i);n.style[r]=""}),WM()&&UW(n))}function L0(n){return Array.isArray(n)?1==n.length?n[0]:T5(n):n}const nR=new RegExp("{{\\s*(.+?)\\s*}}","g");function HW(n){let t=[];if("string"==typeof n){let e;for(;e=nR.exec(n);)t.push(e[1]);nR.lastIndex=0}return t}function B0(n,t,e){const i=n.toString(),r=i.replace(nR,(o,s)=>{let a=t[s];return null==a&&(e.push(function MLe(n){return new pe(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function Tw(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const _3e=/-+([a-z0-9])/g;function iR(n){return n.replace(_3e,(...t)=>t[1].toUpperCase())}function b3e(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Es(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function RLe(n){return new pe(3004,!1)}()}}function zW(n,t){return window.getComputedStyle(n)[t]}const Aw="*";function k3e(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function E3e(n,t,e){if(":"==n[0]){const c=function T3e(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof c)return void t.push(c);n=c}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function GLe(n){return new pe(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(jW(r,s));"<"==o[0]&&!(r==Aw&&s==Aw)&&t.push(jW(s,r))}(i,e,t)):e.push(n),e}const Iw=new Set(["true","1"]),Mw=new Set(["false","0"]);function jW(n,t){const e=Iw.has(n)||Mw.has(n),i=Iw.has(t)||Mw.has(t);return(r,o)=>{let s=n==Aw||n==r,a=t==Aw||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?Iw.has(n):Mw.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?Iw.has(t):Mw.has(t)),s&&a}}const S3e=new RegExp("s*:selfs*,?","g");function rR(n,t,e,i){return new D3e(n).build(t,e,i)}class D3e{constructor(t){this._driver=t}build(t,e,i){const r=new M3e(e);return this._resetContextStyleTimingState(r),Es(this,L0(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function PLe(){return new pe(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const c=a,l=c.name;l.toString().split(/\s*,\s*/).forEach(d=>{c.name=d,o.push(this.visitState(c,e))}),c.name=l}else if(1==a.type){const c=this.visitTransition(a,e);i+=c.queryCount,r+=c.depCount,s.push(c)}else e.errors.push(function OLe(){return new pe(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{HW(c).forEach(l=>{s.hasOwnProperty(l)||o.add(l)})})}),o.size&&(Tw(o.values()),e.errors.push(function NLe(n,t){return new pe(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Es(this,L0(t.animation),e);return{type:1,matchers:k3e(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:dh(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Es(this,i,e)),options:dh(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=Es(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:dh(t.options)}}visitAnimate(t,e){const i=function F3e(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return oR(Ew(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=oR(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=Ew(e,t);return oR(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:ze({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const l={};i.easing&&(l.easing=i.easing),s=ze(l)}e.currentTime+=i.duration+i.delay;const c=this.visitStyle(s,e);c.isEmptyStep=a,r=c}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Nc?i.push(a):e.errors.push(new pe(3002,!1)):i.push(LW(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let c of a.values())if(c.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,c)=>{const l=e.collectedStyles.get(e.currentQuerySelector),d=l.get(c);let u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(e.errors.push(function BLe(n,t,e,i,r){return new pe(3010,!1)}()),u=!1),o=d.startTime),u&&l.set(c,{startTime:o,endTime:r}),e.options&&function g3e(n,t,e){const i=t.params||{},r=HW(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function ILe(n){return new pe(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function VLe(){return new pe(3011,!1)}()),i;let o=0;const s=[];let a=!1,c=!1,l=0;const d=t.steps.map(b=>{const k=this._makeStyleAst(b,e);let w=null!=k.offset?k.offset:function R3e(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(k.styles),D=0;return null!=w&&(o++,D=k.offset=w),c=c||D<0||D>1,a=a||D0&&o{const w=h>0?k==f?1:h*k:s[k],D=w*p;e.currentTime=m+g.delay+D,g.duration=D,this._validateStyleAst(b,e),b.offset=w,i.styles.push(b)}),i}visitReference(t,e){return{type:8,animation:Es(this,L0(t.animation),e),options:dh(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:dh(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:dh(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function A3e(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(S3e,"")),n=n.replace(/@\*/g,kw).replace(/@\w+/g,e=>kw+"-"+e.slice(1)).replace(/:animating/g,eR),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,ks(e.collectedStyles,e.currentQuerySelector,new Map);const a=Es(this,L0(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:dh(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function jLe(){return new pe(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:Ew(t.timings,e.errors,!0);return{type:12,animation:Es(this,L0(t.animation),e),timings:i,options:null}}}class M3e{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function dh(n){return n?(n=N0(n)).params&&(n.params=function I3e(n){return n?N0(n):null}(n.params)):n={},n}function oR(n,t,e){return{duration:n,delay:t,easing:e}}function sR(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Rw{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const N3e=new RegExp(":enter","g"),B3e=new RegExp(":leave","g");function aR(n,t,e,i,r,o=new Map,s=new Map,a,c,l=[]){return(new V3e).buildKeyframes(n,t,e,i,r,o,s,a,c,l)}class V3e{buildKeyframes(t,e,i,r,o,s,a,c,l,d=[]){l=l||new Rw;const u=new cR(t,e,l,r,o,d,[]);u.options=c;const h=c.delay?hl(c.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([s],null,u.errors,c),Es(this,i,u);const f=u.timelines.filter(m=>m.containsAnimation());if(f.length&&a.size){let m;for(let g=f.length-1;g>=0;g--){const p=f[g];if(p.element===e){m=p;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,c)}return f.length?f.map(m=>m.buildKeyframes()):[sR(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:hl(B0(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?hl(i.duration):null,a=null!=i.delay?hl(i.delay):null;return 0!==s&&t.forEach(c=>{const l=e.appendInstructionToTimeline(c,s,a);o=Math.max(o,l.duration+l.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),Es(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Fw);const s=hl(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Es(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?hl(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),Es(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return Ew(e.params?B0(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(c=>{a.forwardTime((c.offset||0)*o),a.setStyles(c.styles,c.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?hl(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Fw);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let c=null;a.forEach((l,d)=>{e.currentQueryIndex=d;const u=e.createSubContext(t.options,l);o&&u.delayNextStep(o),l===e.element&&(c=u.currentTimeline),Es(this,t.animation,u),u.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,u.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),c&&(e.currentTimeline.mergeTimelineCollectedStyles(c),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let c=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=i.currentStaggerTime}const d=e.currentTimeline;c&&d.delayNextStep(c);const u=d.currentTime;Es(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-u+(r.startTime-i.currentTimeline.startTime)}}const Fw={};class cR{constructor(t,e,i,r,o,s,a,c){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Fw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new Pw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=hl(i.duration)),null!=i.delay&&(r.delay=hl(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=B0(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new cR(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Fw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new U3e(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(N3e,"."+this._enterClassName)).replace(B3e,"."+this._leaveClassName);let l=this._driver.query(this.element,t,1!=i);0!==i&&(l=i<0?l.slice(l.length+i,l.length):l.slice(0,i)),a.push(...l)}return!o&&0==a.length&&s.push(function $Le(n){return new pe(3014,!1)}()),a}}class Pw{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Pw(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Nc),this._currentKeyframe.set(e,Nc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function H3e(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,Nc)}else Id(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,c]of s){const l=B0(c,o,i);this._pendingStyles.set(a,l),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Nc),this._updateStyle(a,l)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,c)=>{const l=Id(a,new Map,this._backFill);l.forEach((d,u)=>{d===YT?t.add(u):d===Nc&&e.add(u)}),i||l.set("offset",c/this.duration),r.push(l)});const o=t.size?Tw(t.values()):[],s=e.size?Tw(e.values()):[];if(i){const a=r[0],c=new Map(a);a.set("offset",0),c.set("offset",1),r=[a,c]}return sR(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class U3e extends Pw{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,c=Id(t[0]);c.set("offset",0),o.push(c);const l=Id(t[0]);l.set("offset",WW(a)),o.push(l);const d=t.length-1;for(let u=1;u<=d;u++){let h=Id(t[u]);const f=h.get("offset");h.set("offset",WW((e+f*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return sR(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function WW(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class lR{}const z3e=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class j3e extends lR{normalizePropertyName(t,e){return iR(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(z3e.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function FLe(n,t){return new pe(3005,!1)}())}return s+o}}function qW(n,t,e,i,r,o,s,a,c,l,d,u,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:u,errors:h}}const dR={};class QW{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function $3e(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,c,l,d){const u=[],h=this.ast.options&&this.ast.options.params||dR,m=this.buildStyles(i,a&&a.params||dR,u),g=c&&c.params||dR,p=this.buildStyles(r,g,u),b=new Set,k=new Map,w=new Map,D="void"===r,j={params:G3e(g,h),delay:this.ast.options?.delay},P=d?[]:aR(t,e,this.ast.animation,o,s,m,p,j,l,u);let S=0;if(P.forEach(V=>{S=Math.max(V.duration+V.delay,S)}),u.length)return qW(e,this._triggerName,i,r,D,m,p,[],[],k,w,S,u);P.forEach(V=>{const q=V.element,J=ks(k,q,new Set);V.preStyleProps.forEach(ve=>J.add(ve));const G=ks(w,q,new Set);V.postStyleProps.forEach(ve=>G.add(ve)),q!==e&&b.add(q)});const U=Tw(b.values());return qW(e,this._triggerName,i,r,D,m,p,P,U,k,w,S)}}function G3e(n,t){const e=N0(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class W3e{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=N0(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=B0(s,r,e));const c=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,c,s,e),i.set(a,s)})}),i}}class Q3e{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new W3e(r.style,r.options&&r.options.params||{},i))}),KW(this.states,"true","1"),KW(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new QW(t,r,this.states))}),this.fallbackTransition=function K3e(n,t,e){return new QW(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function KW(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const X3e=new Rw;class Y3e{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],r=[],o=rR(this._driver,e,i,r);if(i.length)throw function YLe(n){return new pe(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=SW(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=aR(this._driver,e,o,JM,ww,new Map,new Map,i,X3e,r),s.forEach(d=>{const u=ks(a,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(function ZLe(){return new pe(3300,!1)}()),s=[]),r.length)throw function JLe(n){return new pe(3504,!1)}();a.forEach((d,u)=>{d.forEach((h,f)=>{d.set(f,this._driver.computeStyle(u,f,Nc))})});const l=Ad(s.map(d=>{const u=a.get(d.element);return this._buildPlayer(d,new Map,u)}));return this._playersById.set(t,l),l.onDestroy(()=>this.destroy(t)),this.players.push(l),l}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function e3e(n){return new pe(3301,!1)}();return e}listen(t,e,i,r){const o=KM(e,"","","");return qM(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const XW="ng-animate-queued",uR="ng-animate-disabled",nBe=[],YW={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},iBe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ys="__ng_removed";class hR{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function aBe(n){return n??null}(i?t.value:t),i){const o=N0(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const V0="void",fR=new hR(V0);class rBe{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Zs(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function t3e(n,t){return new pe(3302,!1)}();if(null==i||0==i.length)throw function n3e(n){return new pe(3303,!1)}();if(!function cBe(n){return"start"==n||"done"==n}(i))throw function i3e(n,t){return new pe(3400,!1)}();const o=ks(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=ks(this._engine.statesByElement,t,new Map);return a.has(e)||(Zs(t,Cw),Zs(t,Cw+"-"+e),a.set(e,fR)),()=>{this._engine.afterFlush(()=>{const c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function r3e(n){return new pe(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new mR(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Zs(t,Cw),Zs(t,Cw+"-"+e),this._engine.statesByElement.set(t,a=new Map));let c=a.get(e);const l=new hR(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),a.set(e,l),c||(c=fR),l.value!==V0&&c.value===l.value){if(!function uBe(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{lh(t,p),dc(t,b)})}return}const h=ks(this._engine.playersByElement,t,[]);h.forEach(g=>{g.namespaceId==this.id&&g.triggerName==e&&g.queued&&g.destroy()});let f=o.matchTransition(c.value,l.value,t,l.params),m=!1;if(!f){if(!r)return;f=o.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:c,toState:l,player:s,isFallbackTransition:m}),m||(Zs(t,XW),s.onStart(()=>{Qm(t,XW)})),s.onDone(()=>{let g=this.players.indexOf(s);g>=0&&this.players.splice(g,1);const p=this._engine.playersByElement.get(t);if(p){let b=p.indexOf(s);b>=0&&p.splice(b,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,kw,!0);i.forEach(r=>{if(r[Ys])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((c,l)=>{if(s.set(l,c.value),this._triggers.has(l)){const d=this.trigger(t,l,V0,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&Ad(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const c=this._triggers.get(s).fallbackTransition,l=i.get(s)||fR,d=new hR(V0),u=new mR(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:c,fromState:l,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Ys];(!o||o===YW)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Zs(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const c=KM(o,i.triggerName,i.fromState.value,i.toState.value);c._data=t,qM(i.player,a.phase,c,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class oBe{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new rBe(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const c=r.get(a);if(c){const l=i.indexOf(c);i.splice(l+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Ow(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Ow(e))return;const o=e[Ys];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Zs(t,uR)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Qm(t,uR))}removeNode(t,e,i,r){if(Ow(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Ys]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Ow(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,kw,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,eR,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ad(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Ys];if(e&&e.setForRemoval){if(t[Ys]=YW,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(uR)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ad(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function o3e(n){return new pe(3402,!1)}()}_flushAnimations(t,e){const i=new Rw,r=[],o=new Map,s=[],a=new Map,c=new Map,l=new Map,d=new Set;this.disabledNodes.forEach(re=>{d.add(re);const Y=this.driver.query(re,".ng-animate-queued",!0);for(let ge=0;ge{const ge=JM+g++;m.set(Y,ge),re.forEach(le=>Zs(le,ge))});const p=[],b=new Set,k=new Set;for(let re=0;reb.add(le)):k.add(Y))}const w=new Map,D=eq(h,Array.from(b));D.forEach((re,Y)=>{const ge=ww+g++;w.set(Y,ge),re.forEach(le=>Zs(le,ge))}),t.push(()=>{f.forEach((re,Y)=>{const ge=m.get(Y);re.forEach(le=>Qm(le,ge))}),D.forEach((re,Y)=>{const ge=w.get(Y);re.forEach(le=>Qm(le,ge))}),p.forEach(re=>{this.processLeaveNode(re)})});const j=[],P=[];for(let re=this._namespaceList.length-1;re>=0;re--)this._namespaceList[re].drainQueuedTransitions(e).forEach(ge=>{const le=ge.player,We=ge.element;if(j.push(le),this.collectedEnterElements.length){const H=We[Ys];if(H&&H.setForMove){if(H.previousTriggersValues&&H.previousTriggersValues.has(ge.triggerName)){const ce=H.previousTriggersValues.get(ge.triggerName),Ce=this.statesByElement.get(ge.element);if(Ce&&Ce.has(ge.triggerName)){const Ue=Ce.get(ge.triggerName);Ue.value=ce,Ce.set(ge.triggerName,Ue)}}return void le.destroy()}}const de=!u||!this.driver.containsElement(u,We),st=w.get(We),Dt=m.get(We),F=this._buildInstruction(ge,i,Dt,st,de);if(F.errors&&F.errors.length)return void P.push(F);if(de)return le.onStart(()=>lh(We,F.fromStyles)),le.onDestroy(()=>dc(We,F.toStyles)),void r.push(le);if(ge.isFallbackTransition)return le.onStart(()=>lh(We,F.fromStyles)),le.onDestroy(()=>dc(We,F.toStyles)),void r.push(le);const Z=[];F.timelines.forEach(H=>{H.stretchStartingKeyframe=!0,this.disabledNodes.has(H.element)||Z.push(H)}),F.timelines=Z,i.append(We,F.timelines),s.push({instruction:F,player:le,element:We}),F.queriedElements.forEach(H=>ks(a,H,[]).push(le)),F.preStyleProps.forEach((H,ce)=>{if(H.size){let Ce=c.get(ce);Ce||c.set(ce,Ce=new Set),H.forEach((Ue,$e)=>Ce.add($e))}}),F.postStyleProps.forEach((H,ce)=>{let Ce=l.get(ce);Ce||l.set(ce,Ce=new Set),H.forEach((Ue,$e)=>Ce.add($e))})});if(P.length){const re=[];P.forEach(Y=>{re.push(function s3e(n,t){return new pe(3505,!1)}())}),j.forEach(Y=>Y.destroy()),this.reportError(re)}const S=new Map,U=new Map;s.forEach(re=>{const Y=re.element;i.has(Y)&&(U.set(Y,Y),this._beforeAnimationBuild(re.player.namespaceId,re.instruction,S))}),r.forEach(re=>{const Y=re.element;this._getPreviousPlayers(Y,!1,re.namespaceId,re.triggerName,null).forEach(le=>{ks(S,Y,[]).push(le),le.destroy()})});const V=p.filter(re=>nq(re,c,l)),q=new Map;JW(q,this.driver,k,l,Nc).forEach(re=>{nq(re,c,l)&&V.push(re)});const G=new Map;f.forEach((re,Y)=>{JW(G,this.driver,new Set(re),c,YT)}),V.forEach(re=>{const Y=q.get(re),ge=G.get(re);q.set(re,new Map([...Array.from(Y?.entries()??[]),...Array.from(ge?.entries()??[])]))});const ve=[],Se=[],me={};s.forEach(re=>{const{element:Y,player:ge,instruction:le}=re;if(i.has(Y)){if(d.has(Y))return ge.onDestroy(()=>dc(Y,le.toStyles)),ge.disabled=!0,ge.overrideTotalTime(le.totalTime),void r.push(ge);let We=me;if(U.size>1){let st=Y;const Dt=[];for(;st=st.parentNode;){const F=U.get(st);if(F){We=F;break}Dt.push(st)}Dt.forEach(F=>U.set(F,We))}const de=this._buildAnimation(ge.namespaceId,le,S,o,G,q);if(ge.setRealPlayer(de),We===me)ve.push(ge);else{const st=this.playersByElement.get(We);st&&st.length&&(ge.parentPlayer=Ad(st)),r.push(ge)}}else lh(Y,le.fromStyles),ge.onDestroy(()=>dc(Y,le.toStyles)),Se.push(ge),d.has(Y)&&r.push(ge)}),Se.forEach(re=>{const Y=o.get(re.element);if(Y&&Y.length){const ge=Ad(Y);re.setRealPlayer(ge)}}),r.forEach(re=>{re.parentPlayer?re.syncPlayerEvents(re.parentPlayer):re.destroy()});for(let re=0;re!de.destroyed);We.length?lBe(this,Y,We):this.processLeaveNode(Y)}return p.length=0,ve.forEach(re=>{this.players.push(re),re.onDone(()=>{re.destroy();const Y=this.players.indexOf(re);this.players.splice(Y,1)}),re.play()}),ve}elementContainsData(t,e){let i=!1;const r=e[Ys];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const c=!o||o==V0;a.forEach(l=>{l.queued||!c&&l.triggerName!=r||s.push(l)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const c of e.timelines){const l=c.element,d=l!==o,u=ks(i,l,[]);this._getPreviousPlayers(l,d,s,a,e.toState).forEach(f=>{const m=f.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),f.destroy(),u.push(f)})}lh(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,c=e.element,l=[],d=new Set,u=new Set,h=e.timelines.map(m=>{const g=m.element;d.add(g);const p=g[Ys];if(p&&p.removedBeforeQueried)return new bg(m.duration,m.delay);const b=g!==c,k=function dBe(n){const t=[];return tq(n,t),t}((i.get(g)||nBe).map(S=>S.getRealPlayer())).filter(S=>!!S.element&&S.element===g),w=o.get(g),D=s.get(g),j=SW(0,this._normalizer,0,m.keyframes,w,D),P=this._buildPlayer(m,j,k);if(m.subTimeline&&r&&u.add(g),b){const S=new mR(t,a,g);S.setRealPlayer(P),l.push(S)}return P});l.forEach(m=>{ks(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function sBe(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,m.element,m))}),d.forEach(m=>Zs(m,NW));const f=Ad(h);return f.onDestroy(()=>{d.forEach(m=>Qm(m,NW)),dc(c,e.toStyles)}),u.forEach(m=>{ks(r,m,[]).push(f)}),f}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new bg(t.duration,t.delay)}}class mR{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new bg,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>qM(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ks(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Ow(n){return n&&1===n.nodeType}function ZW(n,t){const e=n.style.display;return n.style.display=t??"none",e}function JW(n,t,e,i,r){const o=[];e.forEach(c=>o.push(ZW(c)));const s=[];i.forEach((c,l)=>{const d=new Map;c.forEach(u=>{const h=t.computeStyle(l,u,r);d.set(u,h),(!h||0==h.length)&&(l[Ys]=iBe,s.push(l))}),n.set(l,d)});let a=0;return e.forEach(c=>ZW(c,o[a++])),s}function eq(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const i=1,r=new Set(t),o=new Map;function s(a){if(!a)return i;let c=o.get(a);if(c)return c;const l=a.parentNode;return c=e.has(l)?l:r.has(l)?i:s(l),o.set(a,c),c}return t.forEach(a=>{const c=s(a);c!==i&&e.get(c).push(a)}),e}function Zs(n,t){n.classList?.add(t)}function Qm(n,t){n.classList?.remove(t)}function lBe(n,t,e){Ad(e).onDone(()=>n.processLeaveNode(t))}function tq(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Nw{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new oBe(t,e,i),this._timelineEngine=new Y3e(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const c=[],l=[],d=rR(this._driver,o,c,l);if(c.length)throw function KLe(n,t){return new pe(3404,!1)}();a=function q3e(n,t,e){return new Q3e(n,t,e)}(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=DW(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=DW(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let fBe=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&dc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(dc(this._element,this._initialStyles),this._endStyles&&(dc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(lh(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(lh(this._element,this._endStyles),this._endStyles=null),dc(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function pR(n){let t=null;return n.forEach((e,i)=>{(function mBe(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class iq{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:zW(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class pBe{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return RW(t,e)}getParentElement(t){return YM(t)}query(t,e,i){return FW(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){const c={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(c.easing=o);const l=new Map,d=s.filter(f=>f instanceof iq);(function v3e(n,t){return 0===n||0===t})(i,r)&&d.forEach(f=>{f.currentSnapshot.forEach((m,g)=>l.set(g,m))});let u=function p3e(n){return n.length?n[0]instanceof Map?n:n.map(t=>LW(t)):[]}(e).map(f=>Id(f));u=function y3e(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,zW(n,a)))}}return t}(t,u,l);const h=function hBe(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=pR(t[0]),t.length>1&&(i=pR(t[t.length-1]))):t instanceof Map&&(e=pR(t)),e||i?new fBe(n,e,i):null}(t,u);return new iq(t,u,c,h)}}let gBe=(()=>{class n extends E5{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:na.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?T5(e):e;return rq(this._renderer,null,i,"register",[r]),new _Be(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(Q(vp),Q(gt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class _Be extends Qce{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new bBe(this._id,t,e||{},this._renderer)}}class bBe{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return rq(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function rq(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const oq="@.disabled";let vBe=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let d=this._rendererCache.get(o);return d||(d=new sq("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,d)),d}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const c=d=>{Array.isArray(d)?d.forEach(c):this.engine.registerTrigger(s,a,e,d.name,d)};return i.data.animation.forEach(c),new yBe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(Q(vp),Q(Nw),Q(Ye))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class sq{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==oq?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class yBe extends sq{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==oq?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function xBe(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function wBe(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let CBe=(()=>{class n extends Nw{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(Q(gt),Q(ZM),Q(lR),Q(sf))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const aq=[{provide:E5,useClass:gBe},{provide:lR,useFactory:function kBe(){return new j3e}},{provide:Nw,useClass:CBe},{provide:vp,useFactory:function EBe(n,t,e){return new vBe(n,t,e)},deps:[xv,Nw,Ye]}],gR=[{provide:ZM,useFactory:()=>new pBe},{provide:Jn,useValue:"BrowserAnimations"},...aq],cq=[{provide:ZM,useClass:PW},{provide:Jn,useValue:"NoopAnimations"},...aq];let TBe=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?cq:gR}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({providers:gR,imports:[a3]}),n})(),SBe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Ft,Ft]}),n})(),i5e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=xt({type:n}),n.\u0275inj=yt({imports:[Jv,Br,Ft,Nl,g5,SBe]}),n})();Hf("firebase","10.9.0","app"),i7({apiKey:"AIzaSyAFjiIuMBA1IpTrw__WdkQiK5PKht4_go8",authDomain:"snoguess-e4d1c.firebaseapp.com",projectId:"snoguess-e4d1c",storageBucket:"snoguess-e4d1c.appspot.com",messagingSenderId:"289449411190",appId:"1:289449411190:web:49ff68411f9e5148f11557"});let s5e=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=xt({type:n,bootstrap:[SLe]});static#n=this.\u0275inj=yt({imports:[kae,a3,Lme,ATe,TBe,ige,cLe,k5,lde,kde,j5,Y0e,Wy,_fe,Mde,kfe,khe,Pme,Yde,kue,tpe,LS,gpe,Tpe,Hge,Jge,wge,m_e,i5e,f0e,LS,_Le]})}return n})();_re().bootstrapModule(s5e).catch(n=>console.error(n))},627:(Tr,fh,Qr)=>{const sn=Qr(602).z,hc=Qr(224).array;Tr.exports=class ml{constructor(lt={}){Object.assign(this,{list:lt.emptyList&&[]||Array.prototype.concat.apply(sn,[hc,lt.list||[]]),exclude:lt.exclude||[],splitRegex:lt.splitRegex||/\b/,placeHolder:lt.placeHolder||"*",regex:lt.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:lt.replaceRegex||/\w/g})}isProfane(lt){return this.list.filter(ur=>{const Eo=new RegExp(`\\b${ur.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(ur.toLowerCase())&&Eo.test(lt)}).length>0||!1}replaceWord(lt){return lt.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(lt){return lt.split(this.splitRegex).map(ur=>this.isProfane(ur)?this.replaceWord(ur):ur).join(this.splitRegex.exec(lt)[0])}addWords(){let lt=Array.from(arguments);this.list.push(...lt),lt.map(ur=>ur.toLowerCase()).forEach(ur=>{this.exclude.includes(ur)&&this.exclude.splice(this.exclude.indexOf(ur),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(lt=>lt.toLowerCase()))}}},201:Tr=>{Tr.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]},224:(Tr,fh,Qr)=>{Tr.exports={object:Qr(184),array:Qr(201),regex:Qr(716)}},184:Tr=>{Tr.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}},716:Tr=>{Tr.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi},327:function(Tr,fh){var Qr,hc;void 0!==(hc="function"==typeof(Qr=function(){"use strict";function ea(kn,Pn,To){var ti=new XMLHttpRequest;ti.open("GET",kn),ti.responseType="blob",ti.onload=function(){Ss(ti.response,Pn,To)},ti.onerror=function(){console.error("could not download file")},ti.send()}function lt(kn){var Pn=new XMLHttpRequest;Pn.open("HEAD",kn,!1);try{Pn.send()}catch{}return 200<=Pn.status&&299>=Pn.status}function ur(kn){try{kn.dispatchEvent(new MouseEvent("click"))}catch{var Pn=document.createEvent("MouseEvents");Pn.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),kn.dispatchEvent(Pn)}}var Eo="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,Km=Eo.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Ss=Eo.saveAs||("object"!=typeof window||window!==Eo?function(){}:"download"in HTMLAnchorElement.prototype&&!Km?function(kn,Pn,To){var ti=Eo.URL||Eo.webkitURL,So=document.createElement("a");So.download=Pn=Pn||kn.name||"download",So.rel="noopener","string"==typeof kn?(So.href=kn,So.origin===location.origin?ur(So):lt(So.href)?ea(kn,Pn,To):ur(So,So.target="_blank")):(So.href=ti.createObjectURL(kn),setTimeout(function(){ti.revokeObjectURL(So.href)},4e4),setTimeout(function(){ur(So)},0))}:"msSaveOrOpenBlob"in navigator?function(kn,Pn,To){if(Pn=Pn||kn.name||"download","string"!=typeof kn)navigator.msSaveOrOpenBlob(function ml(kn,Pn){return typeof Pn>"u"?Pn={autoBom:!1}:"object"!=typeof Pn&&(console.warn("Deprecated: Expected third argument to be a object"),Pn={autoBom:!Pn}),Pn.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(kn.type)?new Blob(["\ufeff",kn],{type:kn.type}):kn}(kn,To),Pn);else if(lt(kn))ea(kn,Pn,To);else{var ti=document.createElement("a");ti.href=kn,ti.target="_blank",setTimeout(function(){ur(ti)})}}:function(kn,Pn,To,ti){if((ti=ti||open("","_blank"))&&(ti.document.title=ti.document.body.innerText="downloading..."),"string"==typeof kn)return ea(kn,Pn,To);var So="application/octet-stream"===kn.type,Vw=/constructor/i.test(Eo.HTMLElement)||Eo.safari,mh=/CriOS\/[\d]+/.test(navigator.userAgent);if((mh||So&&Vw||Km)&&typeof FileReader<"u"){var ta=new FileReader;ta.onloadend=function(){var fc=ta.result;fc=mh?fc:fc.replace(/^data:[^;]*;/,"data:attachment/file;"),ti?ti.location.href=fc:location=fc,ti=null},ta.readAsDataURL(kn)}else{var Rd=Eo.URL||Eo.webkitURL,Xm=Rd.createObjectURL(kn);ti?ti.location=Xm:location.href=Xm,ti=null,setTimeout(function(){Rd.revokeObjectURL(Xm)},4e4)}});Eo.saveAs=Ss.saveAs=Ss,Tr.exports=Ss})?Qr.apply(fh,[]):Qr)&&(Tr.exports=hc)},602:Tr=>{"use strict";Tr.exports=JSON.parse('{"z":["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}')}},Tr=>{Tr(Tr.s=52)}]); \ No newline at end of file diff --git a/src/app/game/service/snoguess.service.ts b/src/app/game/service/snoguess.service.ts index c34dfda..8d7cd18 100644 --- a/src/app/game/service/snoguess.service.ts +++ b/src/app/game/service/snoguess.service.ts @@ -15,6 +15,9 @@ export interface Game { rules: any; // Rules and settings for the game startTimestamp: number; // Timestamp when the game started endTimestamp: number; // Timestamp when the game ended + difficultyBonus: number; // Bonus points for difficulty level + livesBonus: number; // Bonus points for remaining lives + timeBonus: number; // Bonus points for time remaining } interface SnomedConcept { @@ -40,15 +43,15 @@ export class SnoguessService { difficultyLevels: any[] = [ { name: 'Easy', - rules: { maxHitPoints: 5, hitpointsAwardedForGuessingfullTerm: 1, freeHints: 2, pointsPerGuessedLetter: 1, goals: this.goals } + rules: { maxHitPoints: 5, hitpointsAwardedForGuessingfullTerm: 1, freeHints: 2, pointsPerGuessedLetter: 1, goals: this.goals, difficultyBonus: 0 } }, { name: 'Medium', - rules: { maxHitPoints: 4, hitpointsAwardedForGuessingfullTerm: 1, freeHints: 1, pointsPerGuessedLetter: 2, goals: this.goals } + rules: { maxHitPoints: 4, hitpointsAwardedForGuessingfullTerm: 1, freeHints: 1, pointsPerGuessedLetter: 2, goals: this.goals, difficultyBonus: 50} }, { name: 'Hard', - rules: { maxHitPoints: 3, hitpointsAwardedForGuessingfullTerm: 1, freeHints: 0, pointsPerGuessedLetter: 3, goals: this.goals } + rules: { maxHitPoints: 3, hitpointsAwardedForGuessingfullTerm: 1, freeHints: 0, pointsPerGuessedLetter: 3, goals: this.goals, difficultyBonus: 100} } ]; @@ -216,7 +219,10 @@ export class SnoguessService { rules: this.rules, difficultyLevel: '', startTimestamp: 0, - endTimestamp: 0 + endTimestamp: 0, + difficultyBonus: 0, + livesBonus: 0, + timeBonus: 0 }; } @@ -234,7 +240,10 @@ export class SnoguessService { rules: this.rules, difficultyLevel: difficulty, startTimestamp: Date.now(), - endTimestamp: 0 + endTimestamp: 0, + difficultyBonus: 0, + livesBonus: 0, + timeBonus: 0 }); this.newRound(true); } @@ -317,6 +326,12 @@ export class SnoguessService { if (newState.score > this.goals[this.goals.length - 1].score) { newState.state = 'won'; // Update the state to 'won' newState.endTimestamp = Date.now(); + // Add bonuses to the score + newState.difficultyBonus = this.rules.difficultyBonus; + newState.livesBonus = newState.hitPoints * 10; + const elapsedTime = Math.round((newState.endTimestamp - newState.startTimestamp) / 1000); + newState.timeBonus = Math.max(0, 180 - elapsedTime); + newState.score += newState.difficultyBonus + newState.livesBonus + newState.timeBonus; } else { newState.hitPoints = newState.hitPoints + this.rules.hitpointsAwardedForGuessingfullTerm; // Add a hit points for winning if (newState.hitPoints > this.rules.maxHitPoints) { diff --git a/src/app/game/snoguess-main/snoguess-main.component.html b/src/app/game/snoguess-main/snoguess-main.component.html index 13a9e69..89e2bf3 100644 --- a/src/app/game/snoguess-main/snoguess-main.component.html +++ b/src/app/game/snoguess-main/snoguess-main.component.html @@ -238,7 +238,17 @@

Score Progression

emoji_events grade -
Final score: {{ gameState.score }} - Difficulty: {{ gameState.difficultyLevel }} - Time: {{ (gameState.endTimestamp - gameState.startTimestamp) | elapsedTime }}
+
Lives left: {{ gameState.hitPoints }} + → Bonus: {{ gameState.livesBonus }} +
+
Difficulty: {{ gameState.difficultyLevel }} + → Bonus: {{ gameState.difficultyBonus }} +
+
Time: {{ (gameState.endTimestamp - gameState.startTimestamp) | elapsedTime }} + → Bonus: {{ gameState.timeBonus }} +
+
Final score: {{ gameState.score }}
+

This is a High Score! Save a message to the public leaderboard!