diff --git a/frontend/dist/gui/3rdpartylicenses.txt b/frontend/dist/gui/3rdpartylicenses.txt index 0b9c0da..eb48105 100644 --- a/frontend/dist/gui/3rdpartylicenses.txt +++ b/frontend/dist/gui/3rdpartylicenses.txt @@ -1,3 +1,6 @@ +@angular-material-components/color-picker +MIT + @angular/animations MIT diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index 3ccfc27..77183cf 100644 --- a/frontend/dist/gui/index.html +++ b/frontend/dist/gui/index.html @@ -11,6 +11,6 @@ - + \ No newline at end of file diff --git a/frontend/dist/gui/main.84537cb5a012b3bb.js b/frontend/dist/gui/main.84537cb5a012b3bb.js new file mode 100644 index 0000000..b733597 --- /dev/null +++ b/frontend/dist/gui/main.84537cb5a012b3bb.js @@ -0,0 +1 @@ +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{745:(Mo,Is,Kr)=>{"use strict";function en(i){return"function"==typeof i}function U(i){const e=i(n=>{Error.call(n),n.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const Ir=U(i=>function(e){i(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function Zr(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class Yt{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 s of e)s.remove(this);else e.remove(this);const{initialTeardown:n}=this;if(en(n))try{n()}catch(s){t=s instanceof Ir?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Fa(s)}catch(o){t=t??[],o instanceof Ir?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Ir(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Fa(t);else{if(t instanceof Yt){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)&&Zr(e,t)}remove(t){const{_finalizers:e}=this;e&&Zr(e,t),t instanceof Yt&&t._removeParent(this)}}Yt.EMPTY=(()=>{const i=new Yt;return i.closed=!0,i})();const kn=Yt.EMPTY;function hl(i){return i instanceof Yt||i&&"closed"in i&&en(i.remove)&&en(i.add)&&en(i.unsubscribe)}function Fa(i){en(i)?i():i.unsubscribe()}const Rs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ci={setTimeout(i,t,...e){const{delegate:n}=ci;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=ci;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function di(i){ci.setTimeout(()=>{const{onUnhandledError:t}=Rs;if(!t)throw i;t(i)})}function ds(){}const ks=Tn("C",void 0,void 0);function Tn(i,t,e){return{kind:i,value:t,error:e}}let ir=null;function oc(i){if(Rs.useDeprecatedSynchronousErrorHandling){const t=!ir;if(t&&(ir={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=ir;if(ir=null,e)throw n}}else i()}class fl extends Yt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,hl(t)&&t.add(this)):this.destination=pE}static create(t,e,n){return new Jo(t,e,n)}next(t){this.isStopped?Gg(function Co(i){return Tn("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?Gg(function Ps(i){return Tn("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Gg(ks,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 Qo=Function.prototype.bind;function pl(i,t){return Qo.call(i,t)}class La{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){ud(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){ud(n)}else ud(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){ud(e)}}}class Jo extends fl{constructor(t,e,n){let r;if(super(),en(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let s;this&&Rs.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&pl(t.next,s),error:t.error&&pl(t.error,s),complete:t.complete&&pl(t.complete,s)}):r=t}this.destination=new La(r)}}function ud(i){Rs.useDeprecatedSynchronousErrorHandling?function Zo(i){Rs.useDeprecatedSynchronousErrorHandling&&ir&&(ir.errorThrown=!0,ir.error=i)}(i):di(i)}function Gg(i,t){const{onStoppedNotification:e}=Rs;e&&ci.setTimeout(()=>e(i,t))}const pE={closed:!0,next:ds,error:function fE(i){throw i},complete:ds},$g="function"==typeof Symbol&&Symbol.observable||"@@observable";function Na(i){return i}function Gb(i){return 0===i.length?Na:1===i.length?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}let En=(()=>{class i{constructor(e){e&&(this._subscribe=e)}lift(e){const n=new i;return n.source=this,n.operator=e,n}subscribe(e,n,r){const s=function Of(i){return i&&i instanceof fl||function gE(i){return i&&en(i.next)&&en(i.error)&&en(i.complete)}(i)&&hl(i)}(e)?e:new Jo(e,n,r);return oc(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return new(n=Ba(n))((r,s)=>{const o=new Jo({next:a=>{try{e(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(e){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(e)}[$g](){return this}pipe(...e){return Gb(e)(this)}toPromise(e){return new(e=Ba(e))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return i.create=t=>new i(t),i})();function Ba(i){var t;return null!==(t=i??Rs.Promise)&&void 0!==t?t:Promise}const ea=U(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Fe=(()=>{class i extends En{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new $b(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ea}next(e){oc(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){oc(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){oc(()=>{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:n,isStopped:r,observers:s}=this;return n||r?kn:(this.currentObservers=null,s.push(e),new Yt(()=>{this.currentObservers=null,Zr(s,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:s}=this;n?e.error(r):s&&e.complete()}asObservable(){const e=new En;return e.source=this,e}}return i.create=(t,e)=>new $b(t,e),i})();class $b extends Fe{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)}error(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.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,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:kn}}function Wb(i){return en(i?.lift)}function Vn(i){return t=>{if(Wb(t))return t.lift(function(e){try{return i(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Fn(i,t,e,n,r){return new _E(i,t,e,n,r)}class _E extends fl{constructor(t,e,n,r,s,o){super(t),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}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 Qe(i,t){return Vn((e,n)=>{let r=0;e.subscribe(Fn(n,s=>{n.next(i.call(t,s,r++))}))})}function ta(i){return this instanceof ta?(this.v=i,this):new ta(i)}function Uf(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=i[Symbol.asyncIterator];return t?t.call(i):(i=function Wg(i){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&i[t],n=0;if(e)return e.call(i);if(i&&"number"==typeof i.length)return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(s){e[s]=i[s]&&function(o){return new Promise(function(a,l){!function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}(a,l,(o=i[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const Qg=i=>i&&"number"==typeof i.length&&"function"!=typeof i;function Xb(i){return en(i?.then)}function Kb(i){return en(i[$g])}function Jg(i){return Symbol.asyncIterator&&en(i?.[Symbol.asyncIterator])}function Zb(i){return new TypeError(`You provided ${null!==i&&"object"==typeof i?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Qb=function SE(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Vf(i){return en(i?.[Qb])}function Jb(i){return function Bf(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=e.apply(i,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(p){n[p]&&(r[p]=function(m){return new Promise(function(g,b){s.push([p,m,g,b])>1||a(p,m)})})}function a(p,m){try{!function l(p){p.value instanceof ta?Promise.resolve(p.value.v).then(c,u):h(s[0][2],p)}(n[p](m))}catch(g){h(s[0][3],g)}}function c(p){a("next",p)}function u(p){a("throw",p)}function h(p,m){p(m),s.shift(),s.length&&a(s[0][0],s[0][1])}}(this,arguments,function*(){const e=i.getReader();try{for(;;){const{value:n,done:r}=yield ta(e.read());if(r)return yield ta(void 0);yield yield ta(n)}}finally{e.releaseLock()}})}function zf(i){return en(i?.getReader)}function rr(i){if(i instanceof En)return i;if(null!=i){if(Kb(i))return function EE(i){return new En(t=>{const e=i[$g]();if(en(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(i);if(Qg(i))return function AE(i){return new En(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,di)})}(i);if(Jg(i))return e0(i);if(Vf(i))return function TE(i){return new En(t=>{for(const e of i)if(t.next(e),t.closed)return;t.complete()})}(i);if(zf(i))return function IE(i){return e0(Jb(i))}(i)}throw Zb(i)}function e0(i){return new En(t=>{(function RE(i,t){var e,n,r,s;return function fd(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Uf(i);!(n=yield e.next()).done;)if(t.next(n.value),t.closed)return}catch(o){r={error:o}}finally{try{n&&!n.done&&(s=e.return)&&(yield s.call(e))}finally{if(r)throw r.error}}t.complete()})})(i,t).catch(e=>t.error(e))})}function na(i,t,e,n=0,r=!1){const s=t.schedule(function(){e(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(s),!r)return s}function qi(i,t,e=1/0){return en(t)?qi((n,r)=>Qe((s,o)=>t(n,s,r,o))(rr(i(n,r))),e):("number"==typeof t&&(e=t),Vn((n,r)=>function kE(i,t,e,n,r,s,o,a){const l=[];let c=0,u=0,h=!1;const p=()=>{h&&!l.length&&!c&&t.complete()},m=b=>c{s&&t.next(b),c++;let v=!1;rr(e(b,u++)).subscribe(Fn(t,y=>{r?.(y),s?m(y):t.next(y)},()=>{v=!0},void 0,()=>{if(v)try{for(c--;l.length&&cg(y)):g(y)}p()}catch(y){t.error(y)}}))};return i.subscribe(Fn(t,m,()=>{h=!0,p()})),()=>{a?.()}}(n,r,i,e)))}function gd(i=1/0){return qi(Na,i)}const Os=new En(i=>i.complete());function Iu(i){return i&&en(i.schedule)}function e_(i){return i[i.length-1]}function Ru(i){return en(e_(i))?i.pop():void 0}function ku(i){return Iu(e_(i))?i.pop():void 0}function t0(i,t=0){return Vn((e,n)=>{e.subscribe(Fn(n,r=>na(n,i,()=>n.next(r),t),()=>na(n,i,()=>n.complete(),t),r=>na(n,i,()=>n.error(r),t)))})}function t_(i,t=0){return Vn((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function s0(i,t){if(!i)throw new Error("Iterable cannot be null");return new En(e=>{na(e,t,()=>{const n=i[Symbol.asyncIterator]();na(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Pi(i,t){return t?function o0(i,t){if(null!=i){if(Kb(i))return function n0(i,t){return rr(i).pipe(t_(t),t0(t))}(i,t);if(Qg(i))return function FE(i,t){return new En(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}(i,t);if(Xb(i))return function r0(i,t){return rr(i).pipe(t_(t),t0(t))}(i,t);if(Jg(i))return s0(i,t);if(Vf(i))return function LE(i,t){return new En(e=>{let n;return na(e,t,()=>{n=i[Qb](),na(e,t,()=>{let r,s;try{({value:r,done:s}=n.next())}catch(o){return void e.error(o)}s?e.complete():e.next(r)},0,!0)}),()=>en(n?.return)&&n.return()})}(i,t);if(zf(i))return function NE(i,t){return s0(Jb(i),t)}(i,t)}throw Zb(i)}(i,t):rr(i)}function Rr(...i){const t=ku(i),e=function OE(i,t){return"number"==typeof e_(i)?i.pop():t}(i,1/0),n=i;return n.length?1===n.length?rr(n[0]):gd(e)(Pi(n,t)):Os}function Pu(i={}){const{connector:t=(()=>new Fe),resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return s=>{let o,a,l,c=0,u=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,u=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return Vn((b,v)=>{c++,!h&&!u&&p();const y=l=l??t();v.add(()=>{c--,0===c&&!h&&!u&&(a=n_(g,r))}),y.subscribe(v),!o&&c>0&&(o=new Jo({next:M=>y.next(M),error:M=>{h=!0,p(),a=n_(m,e,M),y.error(M)},complete:()=>{u=!0,p(),a=n_(m,n),y.complete()}}),rr(b).subscribe(o))})(s)}}function n_(i,t,...e){if(!0===t)return void i();if(!1===t)return;const n=new Jo({next:()=>{n.unsubscribe(),i()}});return rr(t(...e)).subscribe(n)}function Kn(i){for(let t in i)if(i[t]===Kn)return t;throw Error("Could not find renamed property on target object.")}function _d(i,t){for(const e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function ii(i){if("string"==typeof i)return i;if(Array.isArray(i))return"["+i.map(ii).join(", ")+"]";if(null==i)return""+i;if(i.overriddenName)return`${i.overriddenName}`;if(i.name)return`${i.name}`;const t=i.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function i_(i,t){return null==i||""===i?null===t?"":t:null==t||""===t?i:i+" "+t}const a0=Kn({__forward_ref__:Kn});function Ln(i){return i.__forward_ref__=Ln,i.toString=function(){return ii(this())},i}function wt(i){return r_(i)?i():i}function r_(i){return"function"==typeof i&&i.hasOwnProperty(a0)&&i.__forward_ref__===Ln}function Hf(i){return i&&!!i.\u0275providers}const vd="https://g.co/ng/security#xss";class he extends Error{constructor(t,e){super(Ou(t,e)),this.code=t}}function Ou(i,t){return`NG0${Math.abs(i)}${t?": "+t.trim():""}`}function $t(i){return"string"==typeof i?i:null==i?"":String(i)}function Fu(i,t){throw new he(-201,!1)}function ro(i,t){null==i&&function gt(i,t,e,n){throw new Error(`ASSERTION ERROR: ${i}`+(null==n?"":` [Expected=> ${e} ${n} ${t} <=Actual]`))}(t,i,null,"!=")}function Ie(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function Wt(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gf(i){return f0(i,_l)||f0(i,Wf)}function f0(i,t){return i.hasOwnProperty(t)?i[t]:null}function s_(i){return i&&(i.hasOwnProperty($f)||i.hasOwnProperty(so))?i[$f]:null}const _l=Kn({\u0275prov:Kn}),$f=Kn({\u0275inj:Kn}),Wf=Kn({ngInjectableDef:Kn}),so=Kn({ngInjectorDef:Kn});var Et=(()=>((Et=Et||{})[Et.Default=0]="Default",Et[Et.Host=1]="Host",Et[Et.Self=2]="Self",Et[Et.SkipSelf=4]="SkipSelf",Et[Et.Optional=8]="Optional",Et))();let jf;function Ls(i){const t=jf;return jf=i,t}function o_(i,t,e){const n=Gf(i);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&Et.Optional?null:void 0!==t?t:void Fu(ii(i))}const Cn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),yd={},ia="__NG_DI_FLAG__",cc="ngTempTokenPath",a_="ngTokenPath",ui=/\n/gm,vl="\u0275",Yf="__source";let Lu;function yl(i){const t=Lu;return Lu=i,t}function $E(i,t=Et.Default){if(void 0===Lu)throw new he(-203,!1);return null===Lu?o_(i,void 0,t):Lu.get(i,t&Et.Optional?null:void 0,t)}function J(i,t=Et.Default){return(function p0(){return jf}()||$E)(wt(i),t)}function Nt(i,t=Et.Default){return J(i,dc(t))}function dc(i){return typeof i>"u"||"number"==typeof i?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function bl(i){const t=[];for(let e=0;e((To=To||{})[To.OnPush=0]="OnPush",To[To.Default=1]="Default",To))(),Io=(()=>{return(i=Io||(Io={}))[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",Io;var i})();const Ro={},Nn=[],qf=Kn({\u0275cmp:Kn}),Xf=Kn({\u0275dir:Kn}),Qr=Kn({\u0275pipe:Kn}),Kf=Kn({\u0275mod:Kn}),Ns=Kn({\u0275fac:Kn}),bd=Kn({__NG_ELEMENT_ID__:Kn});let v0=0;function it(i){return Do(()=>{const t=b0(i),e={...t,decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===To.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,data:i.data||{},encapsulation:i.encapsulation||Io.Emulated,id:"c"+v0++,styles:i.styles||Nn,_:null,schemas:i.schemas||null,tView:null};uc(e);const n=i.dependencies;return e.directiveDefs=us(n,!1),e.pipeDefs=us(n,!0),e})}function Bu(i,t,e){const n=i.\u0275cmp;n.directiveDefs=us(t,!1),n.pipeDefs=us(e,!0)}function WE(i){return zn(i)||yi(i)}function jE(i){return null!==i}function qt(i){return Do(()=>({type:i.type,bootstrap:i.bootstrap||Nn,declarations:i.declarations||Nn,imports:i.imports||Nn,exports:i.exports||Nn,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function y0(i,t){if(null==i)return Ro;const e={};for(const n in i)if(i.hasOwnProperty(n)){let r=i[n],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),e[r]=n,t&&(t[r]=s)}return e}function xe(i){return Do(()=>{const t=b0(i);return uc(t),t})}function kr(i){return{type:i.type,name:i.name,factory:null,pure:!1!==i.pure,standalone:!0===i.standalone,onDestroy:i.type.prototype.ngOnDestroy||null}}function zn(i){return i[qf]||null}function yi(i){return i[Xf]||null}function _r(i){return i[Qr]||null}function Bs(i,t){const e=i[Kf]||null;if(!e&&!0===t)throw new Error(`Type ${ii(i)} does not have '\u0275mod' property.`);return e}function b0(i){const t={};return{type:i.type,providersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:t,exportAs:i.exportAs||null,standalone:!0===i.standalone,selectors:i.selectors||Nn,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:y0(i.inputs,t),outputs:y0(i.outputs)}}function uc(i){i.features?.forEach(t=>t(i))}function us(i,t){if(!i)return null;const e=t?_r:WE;return()=>("function"==typeof i?i():i).map(n=>e(n)).filter(jE)}const ra=0,nt=1,rn=2,Ci=3,ko=4,hc=5,Xi=6,Y=7,oe=8,ae=9,Je=10,Ne=11,Bn=12,bi=13,Zn=14,xl=15,Pr=16,Or=17,Ua=18,sa=19,oa=20,Uu=21,Qn=22,c_=1,d_=2,fc=7,Zf=8,Md=9,Jr=10;function zi(i){return Array.isArray(i)&&"object"==typeof i[c_]}function hs(i){return Array.isArray(i)&&!0===i[c_]}function Qf(i){return 0!=(4&i.flags)}function wl(i){return i.componentOffset>-1}function Vu(i){return 1==(1&i.flags)}function oo(i){return!!i.template}function Jf(i){return 0!=(256&i[rn])}function Va(i,t){return i.hasOwnProperty(Ns)?i[Ns]:null}class Hu{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Si(){return mc}function mc(i){return i.type.prototype.ngOnChanges&&(i.setInput=$u),Gu}function Gu(){const i=gc(this),t=i?.current;if(t){const e=i.previous;if(e===Ro)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function $u(i,t,e,n){const r=this.declaredInputs[e],s=gc(i)||function KE(i,t){return i[Wu]=t}(i,{previous:Ro,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Hu(l&&l.currentValue,t,a===Ro),i[n]=t}Si.ngInherit=!0;const Wu="__ngSimpleChanges__";function gc(i){return i[Wu]||null}const ao=function(i,t,e){},M0="svg";function Oi(i){for(;Array.isArray(i);)i=i[ra];return i}function R(i,t){return Oi(t[i])}function or(i,t){return Oi(t[i.index])}function Us(i,t){return i.data[t]}function sn(i,t){return i[t]}function fs(i,t){const e=t[i];return zi(e)?e:e[ra]}function tp(i){return 64==(64&i[rn])}function Ml(i,t){return null==t?null:i[t]}function S0(i){i[Ua]=0}function g_(i,t){i[hc]+=t;let e=i,n=i[Ci];for(;null!==n&&(1===t&&1===e[hc]||-1===t&&0===e[hc]);)n[hc]+=t,e=n,n=n[Ci]}const Xt={lFrame:M_(null),bindingsEnabled:!0};function A0(){return Xt.bindingsEnabled}function Ee(){return Xt.lFrame.lView}function Pn(){return Xt.lFrame.tView}function bn(i){return Xt.lFrame.contextLView=i,i[oe]}function xn(i){return Xt.lFrame.contextLView=null,i}function yr(){let i=Sl();for(;null!==i&&64===i.type;)i=i.parent;return i}function Sl(){return Xt.lFrame.currentTNode}function aa(i,t){const e=Xt.lFrame;e.currentTNode=i,e.isParent=t}function Vs(){return Xt.lFrame.isParent}function __(){Xt.lFrame.isParent=!1}function es(){const i=Xt.lFrame;let t=i.bindingRootIndex;return-1===t&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function Cd(){return Xt.lFrame.bindingIndex++}function Ha(i){const t=Xt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function np(i,t){const e=Xt.lFrame;e.bindingIndex=e.bindingRootIndex=i,ip(t)}function ip(i){Xt.lFrame.currentDirectiveIndex=i}function b_(i){const t=Xt.lFrame.currentDirectiveIndex;return-1===t?null:i[t]}function ca(){return Xt.lFrame.currentQueryIndex}function qu(i){Xt.lFrame.currentQueryIndex=i}function vc(i){const t=i[nt];return 2===t.type?t.declTNode:1===t.type?i[Xi]:null}function zs(i,t,e){if(e&Et.SkipSelf){let r=t,s=i;for(;!(r=r.parent,null!==r||e&Et.Host||(r=vc(s),null===r||(s=s[xl],10&r.type))););if(null===r)return!1;t=r,i=s}const n=Xt.lFrame=w_();return n.currentTNode=t,n.lView=i,!0}function x_(i){const t=w_(),e=i[nt];Xt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function w_(){const i=Xt.lFrame,t=null===i?null:i.child;return null===t?M_(i):t}function M_(i){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:i,child:null,inI18n:!1};return null!==i&&(i.child=t),t}function Ed(){const i=Xt.lFrame;return Xt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}const Ga=Ed;function rp(){const i=Ed();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function ts(){return Xt.lFrame.selectedIndex}function El(i){Xt.lFrame.selectedIndex=i}function pn(){const i=Xt.lFrame;return Us(i.tView,i.selectedIndex)}function Fr(){Xt.lFrame.currentNamespace=M0}function ns(){!function C_(){Xt.lFrame.currentNamespace=null}()}function Xu(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Ua]+=65536),(a>11>16&&(3&i[rn])===t){i[rn]+=2048,ao(4,a,s);try{s.call(a)}finally{ao(5,a,s)}}}else{ao(4,a,s);try{s.call(a)}finally{ao(5,a,s)}}}const Al=-1;class Ku{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function ap(i,t,e){let n=0;for(;nt){o=s-1;break}}}for(;s>16}(i),n=t;for(;e>0;)n=n[xl],e--;return n}let dp=!0;function th(i){const t=dp;return dp=i,t}const O0=255,I_=5;let F0=0;const da={};function up(i,t){const e=R_(i,t);if(-1!==e)return e;const n=t[nt];n.firstCreatePass&&(i.injectorIndex=t.length,nh(n.data,i),nh(t,null),nh(n.blueprint,null));const r=ih(i,t),s=i.injectorIndex;if(lp(r)){const o=cp(r),a=eh(r,t),l=a[nt].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=r,s}function nh(i,t){i.push(0,0,0,0,0,0,0,0,t)}function R_(i,t){return-1===i.injectorIndex||i.parent&&i.parent.injectorIndex===i.injectorIndex||null===t[i.injectorIndex+8]?-1:i.injectorIndex}function ih(i,t){if(i.parent&&-1!==i.parent.injectorIndex)return i.parent.injectorIndex;let e=0,n=null,r=t;for(;null!==r;){if(n=fp(r),null===n)return Al;if(e++,r=r[xl],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return Al}function k_(i,t,e){!function L0(i,t,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(bd)&&(n=e[bd]),null==n&&(n=e[bd]=F0++);const r=n&O0;t.data[i+(r>>I_)]|=1<=0?t&O0:z0:t}(e);if("function"==typeof s){if(!zs(t,i,n))return n&Et.Host?cn(r,0,n):N0(t,e,n,r);try{const o=s(n);if(null!=o||n&Et.Optional)return o;Fu()}finally{Ga()}}else if("number"==typeof s){let o=null,a=R_(i,t),l=Al,c=n&Et.Host?t[Pr][Xi]:null;for((-1===a||n&Et.SkipSelf)&&(l=-1===a?ih(i,t):t[a+8],l!==Al&&rh(n,!1)?(o=t[nt],a=cp(l),t=eh(l,t)):a=-1);-1!==a;){const u=t[nt];if(V0(s,a,u.data)){const h=U0(a,t,e,o,n,c);if(h!==da)return h}l=t[a+8],l!==Al&&rh(n,t[nt].data[a+8]===c)&&V0(s,a,t)?(o=u,a=cp(l),t=eh(l,t)):a=-1}}return r}function U0(i,t,e,n,r,s){const o=t[nt],a=o.data[i+8],u=hp(a,o,e,null==n?wl(a)&&dp:n!=o&&0!=(3&a.type),r&Et.Host&&s===a);return null!==u?bc(t,o,u,a):da}function hp(i,t,e,n,r){const s=i.providerIndexes,o=t.data,a=1048575&s,l=i.directiveStart,u=s>>20,p=r?a+u:i.directiveEnd;for(let m=n?a:a+u;m=l&&g.type===e)return m}if(r){const m=o[l];if(m&&oo(m)&&m.type===e)return l}return null}function bc(i,t,e,n){let r=i[e];const s=t.data;if(function Zu(i){return i instanceof Ku}(r)){const o=r;o.resolving&&function c0(i,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new he(-200,`Circular dependency in DI detected for ${i}${e}`)}(function Wn(i){return"function"==typeof i?i.name||i.toString():"object"==typeof i&&null!=i&&"function"==typeof i.type?i.type.name||i.type.toString():$t(i)}(s[e]));const a=th(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ls(o.injectImpl):null;zs(i,n,Et.Default);try{r=i[e]=o.factory(void 0,s,i,n),t.firstCreatePass&&e>=n.directiveStart&&function yc(i,t,e){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){const o=mc(t);(e.preOrderHooks??(e.preOrderHooks=[])).push(i,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(i,o)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-i,r),s&&((e.preOrderHooks??(e.preOrderHooks=[])).push(i,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(i,s))}(e,s[e],t)}finally{null!==l&&Ls(l),th(a),o.resolving=!1,Ga()}}return r}function V0(i,t,e){return!!(e[t+(i>>I_)]&1<{const t=i.prototype.constructor,e=t[Ns]||is(t),n=Object.prototype;let r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){const s=r[Ns]||is(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function is(i){return r_(i)?()=>{const t=is(wt(i));return t&&t()}:Va(i)}function fp(i){const t=i[nt],e=t.type;return 2===e?t.declTNode:1===e?i[Xi]:null}function ua(i){return function P_(i,t){if("class"===t)return i.classes;if("style"===t)return i.styles;const e=i.attrs;if(e){const n=e.length;let r=0;for(;r{const n=function sh(i){return function(...e){if(i){const n=i(...e);for(const r in n)this[r]=n[r]}}}(t);function r(...s){if(this instanceof r)return n.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,u){const h=l.hasOwnProperty(xc)?l[xc]:Object.defineProperty(l,xc,{value:[]})[xc];for(;h.length<=u;)h.push(null);return(h[u]=h[u]||[]).push(o),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}class fe{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=Ie({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function ha(i,t){i.forEach(e=>Array.isArray(e)?ha(e,t):t(e))}function Mc(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function oh(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function Id(i,t){const e=[];for(let n=0;n=0?i[1|n]=e:(n=~n,function Rd(i,t,e,n){let r=i.length;if(r==t)i.push(e,n);else if(1===r)i.push(n,i[0]),i[0]=e;else{for(r--,i.push(i[r-1],i[r]);r>t;)i[r]=i[r-2],r--;i[t]=e,i[t+1]=n}}(i,n,t,e)),n}function mp(i,t){const e=Cc(i,t);if(e>=0)return i[1|e]}function Cc(i,t){return function L_(i,t,e){let n=0,r=i.length>>e;for(;r!==n;){const s=n+(r-n>>1),o=i[s<t?r=s:n=s+1}return~(r<({token:i})),-1),ms=Nu(Rl("Optional"),8),Po=Nu(Rl("SkipSelf"),4);var rs=(()=>((rs=rs||{})[rs.Important=1]="Important",rs[rs.DashCase=2]="DashCase",rs))();const Ac=new Map;let W_=0;const q_="__ngContext__";function Nr(i,t){zi(t)?(i[q_]=t[oa],function ix(i){Ac.set(i[oa],i)}(t)):i[q_]=t}let Sp;function X_(i,t){return Sp(i,t)}function hh(i){const t=i[Ci];return hs(t)?t[Ci]:t}function K_(i){return fx(i[bi])}function Z_(i){return fx(i[ko])}function fx(i){for(;null!==i&&!hs(i);)i=i[ko];return i}function Od(i,t,e,n,r){if(null!=n){let s,o=!1;hs(n)?s=n:zi(n)&&(o=!0,n=n[ra]);const a=Oi(n);0===i&&null!==e?null==r?vx(t,e,a):Dc(t,e,a,r||null,!0):1===i&&null!==e?Dc(t,e,a,r||null,!0):2===i?function sv(i,t,e){const n=Ap(i,t);n&&function BA(i,t,e,n){i.removeChild(t,e,n)}(i,n,t,e)}(t,a,o):3===i&&t.destroyNode(a),null!=s&&function zA(i,t,e,n,r){const s=e[fc];s!==Oi(e)&&Od(t,i,n,s,r);for(let a=Jr;a0&&(i[e-1][ko]=n[ko]);const s=oh(i,Jr+t);!function RA(i,t){fh(i,t,t[Ne],2,null,null),t[ra]=null,t[Xi]=null}(n[nt],n);const o=s[sa];null!==o&&o.detachView(s[nt]),n[Ci]=null,n[ko]=null,n[rn]&=-65}return n}function mx(i,t){if(!(128&t[rn])){const e=t[Ne];e.destroyNode&&fh(i,t,e,3,null,null),function PA(i){let t=i[bi];if(!t)return tv(i[nt],i);for(;t;){let e=null;if(zi(t))e=t[bi];else{const n=t[Jr];n&&(e=n)}if(!e){for(;t&&!t[ko]&&t!==i;)zi(t)&&tv(t[nt],t),t=t[Ci];null===t&&(t=i),zi(t)&&tv(t[nt],t),e=t&&t[ko]}t=e}}(t)}}function tv(i,t){if(!(128&t[rn])){t[rn]&=-65,t[rn]|=128,function NA(i,t){let e;if(null!=i&&null!=(e=i.destroyHooks))for(let n=0;n=0?n[r=o]():n[r=-o].unsubscribe(),s+=2}else{const o=n[r=e[s+1]];e[s].call(o)}if(null!==n){for(let s=r+1;s-1){const{encapsulation:s}=i.data[n.directiveStart+r];if(s===Io.None||s===Io.Emulated)return null}return or(n,e)}}(i,t.parent,e)}function Dc(i,t,e,n,r){i.insertBefore(t,e,n,r)}function vx(i,t,e){i.appendChild(t,e)}function yx(i,t,e,n,r){null!==n?Dc(i,t,e,n,r):vx(i,t,e)}function Ap(i,t){return i.parentNode(t)}function bx(i,t,e){return wx(i,t,e)}let nv,Tp,lv,wx=function xx(i,t,e){return 40&i.type?or(i,e):null};function Dp(i,t,e,n){const r=gx(i,n,t),s=t[Ne],a=bx(n.parent||t[Xi],n,t);if(null!=r)if(Array.isArray(e))for(let l=0;li,createScript:i=>i,createScriptURL:i=>i})}catch{}return Tp}()?.createHTML(i)||i}class Tc{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${vd})`}}class Rx extends Tc{getTypeName(){return"HTML"}}class kx extends Tc{getTypeName(){return"Style"}}class YA extends Tc{getTypeName(){return"Script"}}class qA extends Tc{getTypeName(){return"URL"}}class XA extends Tc{getTypeName(){return"ResourceURL"}}function $s(i){return i instanceof Tc?i.changingThisBreaksApplicationSecurity:i}function Ws(i,t){const e=function KA(i){return i instanceof Tc&&i.getTypeName()||null}(i);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${vd})`)}return e===t}class nD{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Ld(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class iD{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const e=this.inertDocument.createElement("template");return e.innerHTML=Ld(t),e}}const sD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Ic(i){return(i=String(i)).match(sD)?i:"unsafe:"+i}function ja(i){const t={};for(const e of i.split(","))t[e]=!0;return t}function Nd(...i){const t={};for(const e of i)for(const n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}const dv=ja("area,br,col,hr,img,wbr"),Rp=ja("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),uv=ja("rp,rt"),hv=Nd(dv,Nd(Rp,ja("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")),Nd(uv,ja("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")),Nd(uv,Rp)),fv=ja("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),mh=Nd(fv,ja("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"),ja("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")),cD=ja("script,style,template");class dD{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&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(!hv.hasOwnProperty(e))return this.sanitizedSomething=!0,!cD.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let r=0;r"),!0}endElement(t){const e=t.nodeName.toLowerCase();hv.hasOwnProperty(e)&&!dv.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(Fx(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 mv=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ox=/([^\#-~ |!])/g;function Fx(i){return i.replace(/&/g,"&").replace(mv,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Ox,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let kp;function Lx(i,t){let e=null;try{kp=kp||function Px(i){const t=new iD(i);return function rD(){try{return!!(new window.DOMParser).parseFromString(Ld(""),"text/html")}catch{return!1}}()?new nD(t):t}(i);let n=t?String(t):"";e=kp.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=e.innerHTML,e=kp.getInertBodyElement(n)}while(n!==s);return Ld((new dD).sanitizeChildren(gv(e)||e))}finally{if(e){const n=gv(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function gv(i){return"content"in i&&function uD(i){return i.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===i.nodeName}(i)?i.content:null}var Hn=(()=>((Hn=Hn||{})[Hn.NONE=0]="NONE",Hn[Hn.HTML=1]="HTML",Hn[Hn.STYLE=2]="STYLE",Hn[Hn.SCRIPT=3]="SCRIPT",Hn[Hn.URL=4]="URL",Hn[Hn.RESOURCE_URL=5]="RESOURCE_URL",Hn))();function Pp(i){const t=function gh(){const i=Ee();return i&&i[Bn]}();return t?t.sanitize(Hn.URL,i)||"":Ws(i,"URL")?$s(i):Ic($t(i))}const xr=new fe("ENVIRONMENT_INITIALIZER"),Ei=new fe("INJECTOR",-1),Ux=new fe("INJECTOR_DEF_TYPES");class Ya{get(t,e=yd){if(e===yd){const n=new Error(`NullInjectorError: No provider for ${ii(t)}!`);throw n.name="NullInjectorError",n}return e}}function _D(...i){return{\u0275providers:Vx(0,i),\u0275fromNgModule:!0}}function Vx(i,...t){const e=[],n=new Set;let r;return ha(t,s=>{const o=s;_v(o,e,[],n)&&(r||(r=[]),r.push(o))}),void 0!==r&&zx(r,e),e}function zx(i,t){for(let e=0;e{t.push(s)})}}function _v(i,t,e,n){if(!(i=wt(i)))return!1;let r=null,s=s_(i);const o=!s&&zn(i);if(s||o){if(o&&!o.standalone)return!1;r=i}else{const l=i.ngModule;if(s=s_(l),!s)return!1;r=l}const a=n.has(r);if(o){if(a)return!1;if(n.add(r),o.dependencies){const l="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const c of l)_v(c,t,e,n)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;n.add(r);try{ha(s.imports,u=>{_v(u,t,e,n)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&zx(c,t)}if(!a){const c=Va(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Nn},{provide:Ux,useValue:r,multi:!0},{provide:xr,useValue:()=>J(r),multi:!0})}const l=s.providers;null==l||a||vv(l,u=>{t.push(u)})}}return r!==i&&void 0!==i.providers}function vv(i,t){for(let e of i)Hf(e)&&(e=e.\u0275providers),Array.isArray(e)?vv(e,t):t(e)}const qa=Kn({provide:String,useValue:Kn});function Op(i){return null!==i&&"object"==typeof i&&qa in i}function ei(i){return"function"==typeof i}const yv=new fe("Set Injector scope."),Fp={},vD={};let bv;function Lp(){return void 0===bv&&(bv=new Ya),bv}class Xa{}class xv extends Xa{get destroyed(){return this._destroyed}constructor(t,e,n,r){super(),this.parent=e,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Cv(t,o=>this.processProvider(o)),this.records.set(Ei,Ka(void 0,this)),r.has("environment")&&this.records.set(Xa,Ka(void 0,this));const s=this.records.get(yv);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Ux.multi,Nn,Et.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=yl(this),n=Ls(void 0);try{return t()}finally{yl(e),Ls(n)}}get(t,e=yd,n=Et.Default){this.assertNotDestroyed(),n=dc(n);const r=yl(this),s=Ls(void 0);try{if(!(n&Et.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function bD(i){return"function"==typeof i||"object"==typeof i&&i instanceof fe}(t)&&Gf(t);a=l&&this.injectableDefInScope(l)?Ka(Rc(t),Fp):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(n&Et.Self?Lp():this.parent).get(t,e=n&Et.Optional&&e===yd?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[cc]=o[cc]||[]).unshift(ii(t)),r)throw o;return function _0(i,t,e,n){const r=i[cc];throw t[Yf]&&r.unshift(t[Yf]),i.message=function l_(i,t,e,n=null){i=i&&"\n"===i.charAt(0)&&i.charAt(1)==vl?i.slice(2):i;let r=ii(t);if(Array.isArray(t))r=t.map(ii).join(" -> ");else if("object"==typeof t){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):ii(a)))}r=`{${s.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(ui,"\n ")}`}("\n"+i.message,r,e,n),i[a_]=r,i[cc]=null,i}(o,t,"R3InjectorError",this.source)}throw o}finally{Ls(s),yl(r)}}resolveInjectorInitializers(){const t=yl(this),e=Ls(void 0);try{const n=this.get(xr.multi,Nn,Et.Self);for(const r of n)r()}finally{yl(t),Ls(e)}}toString(){const t=[],e=this.records;for(const n of e.keys())t.push(ii(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new he(205,!1)}processProvider(t){let e=ei(t=wt(t))?t:wt(t&&t.provide);const n=function yD(i){return Op(i)?Ka(void 0,i.useValue):Ka(Mv(i),Fp)}(t);if(ei(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ka(void 0,Fp,!0),r.factory=()=>bl(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){return e.value===Fp&&(e.value=vD,e.value=e.factory()),"object"==typeof e.value&&e.value&&function Ud(i){return null!==i&&"object"==typeof i&&"function"==typeof i.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=wt(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Rc(i){const t=Gf(i),e=null!==t?t.factory:Va(i);if(null!==e)return e;if(i instanceof fe)throw new he(204,!1);if(i instanceof Function)return function wv(i){const t=i.length;if(t>0)throw Id(t,"?"),new he(204,!1);const e=function gr(i){return i&&(i[_l]||i[Wf])||null}(i);return null!==e?()=>e.factory(i):()=>new i}(i);throw new he(204,!1)}function Mv(i,t,e){let n;if(ei(i)){const r=wt(i);return Va(r)||Rc(r)}if(Op(i))n=()=>wt(i.useValue);else if(function fi(i){return!(!i||!i.useFactory)}(i))n=()=>i.useFactory(...bl(i.deps||[]));else if(function _h(i){return!(!i||!i.useExisting)}(i))n=()=>J(wt(i.useExisting));else{const r=wt(i&&(i.useClass||i.provide));if(!function js(i){return!!i.deps}(i))return Va(r)||Rc(r);n=()=>new r(...bl(i.deps))}return n}function Ka(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function Cv(i,t){for(const e of i)Array.isArray(e)?Cv(e,t):e&&Hf(e)?Cv(e.\u0275providers,t):t(e)}class xD{}class $x{}class on{resolveComponentFactory(t){throw function wD(i){const t=Error(`No component factory found for ${ii(i)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=i,t}(t)}}let Fl=(()=>{class i{}return i.NULL=new on,i})();function uo(){return kc(yr(),Ee())}function kc(i,t){return new lt(or(i,t))}let lt=(()=>{class i{constructor(e){this.nativeElement=e}}return i.__NG_ELEMENT_ID__=uo,i})();function jn(i){return i instanceof lt?i.nativeElement:i}class vh{}let ma=(()=>{class i{}return i.__NG_ELEMENT_ID__=()=>function Np(){const i=Ee(),e=fs(yr().index,i);return(zi(e)?e:i)[Ne]}(),i})(),MD=(()=>{class i{}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:()=>null}),i})();class Pc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const CD=new Pc("15.2.10"),Ev={},Av="ngOriginalError";function Dv(i){return i[Av]}class Za{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&&Dv(t);for(;e&&Dv(e);)e=Dv(e);return e||null}}function Qa(i){return i instanceof Function?i():i}function jx(i,t,e){let n=i.length;for(;;){const r=i.indexOf(t,e);if(-1===r)return r;if(0===r||i.charCodeAt(r-1)<=32){const s=t.length;if(r+s===n||i.charCodeAt(r+s)<=32)return r}e=r+1}}const Iv="ng-template";function OD(i,t,e){let n=0,r=!0;for(;ns?"":r[h+1].toLowerCase();const m=8&n?p:null;if(m&&-1!==jx(m,c,0)||2&n&&c!==p){if(Fo(n))return!1;o=!0}}}}else{if(!o&&!Fo(n)&&!Fo(l))return!1;if(o&&Fo(l))continue;o=!1,n=l|1&n}}return Fo(n)||o}function Fo(i){return 0==(1&i)}function LD(i,t,e,n){if(null===t)return-1;let r=0;if(n||!e){let s=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&n?r+="."+o:4&n&&(r+=" "+o);else""!==r&&!Fo(o)&&(t+=Qx(s,r),r=""),n=o,s=s||!Fo(n);e++}return""!==r&&(t+=Qx(s,r)),t}const Kt={};function $(i){Jx(Pn(),Ee(),ts()+i,!1)}function Jx(i,t,e,n){if(!n)if(3==(3&t[rn])){const s=i.preOrderCheckHooks;null!==s&&ar(t,s,e)}else{const s=i.preOrderHooks;null!==s&&Ad(t,s,0,e)}El(e)}function sw(i,t=null,e=null,n){const r=ow(i,t,e,n);return r.resolveInjectorInitializers(),r}function ow(i,t=null,e=null,n,r=new Set){const s=[e||Nn,_D(i)];return n=n||("object"==typeof i?void 0:ii(i)),new xv(s,t||Lp(),n||null,r)}let Fi=(()=>{class i{static create(e,n){if(Array.isArray(e))return sw({name:""},n,e,"");{const r=e.name??"";return sw({name:r},e.parent,e.providers,r)}}}return i.THROW_IF_NOT_FOUND=yd,i.NULL=new Ya,i.\u0275prov=Ie({token:i,providedIn:"any",factory:()=>J(Ei)}),i.__NG_ELEMENT_ID__=-1,i})();function A(i,t=Et.Default){const e=Ee();return null===e?J(i,t):B0(yr(),e,wt(i),t)}function ho(){throw new Error("invalid")}function zp(i,t){const e=i.contentQueries;if(null!==e)for(let n=0;nQn&&Jx(i,t,Qn,!1),ao(o?2:0,r),e(n,r)}finally{El(s),ao(o?3:1,r)}}function bh(i,t,e){if(Qf(t)){const r=t.directiveEnd;for(let s=t.directiveStart;s0;){const e=i[--t];if("number"==typeof e&&e<0)return e}return 0})(o)!=a&&o.push(a),o.push(e,n,s)}}(i,t,n,yh(i,e,r.hostVars,Kt),r)}function me(i,t,e,n,r,s){const o=or(i,t);!function be(i,t,e,n,r,s,o){if(null==s)i.removeAttribute(t,r,e);else{const a=null==o?$t(s):o(s,n||"",r);i.setAttribute(t,r,a,e)}}(t[Ne],o,s,i.value,e,n,r)}function De(i,t,e,n,r,s){const o=s[t];if(null!==o){const a=n.setInput;for(let l=0;l0&&mn(e)}}function mn(i){for(let n=K_(i);null!==n;n=Z_(n))for(let r=Jr;r0&&mn(s)}const e=i[nt].components;if(null!==e)for(let n=0;n0&&mn(r)}}function In(i,t){const e=fs(t,i),n=e[nt];(function Xs(i,t){for(let e=t.length;e-1&&(ev(t,n),oh(e,n))}this._attachedToViewContainer=!1}mx(this._lView[nt],this._lView)}onDestroy(t){mw(this._lView[nt],this._lView,null,t)}markForCheck(){Ur(this._cdRefInjectingView||this._lView)}detach(){this._lView[rn]&=-65}reattach(){this._lView[rn]|=64}detectChanges(){pi(this._lView[nt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new he(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function kA(i,t){fh(i,t,t[Ne],2,null,null)}(this._lView[nt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new he(902,!1);this._appRef=t}}class L8 extends Uv{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;pi(t[nt],t,t[oe],!1)}checkNoChanges(){}get context(){return null}}class KO extends Fl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=zn(t);return new Vv(e,this.ngModule)}}function ZO(i){const t=[];for(let e in i)i.hasOwnProperty(e)&&t.push({propName:i[e],templateName:e});return t}class B8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=dc(n);const r=this.injector.get(t,Ev,n);return r!==Ev||e===Ev?r:this.parentInjector.get(t,e,n)}}class Vv extends $x{get inputs(){return ZO(this.componentDef.inputs)}get outputs(){return ZO(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function Vd(i){return i.map(UD).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,n,r){let s=(r=r||this.ngModule)instanceof Xa?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new B8(t,s):t,a=o.get(vh,null);if(null===a)throw new he(407,!1);const l=o.get(MD,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",h=n?function o1(i,t,e){return i.selectRootElement(t,e===Io.ShadowDom)}(c,n,this.componentDef.encapsulation):J_(c,u,function N8(i){const t=i.toLowerCase();return"svg"===t?M0:"math"===t?"math":null}(u)),p=this.componentDef.onPush?288:272,m=Nv(0,null,null,1,0,null,null,null,null,null),g=Hp(null,m,null,p,null,null,a,c,l,o,null);let b,v;x_(g);try{const y=this.componentDef;let M,x=null;y.findHostDirectiveDefs?(M=[],x=new Map,y.findHostDirectiveDefs(y,M,x),M.push(y)):M=[y];const C=function V8(i,t){const e=i[nt],n=Qn;return i[n]=t,Hd(e,n,2,"#host",null)}(g,h),O=function z8(i,t,e,n,r,s,o,a){const l=r[nt];!function H8(i,t,e,n){for(const r of i)t.mergedAttrs=Ju(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(yw(t,t.mergedAttrs,!0),null!==e&&ph(n,e,t))}(n,i,t,o);const c=s.createRenderer(t,e),u=Hp(r,pw(e),null,e.onPush?32:16,r[i.index],i,s,c,a||null,null,null);return l.firstCreatePass&&w(l,i,n.length-1),lr(r,u),r[i.index]=u}(C,h,y,M,g,a,c);v=Us(m,Qn),h&&function $8(i,t,e,n){if(n)ap(i,e,["ng-version",CD.full]);else{const{attrs:r,classes:s}=function VD(i){const t=[],e=[];let n=1,r=2;for(;n0&&Ex(i,e,s.join(" "))}}(c,y,h,n),void 0!==e&&function W8(i,t,e){const n=i.projection=[];for(let r=0;r=0;n--){const r=i[n];r.hostVars=t+=r.hostVars,r.hostAttrs=Ju(r.hostAttrs,e=Ju(e,r.hostAttrs))}}(n)}function _1(i){return i===Ro?{}:i===Nn?[]:i}function q8(i,t){const e=i.viewQuery;i.viewQuery=e?(n,r)=>{t(n,r),e(n,r)}:t}function X8(i,t){const e=i.contentQueries;i.contentQueries=e?(n,r,s)=>{t(n,r,s),e(n,r,s)}:t}function K8(i,t){const e=i.hostBindings;i.hostBindings=e?(n,r)=>{t(n,r),e(n,r)}:t}function xw(i){return!!v1(i)&&(Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i)}function v1(i){return null!==i&&("function"==typeof i||"object"==typeof i)}function Nl(i,t,e){return i[t]=e}function _s(i,t,e){return!Object.is(i[t],e)&&(i[t]=e,!0)}function xh(i,t,e,n){const r=_s(i,t,e);return _s(i,t+1,n)||r}function At(i,t,e,n){const r=Ee();return _s(r,Cd(),t)&&(Pn(),me(pn(),r,i,t,e,n)),At}function Yp(i,t,e,n){return _s(i,Cd(),e)?t+$t(e)+n:Kt}function qp(i,t,e,n,r,s){const a=xh(i,function la(){return Xt.lFrame.bindingIndex}(),e,r);return Ha(2),a?t+$t(e)+n+$t(r)+s:Kt}function _e(i,t,e,n,r,s,o,a){const l=Ee(),c=Pn(),u=i+Qn,h=c.firstCreatePass?function o$(i,t,e,n,r,s,o,a,l){const c=t.consts,u=Hd(t,i,4,o||null,Ml(c,a));Bv(t,e,u,Ml(c,l)),Xu(t,u);const h=u.tView=Nv(2,u,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,u),h.queries=t.queries.embeddedTView(u)),u}(u,c,l,t,e,n,r,s,o):c.data[u];aa(h,!1);const p=l[Ne].createComment("");Dp(c,l,p,h),Nr(p,l),lr(l,l[u]=ct(p,l,p,h)),Vu(h)&&Fv(c,l,h),null!=o&&Lv(l,h,a)}function cr(i){return sn(function iA(){return Xt.lFrame.contextLView}(),Qn+i)}function z(i,t,e){const n=Ee();return _s(n,Cd(),t)&&qs(Pn(),pn(),n,i,t,n[Ne],e,!1),z}function y1(i,t,e,n,r){const o=r?"class":"style";g1(i,e,t.inputs[o],o,n)}function j(i,t,e,n){const r=Ee(),s=Pn(),o=Qn+i,a=r[Ne],l=s.firstCreatePass?function l$(i,t,e,n,r,s){const o=t.consts,l=Hd(t,i,2,n,Ml(o,r));return Bv(t,e,l,Ml(o,s)),null!==l.attrs&&yw(l,l.attrs,!1),null!==l.mergedAttrs&&yw(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(o,s,r,t,e,n):s.data[o],c=r[o]=J_(a,t,function op(){return Xt.lFrame.currentNamespace}()),u=Vu(l);return aa(l,!0),ph(a,c,l),32!=(32&l.flags)&&Dp(s,r,c,l),0===function JE(){return Xt.lFrame.elementDepthCount}()&&Nr(c,r),function eA(){Xt.lFrame.elementDepthCount++}(),u&&(Fv(s,r,l),bh(s,l,r)),null!==n&&Lv(r,l),j}function q(){let i=yr();Vs()?__():(i=i.parent,aa(i,!1));const t=i;!function tA(){Xt.lFrame.elementDepthCount--}();const e=Pn();return e.firstCreatePass&&(Xu(e,i),Qf(i)&&e.queries.elementEnd(i)),null!=t.classesWithoutHost&&function Qu(i){return 0!=(8&i.flags)}(t)&&y1(e,t,Ee(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function lA(i){return 0!=(16&i.flags)}(t)&&y1(e,t,Ee(),t.stylesWithoutHost,!1),q}function ke(i,t,e,n){return j(i,t,e,n),q(),ke}function fo(i,t,e){const n=Ee(),r=Pn(),s=i+Qn,o=r.firstCreatePass?function c$(i,t,e,n,r){const s=t.consts,o=Ml(s,n),a=Hd(t,i,8,"ng-container",o);return null!==o&&yw(a,o,!0),Bv(t,e,a,Ml(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(s,r,n,t,e):r.data[s];aa(o,!0);const a=n[s]=n[Ne].createComment("");return Dp(r,n,a,o),Nr(a,n),Vu(o)&&(Fv(r,n,o),bh(r,o,n)),null!=e&&Lv(n,o),fo}function po(){let i=yr();const t=Pn();return Vs()?__():(i=i.parent,aa(i,!1)),t.firstCreatePass&&(Xu(t,i),Qf(i)&&t.queries.elementEnd(i)),po}function Hv(i,t,e){return fo(i,t,e),po(),Hv}function xi(){return Ee()}function Gv(i){return!!i&&"function"==typeof i.then}function uF(i){return!!i&&"function"==typeof i.subscribe}const b1=uF;function ze(i,t,e,n){const r=Ee(),s=Pn(),o=yr();return hF(s,r,r[Ne],o,i,t,n),ze}function x1(i,t){const e=yr(),n=Ee(),r=Pn();return hF(r,n,qO(b_(r.data),e,n),e,i,t),x1}function hF(i,t,e,n,r,s,o){const a=Vu(n),c=i.firstCreatePass&&YO(i),u=t[oe],h=jO(t);let p=!0;if(3&n.type||o){const b=or(n,t),v=o?o(b):b,y=h.length,M=o?C=>o(Oi(C[n.index])):n.index;let x=null;if(!o&&a&&(x=function d$(i,t,e,n){const r=i.cleanup;if(null!=r)for(let s=0;sl?a[l]:null}"string"==typeof o&&(s+=2)}return null}(i,t,r,n.index)),null!==x)(x.__ngLastListenerFn__||x).__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,p=!1;else{s=pF(n,t,u,s,!1);const C=e.listen(v,r,s);h.push(s,C),c&&c.push(r,M,y,y+1)}}else s=pF(n,t,u,s,!1);const m=n.outputs;let g;if(p&&null!==m&&(g=m[r])){const b=g.length;if(b)for(let v=0;v-1?fs(i.index,t):t);let l=fF(t,e,n,o),c=s.__ngNextListenerFn__;for(;c;)l=fF(t,e,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function ye(i=1){return function sA(i){return(Xt.lFrame.contextLView=function sp(i,t){for(;i>0;)t=t[xl],i--;return t}(i,Xt.lFrame.contextLView))[oe]}(i)}function u$(i,t){let e=null;const n=function Kx(i){const t=i.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(i);for(let r=0;r>17&32767}function C1(i){return 2|i}function wh(i){return(131068&i)>>2}function S1(i,t){return-131069&i|t<<2}function E1(i){return 1|i}function MF(i,t,e,n,r){const s=i[e+1],o=null===t;let a=n?Gd(s):wh(s),l=!1;for(;0!==a&&(!1===l||o);){const u=i[a+1];_$(i[a],t)&&(l=!0,i[a+1]=n?E1(u):C1(u)),a=n?Gd(u):wh(u)}l&&(i[e+1]=n?C1(s):E1(s))}function _$(i,t){return null===i||null==t||(Array.isArray(i)?i[1]:i)===t||!(!Array.isArray(i)||"string"!=typeof t)&&Cc(i,t)>=0}const Mr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function CF(i){return i.substring(Mr.key,Mr.keyEnd)}function SF(i,t){const e=Mr.textEnd;return e===t?-1:(t=Mr.keyEnd=function x$(i,t,e){for(;t32;)t++;return t}(i,Mr.key=t,e),tm(i,t,e))}function tm(i,t,e){for(;t=0;e=SF(t,e))Hs(i,CF(t),!0)}function Ja(i,t,e,n){const r=Ee(),s=Pn(),o=Ha(2);s.firstUpdatePass&&RF(s,i,o,n),t!==Kt&&_s(r,o,t)&&PF(s,s.data[ts()],r,r[Ne],i,r[o+1]=function P$(i,t){return null==i||""===i||("string"==typeof t?i+=t:"object"==typeof i&&(i=ii($s(i)))),i}(t,e),n,o)}function IF(i,t){return t>=i.expandoStartIndex}function RF(i,t,e,n){const r=i.data;if(null===r[e+1]){const s=r[ts()],o=IF(i,e);FF(s,n)&&null===t&&!o&&(t=!1),t=function E$(i,t,e,n){const r=b_(i);let s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(e=$v(e=A1(null,i,t,e,n),t.attrs,n),s=null);else{const o=t.directiveStylingLast;if(-1===o||i[o]!==r)if(e=A1(r,i,t,e,n),null===s){let l=function A$(i,t,e){const n=e?t.classBindings:t.styleBindings;if(0!==wh(n))return i[Gd(n)]}(i,t,n);void 0!==l&&Array.isArray(l)&&(l=A1(null,i,t,l[1],n),l=$v(l,t.attrs,n),function D$(i,t,e,n){i[Gd(e?t.classBindings:t.styleBindings)]=n}(i,t,n,l))}else s=function T$(i,t,e){let n;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(c=!0)):u=e,r)if(0!==l){const p=Gd(i[a+1]);i[n+1]=Mw(p,a),0!==p&&(i[p+1]=S1(i[p+1],n)),i[a+1]=function f$(i,t){return 131071&i|t<<17}(i[a+1],n)}else i[n+1]=Mw(a,0),0!==a&&(i[a+1]=S1(i[a+1],n)),a=n;else i[n+1]=Mw(l,0),0===a?a=n:i[l+1]=S1(i[l+1],n),l=n;c&&(i[n+1]=C1(i[n+1])),MF(i,u,n,!0),MF(i,u,n,!1),function g$(i,t,e,n,r){const s=r?i.residualClasses:i.residualStyles;null!=s&&"string"==typeof t&&Cc(s,t)>=0&&(e[n+1]=E1(e[n+1]))}(t,u,i,n,s),o=Mw(a,l),s?t.classBindings=o:t.styleBindings=o}(r,s,t,e,o,n)}}function A1(i,t,e,n,r){let s=null;const o=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=i[r],c=Array.isArray(l),u=c?l[1]:l,h=null===u;let p=e[r+1];p===Kt&&(p=h?Nn:void 0);let m=h?mp(p,n):u===n?p:void 0;if(c&&!Cw(m)&&(m=mp(l,n)),Cw(m)&&(a=m,o))return a;const g=i[r+1];r=o?Gd(g):wh(g)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=mp(l,n))}return a}function Cw(i){return void 0!==i}function FF(i,t){return 0!=(i.flags&(t?8:16))}function Ye(i,t=""){const e=Ee(),n=Pn(),r=i+Qn,s=n.firstCreatePass?Hd(n,r,1,t,null):n.data[r],o=e[r]=function Q_(i,t){return i.createText(t)}(e[Ne],t);Dp(n,e,o,s),aa(s,!1)}function $i(i){return Zi("",i,""),$i}function Zi(i,t,e){const n=Ee(),r=Yp(n,i,t,e);return r!==Kt&&Oc(n,ts(),r),Zi}function nm(i,t,e,n,r){const s=Ee(),o=qp(s,i,t,e,n,r);return o!==Kt&&Oc(s,ts(),o),nm}function GF(i,t,e){!function el(i,t,e,n){const r=Pn(),s=Ha(2);r.firstUpdatePass&&RF(r,null,s,n);const o=Ee();if(e!==Kt&&_s(o,s,e)){const a=r.data[ts()];if(FF(a,n)&&!IF(r,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=i_(l,e||"")),y1(r,a,o,e,n)}else!function k$(i,t,e,n,r,s,o,a){r===Kt&&(r=Nn);let l=0,c=0,u=0((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 rm="en-US";let tL=rm;function I1(i,t,e,n,r){if(i=wt(i),Array.isArray(i))for(let s=0;s>20;if(ei(i)||!i.multi){const m=new Ku(l,r,A),g=k1(a,t,r?u:u+p,h);-1===g?(k_(up(c,o),s,a),R1(s,i,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(m),o.push(m)):(e[g]=m,o[g]=m)}else{const m=k1(a,t,u+p,h),g=k1(a,t,u,u+p),v=g>=0&&e[g];if(r&&!v||!r&&!(m>=0&&e[m])){k_(up(c,o),s,a);const y=function KW(i,t,e,n,r){const s=new Ku(i,e,A);return s.multi=[],s.index=t,s.componentProviders=0,EL(s,r,n&&!e),s}(r?XW:qW,e.length,r,n,l);!r&&v&&(e[g].providerFactory=y),R1(s,i,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),o.push(y)}else R1(s,i,m>-1?m:g,EL(e[r?g:m],l,!r&&n));!r&&n&&v&&e[g].componentProviders++}}}function R1(i,t,e,n){const r=ei(t),s=function Gx(i){return!!i.useClass}(t);if(r||s){const l=(s?wt(t.useClass):t).prototype.ngOnDestroy;if(l){const c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(e);-1===u?c.push(e,[n,l]):c[u+1].push(n,l)}else c.push(e,l)}}}function EL(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function k1(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>function YW(i,t,e){const n=Pn();if(n.firstCreatePass){const r=oo(i);I1(e,n.data,n.blueprint,r,!0),I1(t,n.data,n.blueprint,r,!1)}}(n,r?r(i):i,t)}}class sm{}class AL{}class DL extends sm{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new KO(this);const n=Bs(t);this._bootstrapComponents=Qa(n.bootstrap),this._r3Injector=ow(t,e,[{provide:sm,useValue:this},{provide:Fl,useValue:this.componentFactoryResolver}],ii(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 O1 extends AL{constructor(t){super(),this.moduleType=t}create(t){return new DL(this.moduleType,t)}}class QW extends sm{constructor(t,e,n){super(),this.componentFactoryResolver=new KO(this),this.instance=null;const r=new xv([...t,{provide:sm,useValue:this},{provide:Fl,useValue:this.componentFactoryResolver}],e||Lp(),n,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function Iw(i,t,e=null){return new QW(i,t,e).injector}let JW=(()=>{class i{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const n=Vx(0,e.type),r=n.length>0?Iw([n],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 i.\u0275prov=Ie({token:i,providedIn:"environment",factory:()=>new i(J(Xa))}),i})();function F1(i){i.getStandaloneInjector=t=>t.get(JW).getOrCreateStandaloneInjector(i)}function Zs(i,t,e){const n=es()+i,r=Ee();return r[n]===Kt?Nl(r,n,e?t.call(e):t()):function zv(i,t){return i[t]}(r,n)}function om(i,t,e,n){return LL(Ee(),es(),i,t,e,n)}function FL(i,t,e,n,r,s,o){return function UL(i,t,e,n,r,s,o,a,l){const c=t+e;return function _a(i,t,e,n,r,s){const o=xh(i,t,e,n);return xh(i,t+2,r,s)||o}(i,c,r,s,o,a)?Nl(i,c+4,l?n.call(l,r,s,o,a):n(r,s,o,a)):Kv(i,c+4)}(Ee(),es(),i,t,e,n,r,s,o)}function Kv(i,t){const e=i[t];return e===Kt?void 0:e}function LL(i,t,e,n,r,s){const o=t+e;return _s(i,o,r)?Nl(i,o+1,s?n.call(s,r):n(r)):Kv(i,o+1)}function Ht(i,t){const e=Pn();let n;const r=i+Qn;e.firstCreatePass?(n=function g6(i,t){if(t)for(let e=t.length-1;e>=0;e--){const n=t[e];if(i===n.name)return n}}(t,e.pipeRegistry),e.data[r]=n,n.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,n.onDestroy)):n=e.data[r];const s=n.factory||(n.factory=Va(n.type)),o=Ls(A);try{const a=th(!1),l=s();return th(a),function a$(i,t,e,n){e>=i.data.length&&(i.data[e]=null,i.blueprint[e]=null),t[e]=n}(e,Ee(),r,l),l}finally{Ls(o)}}function Zt(i,t,e){const n=i+Qn,r=Ee(),s=sn(r,n);return Zv(r,n)?LL(r,es(),t,s.transform,e,s):s.transform(e)}function N1(i,t,e,n){const r=i+Qn,s=Ee(),o=sn(s,r);return Zv(s,r)?function NL(i,t,e,n,r,s,o){const a=t+e;return xh(i,a,r,s)?Nl(i,a+2,o?n.call(o,r,s):n(r,s)):Kv(i,a+2)}(s,es(),t,o.transform,e,n,o):o.transform(e,n)}function Zv(i,t){return i[nt].data[t].pure}function B1(i){return t=>{setTimeout(i,void 0,t)}}const Ve=class b6 extends Fe{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let r=t,s=e||(()=>null),o=n;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),s=l.error?.bind(l),o=l.complete?.bind(l)}this.__isAsync&&(s=B1(s),r&&(r=B1(r)),o&&(o=B1(o)));const a=super.subscribe({next:r,error:s,complete:o});return t instanceof Yt&&t.add(a),a}};function x6(){return this._results[Symbol.iterator]()}class am{get changes(){return this._changes||(this._changes=new Ve)}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=am.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=x6)}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 n=this;n.dirty=!1;const r=function co(i){return i.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function pA(i,t,e){if(i.length!==t.length)return!1;for(let n=0;n{class i{}return i.__NG_ELEMENT_ID__=C6,i})();const w6=mo,M6=class extends w6{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t,e){const n=this._declarationTContainer.tView,r=Hp(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null,e||null);r[Or]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[sa];return null!==o&&(r[sa]=o.createEmbeddedView(n)),Ov(n,r,t),new Uv(r)}};function C6(){return Rw(yr(),Ee())}function Rw(i,t){return 4&i.type?new M6(t,i,kc(i,t)):null}let Vr=(()=>{class i{}return i.__NG_ELEMENT_ID__=S6,i})();function S6(){return GL(yr(),Ee())}const E6=Vr,zL=class extends E6{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return kc(this._hostTNode,this._hostLView)}get injector(){return new Dl(this._hostTNode,this._hostLView)}get parentInjector(){const t=ih(this._hostTNode,this._hostLView);if(lp(t)){const e=eh(t,this._hostLView),n=cp(t);return new Dl(e[nt].data[n+8],e)}return new Dl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=HL(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Jr}createEmbeddedView(t,e,n){let r,s;"number"==typeof n?r=n:null!=n&&(r=n.index,s=n.injector);const o=t.createEmbeddedView(e||{},s);return this.insert(o,r),o}createComponent(t,e,n,r,s){const o=t&&!function ps(i){return"function"==typeof i}(t);let a;if(o)a=e;else{const h=e||{};a=h.index,n=h.injector,r=h.projectableNodes,s=h.environmentInjector||h.ngModuleRef}const l=o?t:new Vv(zn(t)),c=n||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get(Xa,null);p&&(s=p)}const u=l.create(c,r,void 0,s);return this.insert(u.hostView,a),u}insert(t,e){const n=t._lView,r=n[nt];if(function _c(i){return hs(i[Ci])}(n)){const u=this.indexOf(t);if(-1!==u)this.detach(u);else{const h=n[Ci],p=new zL(h,h[Xi],h[Ci]);p.detach(p.indexOf(t))}}const s=this._adjustIndex(e),o=this._lContainer;!function OA(i,t,e,n){const r=Jr+n,s=e.length;n>0&&(e[r-1][ko]=t),n0)n.push(o[a/2]);else{const c=s[a+1],u=t[-l];for(let h=Jr;h{class i{constructor(e){this.appInits=e,this.resolve=Pw,this.reject=Pw,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{s.subscribe({complete:a,error:l})});e.push(o)}}Promise.all(e).then(()=>{n()}).catch(r=>{this.reject(r)}),0===e.length&&n(),this.initialized=!0}}return i.\u0275fac=function(e){return new(e||i)(J(Ow,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dm=new fe("AppId",{providedIn:"root",factory:function f2(){return`${K1()}${K1()}${K1()}`}});function K1(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const p2=new fe("Platform Initializer"),Z1=new fe("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Cr=new fe("AnimationModuleType");let Q6=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const zl=new fe("LocaleId",{providedIn:"root",factory:()=>Nt(zl,Et.Optional|Et.SkipSelf)||function J6(){return typeof $localize<"u"&&$localize.locale||rm}()});class tj{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let m2=(()=>{class i{compileModuleSync(e){return new O1(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),s=Qa(Bs(e).declarations).reduce((o,a)=>{const l=zn(a);return l&&o.push(new Vv(l)),o},[]);return new tj(n,s)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const rj=(()=>Promise.resolve(0))();function Q1(i){typeof Zone>"u"?rj.then(()=>{i&&i.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",i)}class ot{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ve(!1),this.onMicrotaskEmpty=new Ve(!1),this.onStable=new Ve(!1),this.onError=new Ve(!1),typeof Zone>"u")throw new he(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=!n&&e,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function sj(){let i=Cn.requestAnimationFrame,t=Cn.cancelAnimationFrame;if(typeof Zone<"u"&&i&&t){const e=i[Zone.__symbol__("OriginalDelegate")];e&&(i=e);const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n)}return{nativeRequestAnimationFrame:i,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function lj(i){const t=()=>{!function aj(i){i.isCheckStableRunning||-1!==i.lastRequestAnimationFrameId||(i.lastRequestAnimationFrameId=i.nativeRequestAnimationFrame.call(Cn,()=>{i.fakeTopEventTask||(i.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{i.lastRequestAnimationFrameId=-1,eT(i),i.isCheckStableRunning=!0,J1(i),i.isCheckStableRunning=!1},void 0,()=>{},()=>{})),i.fakeTopEventTask.invoke()}),eT(i))}(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,r,s,o,a)=>{try{return v2(i),e.invokeTask(r,s,o,a)}finally{(i.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||i.shouldCoalesceRunChangeDetection)&&t(),y2(i)}},onInvoke:(e,n,r,s,o,a,l)=>{try{return v2(i),e.invoke(r,s,o,a,l)}finally{i.shouldCoalesceRunChangeDetection&&t(),y2(i)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(i._hasPendingMicrotasks=s.microTask,eT(i),J1(i)):"macroTask"==s.change&&(i.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,r,s)=>(e.handleError(r,s),i.runOutsideAngular(()=>i.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ot.isInAngularZone())throw new he(909,!1)}static assertNotInAngularZone(){if(ot.isInAngularZone())throw new he(909,!1)}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,t,oj,Pw,Pw);try{return s.runTask(o,e,n)}finally{s.cancelTask(o)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}const oj={};function J1(i){if(0==i._nesting&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function eT(i){i.hasPendingMicrotasks=!!(i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&-1!==i.lastRequestAnimationFrameId)}function v2(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function y2(i){i._nesting--,J1(i)}class cj{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ve,this.onMicrotaskEmpty=new Ve,this.onStable=new Ve,this.onError=new Ve}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}const b2=new fe(""),Lw=new fe("");let iT,tT=(()=>{class i{constructor(e,n,r){this._ngZone=e,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,iT||(function dj(i){iT=i}(r),r.addToWindow(n)),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:()=>{ot.assertNotInAngularZone(),Q1(()=>{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())Q1(()=>{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(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.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,n,r){let s=-1;n&&n>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:s,updateCb:r})}whenStable(e,n,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,n,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,r){return[]}}return i.\u0275fac=function(e){return new(e||i)(J(ot),J(nT),J(Lw))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),nT=(()=>{class i{constructor(){this._applications=new Map}registerApplication(e,n){this._applications.set(e,n)}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,n=!0){return iT?.findTestabilityInTree(this,e,n)??null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();const Lc=!1;let $d=null;const x2=new fe("AllowMultipleToken"),rT=new fe("PlatformDestroyListeners"),w2=new fe("appBootstrapListener");class M2{constructor(t,e){this.name=t,this.token=e}}function S2(i,t,e=[]){const n=`Platform: ${t}`,r=new fe(n);return(s=[])=>{let o=sT();if(!o||o.injector.get(x2,!1)){const a=[...e,...s,{provide:r,useValue:!0}];i?i(a):function fj(i){if($d&&!$d.get(x2,!1))throw new he(400,!1);$d=i;const t=i.get(A2);(function C2(i){const t=i.get(p2,null);t&&t.forEach(e=>e())})(i)}(function E2(i=[],t){return Fi.create({name:t,providers:[{provide:yv,useValue:"platform"},{provide:rT,useValue:new Set([()=>$d=null])},...i]})}(a,n))}return function mj(i){const t=sT();if(!t)throw new he(401,!1);return t}()}}function sT(){return $d?.get(A2)??null}let A2=(()=>{class i{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=function T2(i,t){let e;return e="noop"===i?new cj:("zone.js"===i?void 0:i)||new ot(t),e}(n?.ngZone,function D2(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!i||!i.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!i||!i.ngZoneRunCoalescing)||!1}}(n)),s=[{provide:ot,useValue:r}];return r.run(()=>{const o=Fi.create({providers:s,parent:this.injector,name:e.moduleType.name}),a=e.create(o),l=a.injector.get(Za,null);if(!l)throw new he(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Nw(this._modules,a),c.unsubscribe()})}),function I2(i,t,e){try{const n=e();return Gv(n)?n.catch(r=>{throw t.runOutsideAngular(()=>i.handleError(r)),r}):n}catch(n){throw t.runOutsideAngular(()=>i.handleError(n)),n}}(l,r,()=>{const c=a.injector.get(Fw);return c.runInitializers(),c.donePromise.then(()=>(function nL(i){ro(i,"Expected localeId to be defined"),"string"==typeof i&&(tL=i.toLowerCase().replace(/_/g,"-"))}(a.injector.get(zl,rm)||rm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,n=[]){const r=R2({},n);return function uj(i,t,e){const n=new O1(e);return Promise.resolve(n)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const n=e.injector.get(um);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new he(-403,!1);e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new he(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(rT,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return i.\u0275fac=function(e){return new(e||i)(J(Fi))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"platform"}),i})();function R2(i,t){return Array.isArray(t)?t.reduce(R2,i):{...i,...t}}let um=(()=>{class i{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,n,r){this._zone=e,this._injector=n,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 s=new En(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new En(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ot.assertNotInAngularZone(),Q1(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{ot.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Rr(s,o.pipe(Pu()))}bootstrap(e,n){const r=e instanceof $x;if(!this._injector.get(Fw).done){!r&&function wd(i){const t=zn(i)||yi(i)||_r(i);return null!==t&&t.standalone}(e);throw new he(405,Lc)}let o;o=r?e:this._injector.get(Fl).resolveComponentFactory(e),this.componentTypes.push(o.componentType);const a=function hj(i){return i.isBoundToModule}(o)?void 0:this._injector.get(sm),c=o.create(Fi.NULL,[],n||o.selector,a),u=c.location.nativeElement,h=c.injector.get(b2,null);return h?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Nw(this.components,c),h?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new he(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 n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;Nw(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(w2,[]);n.push(...this._bootstrapListeners),n.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),()=>Nw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new he(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return i.\u0275fac=function(e){return new(e||i)(J(ot),J(Xa),J(Za))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Nw(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}let ri=(()=>{class i{}return i.__NG_ELEMENT_ID__=_j,i})();function _j(i){return function vj(i,t,e){if(wl(i)&&!e){const n=fs(i.index,t);return new Uv(n,n)}return 47&i.type?new Uv(t[Pr],t):null}(yr(),Ee(),16==(16&i))}class L2{constructor(){}supports(t){return xw(t)}create(t){return new Cj(t)}}const Mj=(i,t)=>t;class Cj{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||Mj}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,r=0,s=null;for(;e||n;){const o=!n||e&&e.currentIndex{o=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,o)?(n&&(e=this._verifyReinsertion(e,a,o,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,o,r),n=!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,n,r){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,r)):t=this._addAfter(new Sj(e,n),s,r),t}_verifyReinsertion(t,e,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,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,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,s=t._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){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 N2),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._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 N2),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 Sj{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 Ej{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 n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class N2{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Ej,this.map.set(e,n)),n.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 B2(i,t,e){const n=i.previousIndex;if(null===n)return n;let r=0;return e&&n{if(e&&e.key===r)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{const s=this._getOrCreateRecordForKey(r,n);e=this._insertBeforeOrAppend(e,s)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;null!==n;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._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 s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const n=new Dj(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_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(n=>e(t[n],n))}}class Dj{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 V2(){return new Vw([new L2])}let Vw=(()=>{class i{constructor(e){this.factories=e}static create(e,n){if(null!=n){const r=n.factories.slice();e=e.concat(r)}return new i(e)}static extend(e){return{provide:i,useFactory:n=>i.create(e,n||V2()),deps:[[i,new Po,new ms]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new he(901,!1)}}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:V2}),i})();function z2(){return new Jv([new U2])}let Jv=(()=>{class i{constructor(e){this.factories=e}static create(e,n){if(n){const r=n.factories.slice();e=e.concat(r)}return new i(e)}static extend(e){return{provide:i,useFactory:n=>i.create(e,n||z2()),deps:[[i,new Po,new ms]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new he(901,!1)}}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:z2}),i})();const Rj=S2(null,"core",[]);let kj=(()=>{class i{constructor(e){}}return i.\u0275fac=function(e){return new(e||i)(J(um))},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();let dT=null;function Nc(){return dT}class Fj{}const Ut=new fe("DocumentToken");let uT=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return function Lj(){return J(H2)}()},providedIn:"platform"}),i})();const Nj=new fe("Location Initialized");let H2=(()=>{class i extends uT{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Nc().getBaseHref(this._doc)}onPopState(e){const n=Nc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=Nc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.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,n,r){G2()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){G2()?this._history.replaceState(e,n,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 i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:function(){return function Bj(){return new H2(J(Ut))}()},providedIn:"platform"}),i})();function G2(){return!!window.history.pushState}function hT(i,t){if(0==i.length)return t;if(0==t.length)return i;let e=0;return i.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?i+t.substring(1):1==e?i+t:i+"/"+t}function $2(i){const t=i.match(/#|\?|$/),e=t&&t.index||i.length;return i.slice(0,e-("/"===i[e-1]?1:0))+i.slice(e)}function Bc(i){return i&&"?"!==i[0]?"?"+i:i}let Sh=(()=>{class i{historyGo(e){throw new Error("Not implemented")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Nt(j2)},providedIn:"root"}),i})();const W2=new fe("appBaseHref");let j2=(()=>{class i extends Sh{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Nt(Ut).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 hT(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+Bc(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,s){const o=this.prepareExternalUrl(r+Bc(s));this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){const o=this.prepareExternalUrl(r+Bc(s));this._platformLocation.replaceState(e,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return i.\u0275fac=function(e){return new(e||i)(J(uT),J(W2,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Uj=(()=>{class i extends Sh{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}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 n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=hT(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,s){let o=this.prepareExternalUrl(r+Bc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,r,s){let o=this.prepareExternalUrl(r+Bc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return i.\u0275fac=function(e){return new(e||i)(J(uT),J(W2,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),ey=(()=>{class i{constructor(e){this._subject=new Ve,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function Hj(i){if(new RegExp("^(https?:)?//").test(i)){const[,e]=i.split(/\/\/[^\/]+/);return e}return i}($2(Y2(n))),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,n=""){return this.path()==this.normalize(e+Bc(n))}normalize(e){return i.stripTrailingSlash(function zj(i,t){if(!i||!t.startsWith(i))return t;const e=t.substring(i.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,Y2(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",r=null){this._locationStrategy.pushState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Bc(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Bc(n)),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(n=>{this._notifyUrlChangeListeners(n.url,n.state)})),()=>{const n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(r=>r(e,n))}subscribe(e,n,r){return this._subject.subscribe({next:e,error:n,complete:r})}}return i.normalizeQueryParams=Bc,i.joinWithSlash=hT,i.stripTrailingSlash=$2,i.\u0275fac=function(e){return new(e||i)(J(Sh))},i.\u0275prov=Ie({token:i,factory:function(){return function Vj(){return new ey(J(Sh))}()},providedIn:"root"}),i})();function Y2(i){return i.replace(/\/index.html$/,"")}var go=(()=>((go=go||{})[go.Decimal=0]="Decimal",go[go.Percent=1]="Percent",go[go.Currency=2]="Currency",go[go.Scientific=3]="Scientific",go))(),Ot=(()=>((Ot=Ot||{})[Ot.Decimal=0]="Decimal",Ot[Ot.Group=1]="Group",Ot[Ot.List=2]="List",Ot[Ot.PercentSign=3]="PercentSign",Ot[Ot.PlusSign=4]="PlusSign",Ot[Ot.MinusSign=5]="MinusSign",Ot[Ot.Exponential=6]="Exponential",Ot[Ot.SuperscriptingExponent=7]="SuperscriptingExponent",Ot[Ot.PerMille=8]="PerMille",Ot[Ot.Infinity=9]="Infinity",Ot[Ot.NaN=10]="NaN",Ot[Ot.TimeSeparator=11]="TimeSeparator",Ot[Ot.CurrencyDecimal=12]="CurrencyDecimal",Ot[Ot.CurrencyGroup=13]="CurrencyGroup",Ot))();function ya(i,t){const e=Ks(i),n=e[et.NumberSymbols][t];if(typeof n>"u"){if(t===Ot.CurrencyDecimal)return e[et.NumberSymbols][Ot.Decimal];if(t===Ot.CurrencyGroup)return e[et.NumberSymbols][Ot.Group]}return n}const m9=/^(\d+)?\.((\d+)(-(\d+))?)?$/,J2=22,Xw=".",ny="0",g9=";",_9=",",_T="#";function bT(i){const t=parseInt(i);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+i);return t}const wT=/\s+/,nN=[];let fm=(()=>{class i{constructor(e,n,r,s){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=s,this.initialClasses=nN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(wT):nN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(wT):e}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const n of e)this._updateState(n,!0);else if(null!=e)for(const n of Object.keys(e))this._updateState(n,Boolean(e[n]));this._applyStateDiff()}_updateState(e,n){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const n=e[0],r=e[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(e,n){(e=e.trim()).length>0&&e.split(wT).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return i.\u0275fac=function(e){return new(e||i)(A(Vw),A(Jv),A(lt),A(ma))},i.\u0275dir=xe({type:i,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),i})();class D9{constructor(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,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 _o=(()=>{class i{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,n,r){this._viewContainer=e,this._template=n,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 n=this._viewContainer;e.forEachOperation((r,s,o)=>{if(null==r.previousIndex)n.createEmbeddedView(this._template,new D9(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)n.remove(null===s?void 0:s);else if(null!==s){const a=n.get(s);n.move(a,o),sN(a,r)}});for(let r=0,s=n.length;r{sN(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(A(Vr),A(mo),A(Vw))},i.\u0275dir=xe({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),i})();function sN(i,t){i.context.$implicit=t.item}let gi=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new I9,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){oN("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){oN("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,n){return!0}}return i.\u0275fac=function(e){return new(e||i)(A(Vr),A(mo))},i.\u0275dir=xe({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),i})();class I9{constructor(){this.$implicit=null,this.ngIf=null}}function oN(i,t){if(t&&!t.createEmbeddedView)throw new Error(`${i} must be a TemplateRef, but received '${ii(t)}'.`)}class MT{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 iy=(()=>{class i{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 n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const n of this._defaultViews)n.enforceState(e)}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),i})(),CT=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new MT(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return i.\u0275fac=function(e){return new(e||i)(A(Vr),A(mo),A(iy,9))},i.\u0275dir=xe({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),i})(),aN=(()=>{class i{constructor(e,n,r){r._addDefault(new MT(e,n))}}return i.\u0275fac=function(e){return new(e||i)(A(Vr),A(mo),A(iy,9))},i.\u0275dir=xe({type:i,selectors:[["","ngSwitchDefault",""]],standalone:!0}),i})(),Kw=(()=>{class i{constructor(e,n,r){this._ngEl=e,this._differs=n,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[r,s]=e.split("."),o=-1===r.indexOf("-")?void 0:rs.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(Jv),A(ma))},i.\u0275dir=xe({type:i,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),i})(),ry=(()=>{class i{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 n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:s,ngTemplateOutletInjector:o}=this;this._viewRef=n.createEmbeddedView(r,s,o?{injector:o}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return i.\u0275fac=function(e){return new(e||i)(A(Vr))},i.\u0275dir=xe({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Si]}),i})();function il(i,t){return new he(2100,!1)}class k9{createSubscription(t,e){return t.subscribe({next:e,error:n=>{throw n}})}dispose(t){t.unsubscribe()}}class P9{createSubscription(t,e){return t.then(e,n=>{throw n})}dispose(t){}}const O9=new P9,F9=new k9;let Hl=(()=>{class i{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,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(Gv(e))return O9;if(uF(e))return F9;throw il()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}return i.\u0275fac=function(e){return new(e||i)(A(ri,16))},i.\u0275pipe=kr({name:"async",type:i,pure:!1,standalone:!0}),i})(),cN=(()=>{class i{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=dN}transform(e,n=dN){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const r=this.differ.diff(e),s=n!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function q9(i,t){return{key:i,value:t}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}}return i.\u0275fac=function(e){return new(e||i)(A(Jv,16))},i.\u0275pipe=kr({name:"keyvalue",type:i,pure:!1,standalone:!0}),i})();function dN(i,t){const e=i.key,n=t.key;if(e===n)return 0;if(void 0===e)return 1;if(void 0===n)return-1;if(null===e)return 1;if(null===n)return-1;if("string"==typeof e&&"string"==typeof n)return e{class i{constructor(e){this._locale=e}transform(e,n,r){if(!function ST(i){return!(null==i||""===i||i!=i)}(e))return null;r=r||this._locale;try{return function x9(i,t,e){return function vT(i,t,e,n,r,s,o=!1){let a="",l=!1;if(isFinite(i)){let c=function M9(i){let n,r,s,o,a,t=Math.abs(i)+"",e=0;for((r=t.indexOf(Xw))>-1&&(t=t.replace(Xw,"")),(s=t.search(/e/i))>0?(r<0&&(r=s),r+=+t.slice(s+1),t=t.substring(0,s)):r<0&&(r=t.length),s=0;t.charAt(s)===ny;s++);if(s===(a=t.length))n=[0],r=1;else{for(a--;t.charAt(a)===ny;)a--;for(r-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return r>J2&&(n=n.splice(0,J2-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}(i);o&&(c=function w9(i){if(0===i.digits[0])return i;const t=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(0===t?i.digits.push(0,0):1===t&&i.digits.push(0),i.integerLen+=2),i}(c));let u=t.minInt,h=t.minFrac,p=t.maxFrac;if(s){const M=s.match(m9);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],C=M[3],O=M[5];null!=x&&(u=bT(x)),null!=C&&(h=bT(C)),null!=O?p=bT(O):null!=C&&h>p&&(p=h)}!function C9(i,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let n=i.digits,r=n.length-i.integerLen;const s=Math.min(Math.max(t,r),e);let o=s+i.integerLen,a=n[o];if(o>0){n.splice(Math.max(i.integerLen,o));for(let h=o;h=5)if(o-1<0){for(let h=0;h>o;h--)n.unshift(0),i.integerLen++;n.unshift(1),i.integerLen++}else n[o-1]++;for(;r=c?g.pop():l=!1),p>=10?1:0},0);u&&(n.unshift(u),i.integerLen++)}(c,h,p);let m=c.digits,g=c.integerLen;const b=c.exponent;let v=[];for(l=m.every(M=>!M);g0?v=m.splice(g,m.length):(v=m,m=[0]);const y=[];for(m.length>=t.lgSize&&y.unshift(m.splice(-t.lgSize,m.length).join(""));m.length>t.gSize;)y.unshift(m.splice(-t.gSize,m.length).join(""));m.length&&y.unshift(m.join("")),a=y.join(ya(e,n)),v.length&&(a+=ya(e,r)+v.join("")),b&&(a+=ya(e,Ot.Exponential)+"+"+b)}else a=ya(e,Ot.Infinity);return a=i<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(i,function yT(i,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(g9),r=n[0],s=n[1],o=-1!==r.indexOf(Xw)?r.split(Xw):[r.substring(0,r.lastIndexOf(ny)+1),r.substring(r.lastIndexOf(ny)+1)],a=o[0],l=o[1]||"";e.posPre=a.substring(0,a.indexOf(_T));for(let u=0;u{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();const hN="browser";let tY=(()=>{class i{}return i.\u0275prov=Ie({token:i,providedIn:"root",factory:()=>new nY(J(Ut),window)}),i})();class nY{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 iY(i,t){const e=i.getElementById(t)||i.getElementsByName(t)[0];if(e)return e;if("function"==typeof i.createTreeWalker&&i.body&&(i.body.createShadowRoot||i.body.attachShadow)){const n=i.createTreeWalker(i.body,NodeFilter.SHOW_ELEMENT);let r=n.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(t)||s.querySelector(`[name="${t}"]`);if(o)return o}r=n.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(),n=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=fN(this.window.history)||fN(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 fN(i){return Object.getOwnPropertyDescriptor(i,"scrollRestoration")}class RY extends Fj{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class TT extends RY{static makeCurrent(){!function Oj(i){dT||(dT=i)}(new TT)}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!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 kY(){return oy=oy||document.querySelector("base"),oy?oy.getAttribute("href"):null}();return null==e?null:function PY(i){Jw=Jw||document.createElement("a"),Jw.setAttribute("href",i);const t=Jw.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){oy=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function E9(i,t){t=encodeURIComponent(t);for(const e of i.split(";")){const n=e.indexOf("="),[r,s]=-1==n?[e,""]:[e.slice(0,n),e.slice(n+1)];if(r.trim()===t)return decodeURIComponent(s)}return null}(document.cookie,t)}}let Jw,oy=null;const vN=new fe("TRANSITION_ID"),FY=[{provide:Ow,useFactory:function OY(i,t,e){return()=>{e.get(Fw).donePromise.then(()=>{const n=Nc(),r=t.querySelectorAll(`style[ng-transition="${i}"]`);for(let s=0;s{class i{build(){return new XMLHttpRequest}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const eM=new fe("EventManagerPlugins");let tM=(()=>{class i{constructor(e,n){this._zone=n,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,r){return this._findPluginFor(n).addEventListener(e,n,r)}addGlobalEventListener(e,n,r){return this._findPluginFor(n).addGlobalEventListener(e,n,r)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const r=this._plugins;for(let s=0;s{class i{constructor(){this.usageCount=new Map}addStyles(e){for(const n of e)1===this.changeUsageCount(n,1)&&this.onStyleAdded(n)}removeStyles(e){for(const n of e)0===this.changeUsageCount(n,-1)&&this.onStyleRemoved(n)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,n){const r=this.usageCount;let s=r.get(e)??0;return s+=n,s>0?r.set(e,s):r.delete(e),s}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),ay=(()=>{class i extends bN{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const n of this.hostNodes)this.addStyleToHost(n,e)}onStyleRemoved(e){const n=this.styleRef;n.get(e)?.forEach(s=>s.remove()),n.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const n of this.getAllStyles())this.addStyleToHost(e,n)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,n){const r=this.doc.createElement("style");r.textContent=n,e.appendChild(r);const s=this.styleRef.get(n);s?s.push(r):this.styleRef.set(n,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const IT={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/"},RT=/%COMP%/g,MN=new fe("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function CN(i,t){return t.flat(100).map(e=>e.replace(RT,i))}function SN(i){return t=>{if("__ngUnwrap__"===t)return i;!1===i(t)&&(t.preventDefault(),t.returnValue=!1)}}let nM=(()=>{class i{constructor(e,n,r,s){this.eventManager=e,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestory=s,this.rendererByCompId=new Map,this.defaultRenderer=new kT(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof DN?r.applyToHost(e):r instanceof PT&&r.applyStyles(),r}getOrCreateRenderer(e,n){const r=this.rendererByCompId;let s=r.get(n.id);if(!s){const o=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(n.encapsulation){case Io.Emulated:s=new DN(o,a,n,this.appId,l);break;case Io.ShadowDom:return new $Y(o,a,e,n);default:s=new PT(o,a,n,l)}s.onDestroy=()=>r.delete(n.id),r.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return i.\u0275fac=function(e){return new(e||i)(J(tM),J(ay),J(dm),J(MN))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class kT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(IT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(AN(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(AN(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const s=IT[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=IT[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(rs.DashCase|rs.Important)?t.style.setProperty(e,n,r&rs.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&rs.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,SN(n)):this.eventManager.addEventListener(t,e,SN(n))}}function AN(i){return"TEMPLATE"===i.tagName&&void 0!==i.content}class $Y extends kT{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=CN(r.id,r.styles);for(const o of s){const a=document.createElement("style");a.textContent=o,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,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}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 PT extends kT{constructor(t,e,n,r,s=n.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=CN(s,n.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 DN extends PT{constructor(t,e,n,r,s){const o=r+"-"+n.id;super(t,e,n,s,o),this.contentAttr=function zY(i){return"_ngcontent-%COMP%".replace(RT,i)}(o),this.hostAttr=function HY(i){return"_nghost-%COMP%".replace(RT,i)}(o)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}let WY=(()=>{class i extends yN{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,r){return e.addEventListener(n,r,!1),()=>this.removeEventListener(e,n,r)}removeEventListener(e,n,r){return e.removeEventListener(n,r)}}return i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const TN=["alt","control","meta","shift"],jY={"\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"},YY={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey};let qY=(()=>{class i extends yN{constructor(e){super(e)}supports(e){return null!=i.parseEventName(e)}addEventListener(e,n,r){const s=i.parseEventName(n),o=i.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Nc().onAndCancel(e,s.domEventName,o))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const s=i._normalizeKey(n.pop());let o="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),o="code."),TN.forEach(c=>{const u=n.indexOf(c);u>-1&&(n.splice(u,1),o+=c+".")}),o+=s,0!=n.length||0===s.length)return null;const l={};return l.domEventName=r,l.fullKey=o,l}static matchEventFullKeyCode(e,n){let r=jY[e.key]||e.key,s="";return n.indexOf("code.")>-1&&(r=e.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),TN.forEach(o=>{o!==r&&(0,YY[o])(e)&&(s+=o+".")}),s+=r,s===n)}static eventCallback(e,n,r){return s=>{i.matchEventFullKeyCode(s,e)&&r.runGuarded(()=>n(s))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const QY=S2(Rj,"browser",[{provide:Z1,useValue:hN},{provide:p2,useValue:function XY(){TT.makeCurrent()},multi:!0},{provide:Ut,useFactory:function ZY(){return function jA(i){lv=i}(document),document},deps:[]}]),kN=new fe(""),PN=[{provide:Lw,useClass:class LY{addToWindow(t){Cn.getAngularTestability=(n,r=!0)=>{const s=t.findTestabilityInTree(n,r);if(null==s)throw new Error("Could not find testability for element.");return s},Cn.getAllAngularTestabilities=()=>t.getAllTestabilities(),Cn.getAllAngularRootElements=()=>t.getAllRootElements(),Cn.frameworkStabilizers||(Cn.frameworkStabilizers=[]),Cn.frameworkStabilizers.push(n=>{const r=Cn.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&n(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,n){return null==e?null:t.getTestability(e)??(n?Nc().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:b2,useClass:tT,deps:[ot,nT,Lw]},{provide:tT,useClass:tT,deps:[ot,nT,Lw]}],ON=[{provide:yv,useValue:"root"},{provide:Za,useFactory:function KY(){return new Za},deps:[]},{provide:eM,useClass:WY,multi:!0,deps:[Ut,ot,Z1]},{provide:eM,useClass:qY,multi:!0,deps:[Ut]},{provide:nM,useClass:nM,deps:[tM,ay,dm,MN]},{provide:vh,useExisting:nM},{provide:bN,useExisting:ay},{provide:ay,useClass:ay,deps:[Ut]},{provide:tM,useClass:tM,deps:[eM,ot]},{provide:class rY{},useClass:NY,deps:[]},[]];let FN=(()=>{class i{constructor(e){}static withServerTransition(e){return{ngModule:i,providers:[{provide:dm,useValue:e.appId},{provide:vN,useExisting:dm},FY]}}}return i.\u0275fac=function(e){return new(e||i)(J(kN,12))},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[...ON,...PN],imports:[vo,kj]}),i})(),LN=(()=>{class i{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new e:function e7(){return new LN(J(Ut))}(),n},providedIn:"root"}),i})();typeof window<"u"&&window;let LT=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new(e||i):J(UN),n},providedIn:"root"}),i})(),UN=(()=>{class i extends LT{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case Hn.NONE:return n;case Hn.HTML:return Ws(n,"HTML")?$s(n):Lx(this._doc,String(n)).toString();case Hn.STYLE:return Ws(n,"Style")?$s(n):n;case Hn.SCRIPT:if(Ws(n,"Script"))return $s(n);throw new Error("unsafe value used in a script context");case Hn.URL:return Ws(n,"URL")?$s(n):Ic(String(n));case Hn.RESOURCE_URL:if(Ws(n,"ResourceURL"))return $s(n);throw new Error(`unsafe value used in a resource URL context (see ${vd})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${vd})`)}}bypassSecurityTrustHtml(e){return function ZA(i){return new Rx(i)}(e)}bypassSecurityTrustStyle(e){return function QA(i){return new kx(i)}(e)}bypassSecurityTrustScript(e){return function JA(i){return new YA(i)}(e)}bypassSecurityTrustUrl(e){return function eD(i){return new qA(i)}(e)}bypassSecurityTrustResourceUrl(e){return function tD(i){return new XA(i)}(e)}}return i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:function(e){let n=null;return n=e?new e:function s7(i){return new UN(i.get(Ut))}(J(Fi)),n},providedIn:"root"}),i})();function dt(...i){return Pi(i,ku(i))}class Ct extends Fe{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:n}=this;if(t)throw e;return this._throwIfClosed(),n}next(t){super.next(this._value=t)}}const ly=U(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:o7}=Array,{getPrototypeOf:a7,prototype:l7,keys:c7}=Object;function VN(i){if(1===i.length){const t=i[0];if(o7(t))return{args:t,keys:null};if(function d7(i){return i&&"object"==typeof i&&a7(i)===l7}(t)){const e=c7(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}const{isArray:u7}=Array;function NT(i){return Qe(t=>function h7(i,t){return u7(t)?i(...t):i(t)}(i,t))}function zN(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function jd(...i){const t=ku(i),e=Ru(i),{args:n,keys:r}=VN(i);if(0===n.length)return Pi([],t);const s=new En(function f7(i,t,e=Na){return n=>{HN(t,()=>{const{length:r}=i,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Pi(i[l],t);let u=!1;c.subscribe(Fn(n,h=>{s[l]=h,u||(u=!0,a--),a||n.next(e(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,t,r?o=>zN(r,o):Na));return e?s.pipe(NT(e)):s}function HN(i,t,e){i?na(e,i,t):t()}function cy(...i){return function p7(){return gd(1)}()(Pi(i,ku(i)))}function dy(i){return new En(t=>{rr(i()).subscribe(t)})}function pm(i,t){const e=en(i)?i:()=>i,n=r=>r.error(e());return new En(t?r=>t.schedule(n,0,r):n)}function BT(){return Vn((i,t)=>{let e=null;i._refCount++;const n=Fn(t,void 0,void 0,void 0,()=>{if(!i||i._refCount<=0||0<--i._refCount)return void(e=null);const r=i._connection,s=e;e=null,r&&(!s||r===s)&&r.unsubscribe(),t.unsubscribe()});i.subscribe(n),n.closed||(e=i.connect())})}class GN extends En{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Wb(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 Yt;const e=this.getSubject();t.add(this.source.subscribe(Fn(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Yt.EMPTY)}return t}refCount(){return BT()(this)}}function vs(i,t){return Vn((e,n)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&n.complete();e.subscribe(Fn(n,l=>{r?.unsubscribe();let c=0;const u=s++;rr(i(l,u)).subscribe(r=Fn(n,h=>n.next(t?t(l,h,u,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Ai(i){return i<=0?()=>Os:Vn((t,e)=>{let n=0;t.subscribe(Fn(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function No(...i){const t=ku(i);return Vn((e,n)=>{(t?cy(i,e,t):cy(i,e)).subscribe(n)})}function Dn(i,t){return Vn((e,n)=>{let r=0;e.subscribe(Fn(n,s=>i.call(t,s,r++)&&n.next(s)))})}function iM(i){return Vn((t,e)=>{let n=!1;t.subscribe(Fn(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function $N(i=m7){return Vn((t,e)=>{let n=!1;t.subscribe(Fn(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function m7(){return new ly}function Yd(i,t){const e=arguments.length>=2;return n=>n.pipe(i?Dn((r,s)=>i(r,s,n)):Na,Ai(1),e?iM(t):$N(()=>new ly))}function qd(i,t){return en(t)?qi(i,t,1):qi(i,1)}function Di(i,t,e){const n=en(i)||t||e?{next:i,error:t,complete:e}:i;return n?Vn((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let a=!0;r.subscribe(Fn(s,l=>{var c;null===(c=n.next)||void 0===c||c.call(n,l),s.next(l)},()=>{var l;a=!1,null===(l=n.complete)||void 0===l||l.call(n),s.complete()},l=>{var c;a=!1,null===(c=n.error)||void 0===c||c.call(n,l),s.error(l)},()=>{var l,c;a&&(null===(l=n.unsubscribe)||void 0===l||l.call(n)),null===(c=n.finalize)||void 0===c||c.call(n)}))}):Na}function Vc(i){return Vn((t,e)=>{let s,n=null,r=!1;n=t.subscribe(Fn(e,void 0,void 0,o=>{s=rr(i(o,Vc(i)(t))),n?(n.unsubscribe(),n=null,s.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(e))})}function WN(i,t){return Vn(function g7(i,t,e,n,r){return(s,o)=>{let a=e,l=t,c=0;s.subscribe(Fn(o,u=>{const h=c++;l=a?i(l,u,h):(a=!0,u),n&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(i,t,arguments.length>=2,!0))}function UT(i){return i<=0?()=>Os:Vn((t,e)=>{let n=[];t.subscribe(Fn(e,r=>{n.push(r),i{for(const r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function jN(i,t){const e=arguments.length>=2;return n=>n.pipe(i?Dn((r,s)=>i(r,s,n)):Na,UT(1),e?iM(t):$N(()=>new ly))}function YN(i,t=!1){return Vn((e,n)=>{let r=0;e.subscribe(Fn(n,s=>{const o=i(s,r++);(o||t)&&n.next(s),!o&&n.complete()}))})}function qN(i){return Qe(()=>i)}function Xd(i){return Vn((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}const ln="primary",uy=Symbol("RouteTitle");class _7{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 mm(i){return new _7(i)}function v7(i,t,e){const n=e.path.split("/");if(n.length>i.length||"full"===e.pathMatch&&(t.hasChildren()||n.lengthn[s]===r)}return i===t}function KN(i){return Array.prototype.concat.apply([],i)}function ZN(i){return i.length>0?i[i.length-1]:null}function ss(i,t){for(const e in i)i.hasOwnProperty(e)&&t(i[e],e)}function Kd(i){return b1(i)?i:Gv(i)?Pi(Promise.resolve(i)):dt(i)}const rM=!1,b7={exact:function eB(i,t,e){if(!Eh(i.segments,t.segments)||!sM(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(const n in t.children)if(!i.children[n]||!eB(i.children[n],t.children[n],e))return!1;return!0},subset:tB},QN={exact:function x7(i,t){return Gl(i,t)},subset:function w7(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>XN(i[e],t[e]))},ignored:()=>!0};function JN(i,t,e){return b7[e.paths](i.root,t.root,e.matrixParams)&&QN[e.queryParams](i.queryParams,t.queryParams)&&!("exact"===e.fragment&&i.fragment!==t.fragment)}function tB(i,t,e){return nB(i,t,t.segments,e)}function nB(i,t,e,n){if(i.segments.length>e.length){const r=i.segments.slice(0,e.length);return!(!Eh(r,e)||t.hasChildren()||!sM(r,e,n))}if(i.segments.length===e.length){if(!Eh(i.segments,e)||!sM(i.segments,e,n))return!1;for(const r in t.children)if(!i.children[r]||!tB(i.children[r],t.children[r],n))return!1;return!0}{const r=e.slice(0,i.segments.length),s=e.slice(i.segments.length);return!!(Eh(i.segments,r)&&sM(i.segments,r,n)&&i.children[ln])&&nB(i.children[ln],t,s,n)}}function sM(i,t,e){return t.every((n,r)=>QN[e](i[r].parameters,n.parameters))}class Zd{constructor(t=new Sn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=mm(this.queryParams)),this._queryParamMap}toString(){return S7.serialize(this)}}class Sn{constructor(t,e){this.segments=t,this.children=e,this.parent=null,ss(e,(n,r)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return oM(this)}}class hy{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mm(this.parameters)),this._parameterMap}toString(){return sB(this)}}function Eh(i,t){return i.length===t.length&&i.every((e,n)=>e.path===t[n].path)}let fy=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return new VT},providedIn:"root"}),i})();class VT{parse(t){const e=new O7(t);return new Zd(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${py(t.root,!0)}`,n=function D7(i){const t=Object.keys(i).map(e=>{const n=i[e];return Array.isArray(n)?n.map(r=>`${aM(e)}=${aM(r)}`).join("&"):`${aM(e)}=${aM(n)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${e}${n}${"string"==typeof t.fragment?`#${function E7(i){return encodeURI(i)}(t.fragment)}`:""}`}}const S7=new VT;function oM(i){return i.segments.map(t=>sB(t)).join("/")}function py(i,t){if(!i.hasChildren())return oM(i);if(t){const e=i.children[ln]?py(i.children[ln],!1):"",n=[];return ss(i.children,(r,s)=>{s!==ln&&n.push(`${s}:${py(r,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function C7(i,t){let e=[];return ss(i.children,(n,r)=>{r===ln&&(e=e.concat(t(n,r)))}),ss(i.children,(n,r)=>{r!==ln&&(e=e.concat(t(n,r)))}),e}(i,(n,r)=>r===ln?[py(i.children[ln],!1)]:[`${r}:${py(n,!1)}`]);return 1===Object.keys(i.children).length&&null!=i.children[ln]?`${oM(i)}/${e[0]}`:`${oM(i)}/(${e.join("//")})`}}function iB(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function aM(i){return iB(i).replace(/%3B/gi,";")}function zT(i){return iB(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function lM(i){return decodeURIComponent(i)}function rB(i){return lM(i.replace(/\+/g,"%20"))}function sB(i){return`${zT(i.path)}${function A7(i){return Object.keys(i).map(t=>`;${zT(t)}=${zT(i[t])}`).join("")}(i.parameters)}`}const T7=/^[^\/()?;=#]+/;function cM(i){const t=i.match(T7);return t?t[0]:""}const I7=/^[^=?&#]+/,k7=/^[^&#]+/;class O7{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Sn([],{}):new Sn([],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 n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[ln]=new Sn(t,e)),n}parseSegment(){const t=cM(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new he(4009,rM);return this.capture(t),new hy(lM(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=cM(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const r=cM(this.remaining);r&&(n=r,this.capture(n))}t[lM(e)]=lM(n)}parseQueryParam(t){const e=function R7(i){const t=i.match(I7);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function P7(i){const t=i.match(k7);return t?t[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=rB(e),s=rB(n);if(t.hasOwnProperty(r)){let o=t[r];Array.isArray(o)||(o=[o],t[r]=o),o.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=cM(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new he(4010,rM);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=ln);const o=this.parseChildren();e[s]=1===Object.keys(o).length?o[ln]:new Sn([],o),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 he(4011,rM)}}function HT(i){return i.segments.length>0?new Sn([],{[ln]:i}):i}function dM(i){const t={};for(const n of Object.keys(i.children)){const s=dM(i.children[n]);(s.segments.length>0||s.hasChildren())&&(t[n]=s)}return function F7(i){if(1===i.numberOfChildren&&i.children[ln]){const t=i.children[ln];return new Sn(i.segments.concat(t.segments),t.children)}return i}(new Sn(i.segments,t))}function Ah(i){return i instanceof Zd}const GT=!1;function L7(i,t,e,n,r){if(0===e.length)return gm(t.root,t.root,t.root,n,r);const s=function dB(i){if("string"==typeof i[0]&&1===i.length&&"/"===i[0])return new cB(!0,0,i);let t=0,e=!1;const n=i.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return ss(s.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,s]},[]);return new cB(e,t,n)}(e);return s.toRoot()?gm(t.root,t.root,new Sn([],{}),n,r):function o(l){const c=function B7(i,t,e,n){if(i.isAbsolute)return new _m(t.root,!0,0);if(-1===n)return new _m(e,e===t.root,0);return function uB(i,t,e){let n=i,r=t,s=e;for(;s>r;){if(s-=r,n=n.parent,!n)throw new he(4005,GT&&"Invalid number of '../'");r=n.segments.length}return new _m(n,!1,r-s)}(e,n+(my(i.commands[0])?0:1),i.numberOfDoubleDots)}(s,t,i.snapshot?._urlSegment,l),u=c.processChildren?vm(c.segmentGroup,c.index,s.commands):$T(c.segmentGroup,c.index,s.commands);return gm(t.root,c.segmentGroup,u,n,r)}(i.snapshot?._lastPathIndex)}function my(i){return"object"==typeof i&&null!=i&&!i.outlets&&!i.segmentPath}function gy(i){return"object"==typeof i&&null!=i&&i.outlets}function gm(i,t,e,n,r){let o,s={};n&&ss(n,(l,c)=>{s[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),o=i===t?e:lB(i,t,e);const a=HT(dM(o));return new Zd(a,s,r)}function lB(i,t,e){const n={};return ss(i.children,(r,s)=>{n[s]=r===t?e:lB(r,t,e)}),new Sn(i.segments,n)}class cB{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&my(n[0]))throw new he(4003,GT&&"Root segment cannot have matrix parameters");const r=n.find(gy);if(r&&r!==ZN(n))throw new he(4004,GT&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class _m{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function $T(i,t,e){if(i||(i=new Sn([],{})),0===i.segments.length&&i.hasChildren())return vm(i,t,e);const n=function V7(i,t,e){let n=0,r=t;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return s;const o=i.segments[r],a=e[n];if(gy(a))break;const l=`${a}`,c=n0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!fB(l,c,o))return s;n+=2}else{if(!fB(l,{},o))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(i,t,e),r=e.slice(n.commandIndex);if(n.match&&n.pathIndex{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=$T(i.children[o],t,s))}),ss(i.children,(s,o)=>{void 0===n[o]&&(r[o]=s)}),new Sn(i.segments,r)}}function WT(i,t,e){const n=i.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[n]=WT(new Sn([],{}),0,e))}),t}function hB(i){const t={};return ss(i,(e,n)=>t[n]=`${e}`),t}function fB(i,t,e){return i==e.path&&Gl(t,e.parameters)}const _y="imperative";class $l{constructor(t,e){this.id=t,this.url=e}}class jT extends $l{constructor(t,e,n="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Dh extends $l{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class uM extends $l{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class hM extends $l{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=16}}class YT extends $l{constructor(t,e,n,r){super(t,e),this.error=n,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class H7 extends $l{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class G7 extends $l{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class $7 extends $l{constructor(t,e,n,r,s){super(t,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class W7 extends $l{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j7 extends $l{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y7{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class q7{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class X7{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class K7{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Z7{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Q7{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class pB{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let tq=(()=>{class i{createUrlTree(e,n,r,s,o,a){return L7(e||n.root,r,s,o,a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),iq=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(t){return tq.\u0275fac(t)},providedIn:"root"}),i})();class mB{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=qT(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){const e=qT(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=XT(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return XT(t,this._root).map(e=>e.value)}}function qT(i,t){if(i===t.value)return t;for(const e of t.children){const n=qT(i,e);if(n)return n}return null}function XT(i,t){if(i===t.value)return[t];for(const e of t.children){const n=XT(i,e);if(n.length)return n.unshift(t),n}return[]}class zc{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function ym(i){const t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}class gB extends mB{constructor(t,e){super(t),this.snapshot=e,KT(this,t)}toString(){return this.snapshot.toString()}}function _B(i,t){const e=function rq(i,t){const o=new fM([],{},{},"",{},ln,t,null,i.root,-1,{});return new yB("",new zc(o,[]))}(i,t),n=new Ct([new hy("",{})]),r=new Ct({}),s=new Ct({}),o=new Ct({}),a=new Ct(""),l=new bm(n,r,o,a,s,ln,t,e.root);return l.snapshot=e.root,new gB(new zc(l,[]),e)}class bm{constructor(t,e,n,r,s,o,a,l){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.title=this.data?.pipe(Qe(c=>c[uy]))??dt(void 0),this._futureSnapshot=l}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(Qe(t=>mm(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Qe(t=>mm(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function vB(i,t="emptyOnly"){const e=i.pathFromRoot;let n=0;if("always"!==t)for(n=e.length-1;n>=1;){const r=e[n],s=e[n-1];if(r.routeConfig&&""===r.routeConfig.path)n--;else{if(s.component)break;n--}}return function sq(i){return i.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(n))}class fM{get title(){return this.data?.[uy]}constructor(t,e,n,r,s,o,a,l,c,u,h){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=h}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=mm(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=mm(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class yB extends mB{constructor(t,e){super(e),this.url=t,KT(this,e)}toString(){return bB(this._root)}}function KT(i,t){t.value._routerState=i,t.children.forEach(e=>KT(i,e))}function bB(i){const t=i.children.length>0?` { ${i.children.map(bB).join(", ")} } `:"";return`${i.value}${t}`}function ZT(i){if(i.snapshot){const t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,Gl(t.queryParams,e.queryParams)||i.queryParams.next(e.queryParams),t.fragment!==e.fragment&&i.fragment.next(e.fragment),Gl(t.params,e.params)||i.params.next(e.params),function y7(i,t){if(i.length!==t.length)return!1;for(let e=0;eGl(e.parameters,t[n].parameters))}(i.url,t.url);return e&&!(!i.parent!=!t.parent)&&(!i.parent||QT(i.parent,t.parent))}function vy(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=t.value;const r=function aq(i,t,e){return t.children.map(n=>{for(const r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return vy(i,n,r);return vy(i,n)})}(i,t,e);return new zc(n,r)}{if(i.shouldAttach(t.value)){const s=i.retrieve(t.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(a=>vy(i,a)),o}}const n=function lq(i){return new bm(new Ct(i.url),new Ct(i.params),new Ct(i.queryParams),new Ct(i.fragment),new Ct(i.data),i.outlet,i.component,i)}(t.value),r=t.children.map(s=>vy(i,s));return new zc(n,r)}}const JT="ngNavigationCancelingError";function xB(i,t){const{redirectTo:e,navigationBehaviorOptions:n}=Ah(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=wB(!1,0,t);return r.url=e,r.navigationBehaviorOptions=n,r}function wB(i,t,e){const n=new Error("NavigationCancelingError: "+(i||""));return n[JT]=!0,n.cancellationCode=t,e&&(n.url=e),n}function MB(i){return CB(i)&&Ah(i.url)}function CB(i){return i&&i[JT]}class cq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new yy,this.attachRef=null}}let yy=(()=>{class i{constructor(){this.contexts=new Map}onChildOutletCreated(e,n){const r=this.getOrCreateContext(e);r.outlet=n,this.contexts.set(e,r)}onChildOutletDestroyed(e){const n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new cq,this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const pM=!1;let SB=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=ln,this.activateEvents=new Ve,this.deactivateEvents=new Ve,this.attachEvents=new Ve,this.detachEvents=new Ve,this.parentContexts=Nt(yy),this.location=Nt(Vr),this.changeDetector=Nt(ri),this.environmentInjector=Nt(Xa)}ngOnChanges(e){if(e.name){const{firstChange:n,previousValue:r}=e.name;if(n)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 he(4012,pM);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new he(4012,pM);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new he(4012,pM);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,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,n){if(this.isActivated)throw new he(4013,pM);this._activatedRoute=e;const r=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new dq(e,a,r.injector);if(n&&function uq(i){return!!i.resolveComponentFactory}(n)){const c=n.resolveComponentFactory(o);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(o,{index:r.length,injector:l,environmentInjector:n??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Si]}),i})();class dq{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===bm?this.route:t===yy?this.childContexts:this.parent.get(t,e)}}let eI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["ng-component"]],standalone:!0,features:[F1],decls:1,vars:0,template:function(e,n){1&e&&ke(0,"router-outlet")},dependencies:[SB],encapsulation:2}),i})();function EB(i,t){return i.providers&&!i._injector&&(i._injector=Iw(i.providers,t,`Route: ${i.path}`)),i._injector??t}function nI(i){const t=i.children&&i.children.map(nI),e=t?{...i,children:t}:{...i};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==ln&&(e.component=eI),e}function xa(i){return i.outlet||ln}function AB(i,t){const e=i.filter(n=>xa(n)===t);return e.push(...i.filter(n=>xa(n)!==t)),e}function by(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let t=i.parent;t;t=t.parent){const e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class gq{constructor(t,e,n,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),ZT(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=ym(e);t.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),ss(r,(s,o)=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(r===s)if(r.component){const o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,n);else s&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,s=ym(t);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);if(n&&n.outlet){const o=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,s=ym(t);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.resolver=null,n.route=null)}activateChildRoutes(t,e,n){const r=ym(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new Q7(s.value.snapshot))}),t.children.length&&this.forwardEvent(new K7(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(ZT(r),r===s)if(r.component){const o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,n);else if(r.component){const o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),ZT(a.route.value),this.activateChildRoutes(t,null,o.children)}else{const a=by(r.snapshot),l=a?.get(Fl)??null;o.attachRef=null,o.route=r,o.resolver=l,o.injector=a,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(t,null,o.children)}}else this.activateChildRoutes(t,null,n)}}class DB{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class mM{constructor(t,e){this.component=t,this.route=e}}function _q(i,t,e){const n=i._root;return xy(n,t?t._root:null,e,[n.value])}function xm(i,t){const e=Symbol(),n=t.get(i,e);return n===e?"function"!=typeof i||function h0(i){return null!==Gf(i)}(i)?t.get(i):i:n}function xy(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=ym(t);return i.children.forEach(o=>{(function yq(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=i.value,o=t?t.value:null,a=e?e.getContext(i.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function bq(i,t,e){if("function"==typeof e)return e(i,t);switch(e){case"pathParamsChange":return!Eh(i.url,t.url);case"pathParamsOrQueryParamsChange":return!Eh(i.url,t.url)||!Gl(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!QT(i,t)||!Gl(i.queryParams,t.queryParams);default:return!QT(i,t)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new DB(n)):(s.data=o.data,s._resolvedData=o._resolvedData),xy(i,t,s.component?a?a.children:null:e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new mM(a.outlet.component,o))}else o&&wy(t,a,r),r.canActivateChecks.push(new DB(n)),xy(i,null,s.component?a?a.children:null:e,n,r)})(o,s[o.value.outlet],e,n.concat([o.value]),r),delete s[o.value.outlet]}),ss(s,(o,a)=>wy(o,e.getContext(a),r)),r}function wy(i,t,e){const n=ym(i),r=i.value;ss(n,(s,o)=>{wy(s,r.component?t?t.children.getContext(o):null:t,e)}),e.canDeactivateChecks.push(new mM(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function My(i){return"function"==typeof i}function iI(i){return i instanceof ly||"EmptyError"===i?.name}const gM=Symbol("INITIAL_VALUE");function wm(){return vs(i=>jd(i.map(t=>t.pipe(Ai(1),No(gM)))).pipe(Qe(t=>{for(const e of t)if(!0!==e){if(e===gM)return gM;if(!1===e||e instanceof Zd)return e}return!0}),Dn(t=>t!==gM),Ai(1)))}function TB(i){return function mE(...i){return Gb(i)}(Di(t=>{if(Ah(t))throw xB(0,t)}),Qe(t=>!0===t))}const rI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function IB(i,t,e,n,r){const s=sI(i,t,e);return s.matched?function Nq(i,t,e,n){const r=t.canMatch;return r&&0!==r.length?dt(r.map(o=>{const a=xm(o,i);return Kd(function Eq(i){return i&&My(i.canMatch)}(a)?a.canMatch(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),TB()):dt(!0)}(n=EB(t,n),t,e).pipe(Qe(o=>!0===o?s:{...rI})):dt(s)}function sI(i,t,e){if(""===t.path)return"full"===t.pathMatch&&(i.hasChildren()||e.length>0)?{...rI}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||v7)(e,i,t);if(!r)return{...rI};const s={};ss(r.posParams,(a,l)=>{s[l]=a.path});const o=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function _M(i,t,e,n){if(e.length>0&&function Vq(i,t,e){return e.some(n=>vM(i,t,n)&&xa(n)!==ln)}(i,e,n)){const s=new Sn(t,function Uq(i,t,e,n){const r={};r[ln]=n,n._sourceSegment=i,n._segmentIndexShift=t.length;for(const s of e)if(""===s.path&&xa(s)!==ln){const o=new Sn([],{});o._sourceSegment=i,o._segmentIndexShift=t.length,r[xa(s)]=o}return r}(i,t,n,new Sn(e,i.children)));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function zq(i,t,e){return e.some(n=>vM(i,t,n))}(i,e,n)){const s=new Sn(i.segments,function Bq(i,t,e,n,r){const s={};for(const o of n)if(vM(i,e,o)&&!r[xa(o)]){const a=new Sn([],{});a._sourceSegment=i,a._segmentIndexShift=t.length,s[xa(o)]=a}return{...r,...s}}(i,t,e,n,i.children));return s._sourceSegment=i,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:e}}const r=new Sn(i.segments,i.children);return r._sourceSegment=i,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function vM(i,t,e){return(!(i.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function RB(i,t,e,n){return!!(xa(i)===n||n!==ln&&vM(t,e,i))&&("**"===i.path||sI(t,i,e).matched)}function kB(i,t,e){return 0===t.length&&!i.children[e]}const yM=!1;class bM{constructor(t){this.segmentGroup=t||null}}class PB{constructor(t){this.urlTree=t}}function Cy(i){return pm(new bM(i))}function OB(i){return pm(new PB(i))}class Wq{constructor(t,e,n,r,s){this.injector=t,this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=s,this.allowRedirects=!0}apply(){const t=_M(this.urlTree.root,[],[],this.config).segmentGroup,e=new Sn(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,ln).pipe(Qe(s=>this.createUrlTree(dM(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Vc(s=>{if(s instanceof PB)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof bM?this.noMatchError(s):s}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,ln).pipe(Qe(r=>this.createUrlTree(dM(r),t.queryParams,t.fragment))).pipe(Vc(r=>{throw r instanceof bM?this.noMatchError(r):r}))}noMatchError(t){return new he(4002,yM)}createUrlTree(t,e,n){const r=HT(t);return new Zd(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(Qe(s=>new Sn([],s))):this.expandSegment(t,n,e,n.segments,r,!0)}expandChildren(t,e,n){const r=[];for(const s of Object.keys(n.children))"primary"===s?r.unshift(s):r.push(s);return Pi(r).pipe(qd(s=>{const o=n.children[s],a=AB(e,s);return this.expandSegmentGroup(t,a,o,s).pipe(Qe(l=>({segment:l,outlet:s})))}),WN((s,o)=>(s[o.outlet]=o.segment,s),{}),jN())}expandSegment(t,e,n,r,s,o){return Pi(n).pipe(qd(a=>this.expandSegmentAgainstRoute(t,e,n,a,r,s,o).pipe(Vc(c=>{if(c instanceof bM)return dt(null);throw c}))),Yd(a=>!!a),Vc((a,l)=>{if(iI(a))return kB(e,r,s)?dt(new Sn([],{})):Cy(e);throw a}))}expandSegmentAgainstRoute(t,e,n,r,s,o,a){return RB(r,e,s,o)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,o):Cy(e):Cy(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,r){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?OB(s):this.lineralizeSegments(n,s).pipe(qi(o=>{const a=new Sn(o,{});return this.expandSegment(t,a,e,o,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,o){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=sI(e,r,s);if(!a)return Cy(e);const h=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?OB(h):this.lineralizeSegments(r,h).pipe(qi(p=>this.expandSegment(t,e,n,p.concat(c),o,!1)))}matchSegmentAgainstRoute(t,e,n,r,s){return"**"===n.path?(t=EB(n,t),n.loadChildren?(n._loadedRoutes?dt({routes:n._loadedRoutes,injector:n._loadedInjector}):this.configLoader.loadChildren(t,n)).pipe(Qe(a=>(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,new Sn(r,{})))):dt(new Sn(r,{}))):IB(e,n,r,t).pipe(vs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(t=n._injector??t,n,r).pipe(qi(u=>{const h=u.injector??t,p=u.routes,{segmentGroup:m,slicedSegments:g}=_M(e,a,l,p),b=new Sn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(Qe(x=>new Sn(a,x)));if(0===p.length&&0===g.length)return dt(new Sn(a,{}));const v=xa(n)===s;return this.expandSegment(h,b,p,g,v?ln:s,!0).pipe(Qe(M=>new Sn(a.concat(M.segments),M.children)))})):Cy(e)))}getChildConfig(t,e,n){return e.children?dt({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?dt({routes:e._loadedRoutes,injector:e._loadedInjector}):function Lq(i,t,e,n){const r=t.canLoad;return void 0===r||0===r.length?dt(!0):dt(r.map(o=>{const a=xm(o,i);return Kd(function wq(i){return i&&My(i.canLoad)}(a)?a.canLoad(t,e):i.runInContext(()=>a(t,e)))})).pipe(wm(),TB())}(t,e,n).pipe(qi(r=>r?this.configLoader.loadChildren(t,e).pipe(Di(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function Gq(i){return pm(wB(yM,3))}())):dt({routes:[],injector:t})}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return dt(n);if(r.numberOfChildren>1||!r.children[ln])return t.redirectTo,pm(new he(4e3,yM));r=r.children[ln]}}applyRedirectCommands(t,e,n){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreateUrlTree(t,e,n,r){const s=this.createSegmentGroup(t,e.root,n,r);return new Zd(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return ss(t,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);n[s]=e[a]}else n[s]=r}),n}createSegmentGroup(t,e,n,r){const s=this.createSegments(t,e.segments,n,r);let o={};return ss(e.children,(a,l)=>{o[l]=this.createSegmentGroup(t,a,n,r)}),new Sn(s,o)}createSegments(t,e,n,r){return e.map(s=>s.path.startsWith(":")?this.findPosParam(t,s,r):this.findOrReturn(s,n))}findPosParam(t,e,n){const r=n[e.path.substring(1)];if(!r)throw new he(4001,yM);return r}findOrReturn(t,e){let n=0;for(const r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}}class Yq{}class Kq{constructor(t,e,n,r,s,o,a){this.injector=t,this.rootComponentType=e,this.config=n,this.urlTree=r,this.url=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a}recognize(){const t=_M(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,ln).pipe(Qe(e=>{if(null===e)return null;const n=new fM([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},ln,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new zc(n,e),s=new yB(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(t){const e=t.value,n=vB(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.processChildren(t,e,n):this.processSegment(t,e,n,n.segments,r)}processChildren(t,e,n){return Pi(Object.keys(n.children)).pipe(qd(r=>{const s=n.children[r],o=AB(e,r);return this.processSegmentGroup(t,o,s,r)}),WN((r,s)=>r&&s?(r.push(...s),r):null),YN(r=>null!==r),iM(null),jN(),Qe(r=>{if(null===r)return null;const s=LB(r);return function Zq(i){i.sort((t,e)=>t.value.outlet===ln?-1:e.value.outlet===ln?1:t.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(t,e,n,r,s){return Pi(e).pipe(qd(o=>this.processSegmentAgainstRoute(o._injector??t,o,n,r,s)),Yd(o=>!!o),Vc(o=>{if(iI(o))return kB(n,r,s)?dt([]):dt(null);throw o}))}processSegmentAgainstRoute(t,e,n,r,s){if(e.redirectTo||!RB(e,n,r,s))return dt(null);let o;if("**"===e.path){const a=r.length>0?ZN(r).parameters:{},l=BB(n)+r.length;o=dt({snapshot:new fM(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,UB(e),xa(e),e.component??e._loadedComponent??null,e,NB(n),l,VB(e)),consumedSegments:[],remainingSegments:[]})}else o=IB(n,e,r,t).pipe(Qe(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const h=BB(n)+l.length;return{snapshot:new fM(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,UB(e),xa(e),e.component??e._loadedComponent??null,e,NB(n),h,VB(e)),consumedSegments:l,remainingSegments:c}}));return o.pipe(vs(a=>{if(null===a)return dt(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;t=e._injector??t;const h=e._loadedInjector??t,p=function Qq(i){return i.children?i.children:i.loadChildren?i._loadedRoutes:[]}(e),{segmentGroup:m,slicedSegments:g}=_M(n,c,u,p.filter(v=>void 0===v.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(Qe(v=>null===v?null:[new zc(l,v)]));if(0===p.length&&0===g.length)return dt([new zc(l,[])]);const b=xa(e)===s;return this.processSegment(h,p,m,g,b?ln:s).pipe(Qe(v=>null===v?null:[new zc(l,v)]))}))}}function Jq(i){const t=i.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function LB(i){const t=[],e=new Set;for(const n of i){if(!Jq(n)){t.push(n);continue}const r=t.find(s=>n.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...n.children),e.add(r)):t.push(n)}for(const n of e){const r=LB(n.children);t.push(new zc(n.value,r))}return t.filter(n=>!e.has(n))}function NB(i){let t=i;for(;t._sourceSegment;)t=t._sourceSegment;return t}function BB(i){let t=i,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function UB(i){return i.data||{}}function VB(i){return i.resolve||{}}function zB(i){return"string"==typeof i.title||null===i.title}function oI(i){return vs(t=>{const e=i(t);return e?Pi(e).pipe(Qe(()=>t)):dt(t)})}const Mm=new fe("ROUTES");let aI=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Nt(m2)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return dt(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const n=Kd(e.loadComponent()).pipe(Qe(GB),Di(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),Xd(()=>{this.componentLoaders.delete(e)})),r=new GN(n,()=>new Fe).pipe(BT());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return dt({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=this.loadModuleFactoryOrRoutes(n.loadChildren).pipe(Qe(a=>{this.onLoadEndListener&&this.onLoadEndListener(n);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=KN(l.get(Mm,[],Et.Self|Et.Optional)));return{routes:c.map(nI),injector:l}}),Xd(()=>{this.childrenLoaders.delete(n)})),o=new GN(s,()=>new Fe).pipe(BT());return this.childrenLoaders.set(n,o),o}loadModuleFactoryOrRoutes(e){return Kd(e()).pipe(Qe(GB),qi(n=>n instanceof AL||Array.isArray(n)?dt(n):Pi(this.compiler.compileModuleAsync(n))))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function GB(i){return function aX(i){return i&&"object"==typeof i&&"default"in i}(i)?i.default:i}let wM=(()=>{class i{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Fe,this.configLoader=Nt(aI),this.environmentInjector=Nt(Xa),this.urlSerializer=Nt(fy),this.rootContexts=Nt(yy),this.navigationId=0,this.afterPreactivation=()=>dt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new q7(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Y7(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const n=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:n})}setupNavigations(e){return this.transitions=new Ct({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:_y,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Dn(n=>0!==n.id),Qe(n=>({...n,extractedUrl:e.urlHandlingStrategy.extract(n.rawUrl)})),vs(n=>{let r=!1,s=!1;return dt(n).pipe(Di(o=>{this.currentNavigation={id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),vs(o=>{const a=e.browserUrlTree.toString(),l=!e.navigated||o.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(o.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new hM(o.id,e.serializeUrl(n.rawUrl),u,0)),e.rawUrlTree=o.rawUrl,o.resolve(null),Os}if(e.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $B(o.source)&&(e.browserUrlTree=o.extractedUrl),dt(o).pipe(vs(u=>{const h=this.transitions?.getValue();return this.events.next(new jT(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),h!==this.transitions?.getValue()?Os:Promise.resolve(u)}),function jq(i,t,e,n){return vs(r=>function $q(i,t,e,n,r){return new Wq(i,t,e,n,r).apply()}(i,t,e,r.extractedUrl,n).pipe(Qe(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),Di(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},n.urlAfterRedirects=u.urlAfterRedirects}),function tX(i,t,e,n,r){return qi(s=>function Xq(i,t,e,n,r,s,o="emptyOnly"){return new Kq(i,t,e,n,r,o,s).recognize().pipe(vs(a=>null===a?function qq(i){return new En(t=>t.error(i))}(new Yq):dt(a)))}(i,t,e,s.urlAfterRedirects,n.serialize(s.urlAfterRedirects),n,r).pipe(Qe(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),Di(u=>{if(n.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const p=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(p,u)}e.browserUrlTree=u.urlAfterRedirects}const h=new H7(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new jT(u,this.urlSerializer.serialize(h),p,m);this.events.next(b);const v=_B(h,this.rootComponentType).snapshot;return dt(n={...o,targetSnapshot:v,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new hM(o.id,e.serializeUrl(n.extractedUrl),u,1)),e.rawUrlTree=o.rawUrl,o.resolve(null),Os}}),Di(o=>{const a=new G7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),Qe(o=>n={...o,guards:_q(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function Dq(i,t){return qi(e=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return 0===o.length&&0===s.length?dt({...e,guardsResult:!0}):function Tq(i,t,e,n){return Pi(i).pipe(qi(r=>function Fq(i,t,e,n,r){const s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return s&&0!==s.length?dt(s.map(a=>{const l=by(t)??r,c=xm(a,l);return Kd(function Sq(i){return i&&My(i.canDeactivate)}(c)?c.canDeactivate(i,t,e,n):l.runInContext(()=>c(i,t,e,n))).pipe(Yd())})).pipe(wm()):dt(!0)}(r.component,r.route,e,t,n)),Yd(r=>!0!==r,!0))}(o,n,r,i).pipe(qi(a=>a&&function xq(i){return"boolean"==typeof i}(a)?function Iq(i,t,e,n){return Pi(t).pipe(qd(r=>cy(function kq(i,t){return null!==i&&t&&t(new X7(i)),dt(!0)}(r.route.parent,n),function Rq(i,t){return null!==i&&t&&t(new Z7(i)),dt(!0)}(r.route,n),function Oq(i,t,e){const n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>function vq(i){const t=i.routeConfig?i.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:i,guards:t}:null}(o)).filter(o=>null!==o).map(o=>dy(()=>dt(o.guards.map(l=>{const c=by(o.node)??e,u=xm(l,c);return Kd(function Cq(i){return i&&My(i.canActivateChild)}(u)?u.canActivateChild(n,i):c.runInContext(()=>u(n,i))).pipe(Yd())})).pipe(wm())));return dt(s).pipe(wm())}(i,r.path,e),function Pq(i,t,e){const n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return dt(!0);const r=n.map(s=>dy(()=>{const o=by(t)??e,a=xm(s,o);return Kd(function Mq(i){return i&&My(i.canActivate)}(a)?a.canActivate(t,i):o.runInContext(()=>a(t,i))).pipe(Yd())}));return dt(r).pipe(wm())}(i,r.route,e))),Yd(r=>!0!==r,!0))}(n,s,i,t):dt(a)),Qe(a=>({...e,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Di(o=>{if(n.guardsResult=o.guardsResult,Ah(o.guardsResult))throw xB(0,o.guardsResult);const a=new $7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),Dn(o=>!!o.guardsResult||(e.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),oI(o=>{if(o.guards.canActivateChecks.length)return dt(o).pipe(Di(a=>{const l=new W7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),vs(a=>{let l=!1;return dt(a).pipe(function nX(i,t){return qi(e=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return dt(e);let s=0;return Pi(r).pipe(qd(o=>function iX(i,t,e,n){const r=i.routeConfig,s=i._resolve;return void 0!==r?.title&&!zB(r)&&(s[uy]=r.title),function rX(i,t,e,n){const r=function sX(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}(i);if(0===r.length)return dt({});const s={};return Pi(r).pipe(qi(o=>function oX(i,t,e,n){const r=by(t)??n,s=xm(i,r);return Kd(s.resolve?s.resolve(t,e):r.runInContext(()=>s(t,e)))}(i[o],t,e,n).pipe(Yd(),Di(a=>{s[o]=a}))),UT(1),qN(s),Vc(o=>iI(o)?Os:pm(o)))}(s,i,t,n).pipe(Qe(o=>(i._resolvedData=o,i.data=vB(i,e).resolve,r&&zB(r)&&(i.data[uy]=r.title),null)))}(o.route,n,i,t)),Di(()=>s++),UT(1),qi(o=>s===r.length?dt(e):Os))})}(e.paramsInheritanceStrategy,this.environmentInjector),Di({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Di(a=>{const l=new j7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),oI(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Di(u=>{l.component=u}),Qe(()=>{})));for(const u of l.children)c.push(...a(u));return c};return jd(a(o.targetSnapshot.root)).pipe(iM(),Ai(1))}),oI(()=>this.afterPreactivation()),Qe(o=>{const a=function oq(i,t,e){const n=vy(i,t._root,e?e._root:void 0);return new gB(n,t)}(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return n={...o,targetRouterState:a}}),Di(o=>{e.currentUrlTree=o.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(o.urlAfterRedirects,o.rawUrl),e.routerState=o.targetRouterState,"deferred"===e.urlUpdateStrategy&&(o.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,o),e.browserUrlTree=o.urlAfterRedirects)}),((i,t,e)=>Qe(n=>(new gq(t,n.targetRouterState,n.currentRouterState,e).activate(i),n)))(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o)),Ai(1),Di({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Dh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),Xd(()=>{r||s||this.cancelNavigationTransition(n,"",1),this.currentNavigation?.id===n.id&&(this.currentNavigation=null)}),Vc(o=>{if(s=!0,CB(o)){MB(o)||(e.navigated=!0,e.restoreHistory(n,!0));const a=new uM(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),MB(o)){const l=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree),c={skipLocationChange:n.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||$B(n.source)};e.scheduleNavigation(l,_y,null,c,{resolve:n.resolve,reject:n.reject,promise:n.promise})}else n.resolve(!1)}else{e.restoreHistory(n,!0);const a=new YT(n.id,this.urlSerializer.serialize(n.extractedUrl),o,n.targetSnapshot??void 0);this.events.next(a);try{n.resolve(e.errorHandler(o))}catch(l){n.reject(l)}}return Os}))}))}cancelNavigationTransition(e,n,r){const s=new uM(e.id,this.urlSerializer.serialize(e.extractedUrl),n,r);this.events.next(s),e.resolve(!1)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function $B(i){return i!==_y}let WB=(()=>{class i{buildTitle(e){let n,r=e.root;for(;void 0!==r;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(s=>s.outlet===ln);return n}getResolvedTitleForRoute(e){return e.data[uy]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Nt(lX)},providedIn:"root"}),i})(),lX=(()=>{class i extends WB{constructor(e){super(),this.title=e}updateTitle(e){const n=this.buildTitle(e);void 0!==n&&this.title.setTitle(n)}}return i.\u0275fac=function(e){return new(e||i)(J(LN))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),cX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Nt(uX)},providedIn:"root"}),i})();class dX{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let uX=(()=>{class i extends dX{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const MM=new fe("",{providedIn:"root",factory:()=>({})});let fX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:function(){return Nt(pX)},providedIn:"root"}),i})(),pX=(()=>{class i{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function mX(i){throw i}function gX(i,t,e){return t.parse("/")}const _X={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},vX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Bo=(()=>{class i{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=Nt(Q6),this.isNgZoneEnabled=!1,this.options=Nt(MM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||mX,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||gX,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Nt(fX),this.routeReuseStrategy=Nt(cX),this.urlCreationStrategy=Nt(iq),this.titleStrategy=Nt(WB),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=KN(Nt(Mm,{optional:!0})??[]),this.navigationTransitions=Nt(wM),this.urlSerializer=Nt(fy),this.location=Nt(ey),this.isNgZoneEnabled=Nt(ot)instanceof ot&&ot.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Zd,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=_B(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),_y,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const n="popstate"===e.type?"popstate":"hashchange";"popstate"===n&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,n,e.state)},0)}))}navigateToSyncWithBrowser(e,n,r){const s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(s.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,n,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(nI),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,n={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:l}=n,c=l?this.currentUrlTree.fragment:o;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...s};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){const r=Ah(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,_y,null,n)}navigate(e,n={skipLocationChange:!1}){return function yX(i){for(let t=0;t{const s=e[r];return null!=s&&(n[r]=s),n},{})}scheduleNavigation(e,n,r,s,o){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:s,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(h=>Promise.reject(h))}setBrowserUrl(e,n){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||n.extras.replaceUrl){const o={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId)};this.location.replaceState(r,"",o)}else{const s={...n.extras.state,...this.generateNgRouterState(n.id,n.targetPageId)};this.location.go(r,"",s)}}restoreHistory(e,n=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-(this.browserPageId??this.currentPageId);0!==s?this.location.historyGo(s):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===s&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(n&&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,n){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class jB{}let wX=(()=>{class i{constructor(e,n,r,s,o){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(Dn(e=>e instanceof Dh),qd(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,n){const r=[];for(const s of n){s.providers&&!s._injector&&(s._injector=Iw(s.providers,e,`Route: ${s.path}`));const o=s._injector??e,a=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(a,s.children??s._loadedRoutes))}return Pi(r).pipe(gd())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(e,n):dt(null);const s=r.pipe(qi(o=>null===o?dt(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));return n.loadComponent&&!n._loadedComponent?Pi([s,this.loader.loadComponent(n)]).pipe(gd()):s})}}return i.\u0275fac=function(e){return new(e||i)(J(Bo),J(m2),J(Xa),J(jB),J(aI))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dI=new fe("");let YB=(()=>{class i{constructor(e,n,r,s,o={}){this.urlSerializer=e,this.transitions=n,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration=o.scrollPositionRestoration||"disabled",o.anchorScrolling=o.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 jT?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Dh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof pB&&(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,n){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new pB(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return i.\u0275fac=function(e){ho()},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();var Uo=(()=>((Uo=Uo||{})[Uo.COMPLETE=0]="COMPLETE",Uo[Uo.FAILED=1]="FAILED",Uo[Uo.REDIRECTING=2]="REDIRECTING",Uo))();const Cm=!1;function Qd(i,t){return{\u0275kind:i,\u0275providers:t}}const uI=new fe("",{providedIn:"root",factory:()=>!1});function XB(){const i=Nt(Fi);return t=>{const e=i.get(um);if(t!==e.components[0])return;const n=i.get(Bo),r=i.get(KB);1===i.get(hI)&&n.initialNavigation(),i.get(ZB,null,Et.Optional)?.setUpPreloading(),i.get(dI,null,Et.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const KB=new fe(Cm?"bootstrap done indicator":"",{factory:()=>new Fe}),hI=new fe(Cm?"initial navigation":"",{providedIn:"root",factory:()=>1});function AX(){let i=[];return i=Cm?[{provide:xr,multi:!0,useFactory:()=>{const t=Nt(Bo);return()=>t.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function J7(i){if(!("type"in i))return`Unknown Router Event: ${i.constructor.name}`;switch(i.type){case 14:return`ActivationEnd(path: '${i.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${i.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${i.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${i.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${i.id}, url: '${i.url}', urlAfterRedirects: '${i.urlAfterRedirects}', state: ${i.state}, shouldActivate: ${i.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${i.id}, url: '${i.url}', urlAfterRedirects: '${i.urlAfterRedirects}', state: ${i.state})`;case 2:return`NavigationCancel(id: ${i.id}, url: '${i.url}')`;case 16:return`NavigationSkipped(id: ${i.id}, url: '${i.url}')`;case 1:return`NavigationEnd(id: ${i.id}, url: '${i.url}', urlAfterRedirects: '${i.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${i.id}, url: '${i.url}', error: ${i.error})`;case 0:return`NavigationStart(id: ${i.id}, url: '${i.url}')`;case 6:return`ResolveEnd(id: ${i.id}, url: '${i.url}', urlAfterRedirects: '${i.urlAfterRedirects}', state: ${i.state})`;case 5:return`ResolveStart(id: ${i.id}, url: '${i.url}', urlAfterRedirects: '${i.urlAfterRedirects}', state: ${i.state})`;case 10:return`RouteConfigLoadEnd(path: ${i.route.path})`;case 9:return`RouteConfigLoadStart(path: ${i.route.path})`;case 4:return`RoutesRecognized(id: ${i.id}, url: '${i.url}', urlAfterRedirects: '${i.urlAfterRedirects}', state: ${i.state})`;case 15:return`Scroll(anchor: '${i.anchor}', position: '${i.position?`${i.position[0]}, ${i.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Qd(1,i)}const ZB=new fe(Cm?"router preloader":"");function DX(i){return Qd(0,[{provide:ZB,useExisting:wX},{provide:jB,useExisting:i}])}const Sy=!1,QB=new fe(Sy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),TX=[ey,{provide:fy,useClass:VT},Bo,yy,{provide:bm,useFactory:function qB(i){return i.routerState.root},deps:[Bo]},aI,Sy?{provide:uI,useValue:!0}:[]];function IX(){return new M2("Router",Bo)}let JB=(()=>{class i{constructor(e){}static forRoot(e,n){return{ngModule:i,providers:[TX,Sy&&n?.enableTracing?AX().\u0275providers:[],{provide:Mm,multi:!0,useValue:e},{provide:QB,useFactory:OX,deps:[[Bo,new ms,new Po]]},{provide:MM,useValue:n||{}},n?.useHash?{provide:Sh,useClass:Uj}:{provide:Sh,useClass:j2},{provide:dI,useFactory:()=>{const i=Nt(tY),t=Nt(ot),e=Nt(MM),n=Nt(wM),r=Nt(fy);return e.scrollOffset&&i.setOffset(e.scrollOffset),new YB(r,n,i,t,e)}},n?.preloadingStrategy?DX(n.preloadingStrategy).\u0275providers:[],{provide:M2,multi:!0,useFactory:IX},n?.initialNavigation?FX(n):[],[{provide:e3,useFactory:XB},{provide:w2,multi:!0,useExisting:e3}]]}}static forChild(e){return{ngModule:i,providers:[{provide:Mm,multi:!0,useValue:e}]}}}return i.\u0275fac=function(e){return new(e||i)(J(QB,8))},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[eI]}),i})();function OX(i){if(Sy&&i)throw new he(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 FX(i){return["disabled"===i.initialNavigation?Qd(3,[{provide:Ow,multi:!0,useFactory:()=>{const t=Nt(Bo);return()=>{t.setUpLocationChangeListener()}}},{provide:hI,useValue:2}]).\u0275providers:[],"enabledBlocking"===i.initialNavigation?Qd(2,[{provide:hI,useValue:0},{provide:Ow,multi:!0,deps:[Fi],useFactory:t=>{const e=t.get(Nj,Promise.resolve());return()=>e.then(()=>new Promise(n=>{const r=t.get(Bo),s=t.get(KB);(function MX(i,t){i.events.pipe(Dn(e=>e instanceof Dh||e instanceof uM||e instanceof YT||e instanceof hM),Qe(e=>e instanceof Dh||e instanceof hM?Uo.COMPLETE:e instanceof uM&&(0===e.code||1===e.code)?Uo.REDIRECTING:Uo.FAILED),Dn(e=>e!==Uo.REDIRECTING),Ai(1)).subscribe(()=>{t()})})(r,()=>{n(!0)}),t.get(wM).afterPreactivation=()=>(n(!0),s.closed?dt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const e3=new fe(Sy?"Router Initializer":""),NX=[];let BX=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[JB.forRoot(NX),JB]}),i})();function t3(i,t,e,n,r,s,o){try{var a=i[s](o),l=a.value}catch(c){return void e(c)}a.done?t(l):Promise.resolve(l).then(n,r)}function vt(i){return function(){var t=this,e=arguments;return new Promise(function(n,r){var s=i.apply(t,e);function o(l){t3(s,n,r,o,a,"next",l)}function a(l){t3(s,n,r,o,a,"throw",l)}o(void 0)})}}function jt(i){return null!=i&&"false"!=`${i}`}function ys(i,t=0){return function UX(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}(i)?Number(i):t}function CM(i){return Array.isArray(i)?i:[i]}function hr(i){return null==i?"":"string"==typeof i?i:`${i}px`}function Hc(i){return i instanceof lt?i.nativeElement:i}const VX=["addListener","removeListener"],zX=["addEventListener","removeEventListener"],HX=["on","off"];function wa(i,t,e,n){if(en(e)&&(n=e,e=void 0),n)return wa(i,t,e).pipe(NT(n));const[r,s]=function WX(i){return en(i.addEventListener)&&en(i.removeEventListener)}(i)?zX.map(o=>a=>i[o](t,a,e)):function GX(i){return en(i.addListener)&&en(i.removeListener)}(i)?VX.map(n3(i,t)):function $X(i){return en(i.on)&&en(i.off)}(i)?HX.map(n3(i,t)):[];if(!r&&Qg(i))return qi(o=>wa(o,t,e))(rr(i));if(!r)throw new TypeError("Invalid event target");return new En(o=>{const a=(...l)=>o.next(1s(a)})}function n3(i,t){return e=>n=>i[e](t,n)}class jX extends Yt{constructor(t,e){super()}schedule(t,e=0){return this}}const SM={setInterval(i,t,...e){const{delegate:n}=SM;return n?.setInterval?n.setInterval(i,t,...e):setInterval(i,t,...e)},clearInterval(i){const{delegate:t}=SM;return(t?.clearInterval||clearInterval)(i)},delegate:void 0};class fI extends jX{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var n;if(this.closed)return this;this.state=t;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,e)),this.pending=!0,this.delay=e,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,e),this}requestAsyncId(t,e,n=0){return SM.setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!=n&&this.delay===n&&!1===this.pending)return e;null!=e&&SM.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,n=!1;try{this.work(t)}catch(s){n=!0,r=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this,{actions:n}=e;this.work=this.state=this.scheduler=null,this.pending=!1,Zr(n,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}}const Ey={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:n}=Ey;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);const r=t(s=>{e=void 0,i(s)});return new Yt(()=>e?.(r))},requestAnimationFrame(...i){const{delegate:t}=Ey;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){const{delegate:t}=Ey;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0},r3={now:()=>(r3.delegate||Date).now(),delegate:void 0};class Ay{constructor(t,e=Ay.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}}Ay.now=r3.now;class pI extends Ay{constructor(t,e=Ay.now){super(t,e),this.actions=[],this._active=!1}flush(t){const{actions:e}=this;if(this._active)return void e.push(t);let n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const s3=new class qX extends pI{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}}}(class YX extends fI{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t._scheduled||(t._scheduled=Ey.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(t,e,n);const{actions:s}=t;null!=e&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==e&&(Ey.cancelAnimationFrame(e),t._scheduled=void 0)}});let mI,XX=1;const EM={};function o3(i){return i in EM&&(delete EM[i],!0)}const KX={setImmediate(i){const t=XX++;return EM[t]=!0,mI||(mI=Promise.resolve()),mI.then(()=>o3(t)&&i()),t},clearImmediate(i){o3(i)}},{setImmediate:ZX,clearImmediate:QX}=KX,AM={setImmediate(...i){const{delegate:t}=AM;return(t?.setImmediate||ZX)(...i)},clearImmediate(i){const{delegate:t}=AM;return(t?.clearImmediate||QX)(i)},delegate:void 0},gI=new class eK extends pI{flush(t){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;t=t||n.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}}}(class JX extends fI{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t._scheduled||(t._scheduled=AM.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(t,e,n);const{actions:s}=t;null!=e&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==e&&(AM.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}}),Dy=new pI(fI),tK=Dy;function DM(i=0,t,e=tK){let n=-1;return null!=t&&(Iu(t)?e=t:n=t),new En(r=>{let s=function iK(i){return i instanceof Date&&!isNaN(i)}(i)?+i-e.now():i;s<0&&(s=0);let o=0;return e.schedule(function(){r.closed||(r.next(o++),0<=n?this.schedule(void 0,n):r.complete())},s)})}function TM(i,t=Dy){return function nK(i){return Vn((t,e)=>{let n=!1,r=null,s=null,o=!1;const a=()=>{if(s?.unsubscribe(),s=null,n){n=!1;const c=r;r=null,e.next(c)}o&&e.complete()},l=()=>{s=null,o&&e.complete()};t.subscribe(Fn(e,c=>{n=!0,r=c,s||rr(i(c)).subscribe(s=Fn(e,a,l))},()=>{o=!0,(!n||!s||s.closed)&&e.complete()}))})}(()=>DM(i,t))}function Ze(i){return Vn((t,e)=>{rr(i).subscribe(Fn(e,()=>e.complete(),ds)),!e.closed&&t.subscribe(e)})}let _I;try{_I=typeof Intl<"u"&&Intl.v8BreakIterator}catch{_I=!1}let Sm,Ti=(()=>{class i{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function eY(i){return i===hN}(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&&!_I)&&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 i.\u0275fac=function(e){return new(e||i)(J(Z1))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const a3=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function l3(){if(Sm)return Sm;if("object"!=typeof document||!document)return Sm=new Set(a3),Sm;let i=document.createElement("input");return Sm=new Set(a3.filter(t=>(i.setAttribute("type",t),i.type===t))),Sm}let Ty,IM,Ih,vI;function Th(i){return function rK(){if(null==Ty&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ty=!0}))}finally{Ty=Ty||!1}return Ty}()?i:!!i.capture}function c3(){if(null==Ih){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Ih=!1,Ih;if("scrollBehavior"in document.documentElement.style)Ih=!0;else{const i=Element.prototype.scrollTo;Ih=!!i&&!/\{\s*\[native code\]\s*\}/.test(i.toString())}}return Ih}function Iy(){if("object"!=typeof document||!document)return 0;if(null==IM){const i=document.createElement("div"),t=i.style;i.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";const e=document.createElement("div"),n=e.style;n.width="2px",n.height="1px",i.appendChild(e),document.body.appendChild(i),IM=0,0===i.scrollLeft&&(i.scrollLeft=1,IM=0===i.scrollLeft?1:2),i.remove()}return IM}function RM(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){const t=i.shadowRoot.activeElement;if(t===i)break;i=t}return i}function Jd(i){return i.composedPath?i.composedPath()[0]:i.target}function yI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const aK=new fe("cdk-dir-doc",{providedIn:"root",factory:function lK(){return Nt(Ut)}}),cK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ma=(()=>{class i{constructor(e){this.value="ltr",this.change=new Ve,e&&(this.value=function dK(i){const t=i?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?cK.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 i.\u0275fac=function(e){return new(e||i)(J(aK,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Ry=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();const uK=["contentWrapper"],hK=["*"],fK=new fe("VIRTUAL_SCROLL_STRATEGY");let ky=(()=>{class i{constructor(e,n,r){this._ngZone=e,this._platform=n,this._scrolled=new Fe,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 n=this.scrollContainers.get(e);n&&(n.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new En(n=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(TM(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):dt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(e,n){const r=this.getAncestorScrollContainers(e);return this.scrolled(n).pipe(Dn(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(e){const n=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,e)&&n.push(s)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,n){let r=Hc(n),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>wa(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return i.\u0275fac=function(e){return new(e||i)(J(ot),J(Ti),J(Ut,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),d3=(()=>{class i{constructor(e,n,r,s){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Fe,this._elementScrolled=new En(o=>this.ngZone.runOutsideAngular(()=>wa(this.elementRef.nativeElement,"scroll").pipe(Ze(this._destroyed)).subscribe(o)))}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 n=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=n.scrollHeight-n.clientHeight-e.bottom),r&&0!=Iy()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==Iy()?e.left=e.right:1==Iy()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=n.scrollWidth-n.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const n=this.elementRef.nativeElement;c3()?n.scrollTo(e):(null!=e.top&&(n.scrollTop=e.top),null!=e.left&&(n.scrollLeft=e.left))}measureScrollOffset(e){const n="left",r="right",s=this.elementRef.nativeElement;if("top"==e)return s.scrollTop;if("bottom"==e)return s.scrollHeight-s.clientHeight-s.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==e?e=o?r:n:"end"==e&&(e=o?n:r),o&&2==Iy()?e==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==Iy()?e==n?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:e==n?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ky),A(ot),A(Ma,8))},i.\u0275dir=xe({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),i})(),kM=(()=>{class i{constructor(e,n,r){this._platform=e,this._change=new Fe,this._changeListener=s=>{this._change.next(s)},this._document=r,n.runOutsideAngular(()=>{if(e.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.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:n,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,n=this._getWindow(),r=e.documentElement,s=r.getBoundingClientRect();return{top:-s.top||e.body.scrollTop||n.scrollY||r.scrollTop||0,left:-s.left||e.body.scrollLeft||n.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(TM(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 i.\u0275fac=function(e){return new(e||i)(J(Ti),J(ot),J(Ut,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const u3=new fe("VIRTUAL_SCROLLABLE");let gK=(()=>{class i extends d3{constructor(e,n,r,s){super(e,n,r,s)}measureViewportSize(e){const n=this.elementRef.nativeElement;return"horizontal"===e?n.clientWidth:n.clientHeight}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ky),A(ot),A(Ma,8))},i.\u0275dir=xe({type:i,features:[rt]}),i})();const vK=typeof requestAnimationFrame<"u"?s3:gI;let yK=(()=>{class i extends gK{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=jt(e)}constructor(e,n,r,s,o,a,l,c){super(e,a,r,o),this.elementRef=e,this._changeDetectorRef=n,this._scrollStrategy=s,this.scrollable=c,this._platform=Nt(Ti),this._detachedSubject=new Fe,this._renderedRangeSubject=new Fe,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new En(u=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>u.next(h))))),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=Yt.EMPTY,this._viewportChanges=l.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(No(null),TM(0,vK)).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(Ze(this._detachedSubject)).subscribe(n=>{const r=n.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 _K(i,t){return i.start==t.start&&i.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,n="to-start"){e=this.appendOnly&&"to-start"===n?0:e;const s="horizontal"==this.orientation,o=s?"X":"Y";let l=`translate${o}(${Number((s&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===n&&(l+=` translate${o}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,n="auto"){const r={behavior:n};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,n="auto"){this._scrollStrategy.scrollToIndex(e,n)}measureScrollOffset(e){let n;return n=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,n(e??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let n;const r="left",s="right",o="rtl"==this.dir?.value;n="start"==e?o?s:r:"end"==e?o?r:s:e||("horizontal"===this.orientation?"left":"top");const a=this.scrollable.measureBoundingClientRectWithScrollOffset(n);return this.elementRef.nativeElement.getBoundingClientRect()[n]-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 n of e)n()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ri),A(ot),A(fK,8),A(Ma,8),A(ky),A(kM),A(u3,8))},i.\u0275cmp=it({type:i,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&Xn(uK,7),2&e){let r;Dt(r=Tt())&&(n._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&an("cdk-virtual-scroll-orientation-horizontal","horizontal"===n.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==n.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[An([{provide:d3,useFactory:(t,e)=>t||e,deps:[[new ms,new bp(u3)],i]}]),rt,F1],ngContentSelectors:hK,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(Ki(),j(0,"div",0,1),Bt(2),q(),ke(3,"div",2)),2&e&&($(3),va("width",n._totalContentWidth)("height",n._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}),i})(),Py=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})(),h3=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Ry,Py,yK,Ry,Py]}),i})();class bI{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 Rh extends bI{constructor(t,e,n,r,s){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class Em extends bI{constructor(t,e,n,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n,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 bK extends bI{constructor(t){super(),this.element=t instanceof lt?t.nativeElement:t}}class PM{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Rh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Em?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof bK?(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 xK extends PM{constructor(t,e,n,r,s){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=o=>{const a=o.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}attachComponentPortal(t){const n=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let r;return t.viewContainerRef?(r=t.viewContainerRef.createComponent(n,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector,t.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(t.injector||this._defaultInjector||Fi.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,n=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(n);-1!==r&&e.remove(r)}),this._attachedPortal=t,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let Am=(()=>{class i extends PM{constructor(e,n,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new Ve,this.attachDomPortal=s=>{const o=s.element,a=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(a,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(o,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 n=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,s=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),o=n.createComponent(s,n.length,e.injector||n.injector,e.projectableNodes||void 0);return n!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=e,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(e){e.setAttachedHost(this);const n=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}_getRootNode(){const e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return i.\u0275fac=function(e){return new(e||i)(A(Fl),A(Vr),A(Ut))},i.\u0275dir=xe({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[rt]}),i})(),kh=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();function Vo(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}const f3=c3();class FK{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=hr(-this._previousScrollPosition.left),t.style.top=hr(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,n=t.style,r=this._document.body.style,s=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),f3&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),f3&&(n.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const e=this._document.body,n=this._viewportRuler.getViewportSize();return e.scrollHeight>n.height||e.scrollWidth>n.width}}class LK{constructor(t,e,n,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,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(Dn(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 p3{enable(){}disable(){}attach(){}}function wI(i,t){return t.some(e=>i.bottome.bottom||i.righte.right)}function m3(i,t){return t.some(e=>i.tope.bottom||i.lefte.right)}class NK{constructor(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,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:n,height:r}=this._viewportRuler.getViewportSize();wI(e,[{width:n,height:r,bottom:r,right:n,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 BK=(()=>{class i{constructor(e,n,r,s){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new p3,this.close=o=>new LK(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new FK(this._viewportRuler,this._document),this.reposition=o=>new NK(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return i.\u0275fac=function(e){return new(e||i)(J(ky),J(kM),J(ot),J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class km{constructor(t){if(this.scrollStrategy=new p3,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const n of e)void 0!==t[n]&&(this[n]=t[n])}}}class UK{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let g3=(()=>{class i{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){const n=this._attachedOverlays.indexOf(e);n>-1&&this._attachedOverlays.splice(n,1),0===this._attachedOverlays.length&&this.detach()}}return i.\u0275fac=function(e){return new(e||i)(J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),VK=(()=>{class i extends g3{constructor(e,n){super(e),this._ngZone=n,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const a=s[o]._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 i.\u0275fac=function(e){return new(e||i)(J(Ut),J(ot,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),zK=(()=>{class i extends g3{constructor(e,n,r){super(e),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Jd(s)},this._clickListener=s=>{const o=Jd(s),a="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){const u=l[c];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(u.overlayElement.contains(o)||u.overlayElement.contains(a))break;const h=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(e){if(super.add(e),!this._isAttached){const n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.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 i.\u0275fac=function(e){return new(e||i)(J(Ut),J(Ti),J(ot,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),LM=(()=>{class i{constructor(e,n){this._platform=n,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||yI()){const r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let s=0;sthis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new Fe,this._outsidePointerEvents=new Fe,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(Ai(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=hr(this._config.width),t.height=hr(this._config.height),t.minWidth=hr(this._config.minWidth),t.minHeight=hr(this._config.minHeight),t.maxWidth=hr(this._config.maxWidth),t.maxHeight=hr(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,n){const r=CM(e||[]).filter(s=>!!s);r.length&&(n?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Ze(Rr(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 _3="cdk-overlay-connected-position-bounding-box",HK=/([A-Za-z%]+)$/;class GK{get positions(){return this._preferredPositions}constructor(t,e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s,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 Fe,this._resizeSubscription=Yt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(_3),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,n=this._viewportRect,r=this._containerRect,s=[];let o;for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),u=this._getOverlayFit(c,e,n,a);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(u,c,n)?s.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=u,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ph(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(_3),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,n){let r,s;if("center"==n.originX)r=t.left+t.width/2;else{const o=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==n.originX?o:a}return e.left<0&&(r-=e.left),s="center"==n.originY?t.top+t.height/2:"top"==n.originY?t.top:t.bottom,e.top<0&&(s-=e.top),{x:r,y:s}}_getOverlayPoint(t,e,n){let r,s;return r="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,s="center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height,{x:t.x+r,y:t.y+s}}_getOverlayFit(t,e,n,r){const s=y3(e);let{x:o,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(o+=l),c&&(a+=c);let p=0-a,m=a+s.height-n.height,g=this._subtractOverflows(s.width,0-o,o+s.width-n.width),b=this._subtractOverflows(s.height,p,m),v=g*b;return{visibleArea:v,isCompletelyWithinViewport:s.width*s.height===v,fitsInViewportVertically:b===s.height,fitsInViewportHorizontally:g==s.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){const r=n.bottom-e.y,s=n.right-e.x,o=v3(this._overlayRef.getConfig().minHeight),a=v3(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=o&&o<=r)&&(t.fitsInViewportHorizontally||null!=a&&a<=s)}return!1}_pushOverlayOnScreen(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const r=y3(e),s=this._viewportRect,o=Math.max(t.x+r.width-s.width,0),a=Math.max(t.y+r.height-s.height,0),l=Math.max(s.top-n.top-t.y,0),c=Math.max(s.left-n.left-t.x,0);let u=0,h=0;return u=r.width<=s.width?c||-o:t.xg&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-g/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)p=n.width-t.x+this._viewportMargin,u=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)h=t.x,u=n.right-t.x;else{const m=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;u=2*m,h=t.x-m,u>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:u,height:s}}_setBoundingBoxStyles(t,e){const n=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.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 s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=hr(n.height),r.top=hr(n.top),r.bottom=hr(n.bottom),r.width=hr(n.width),r.left=hr(n.left),r.right=hr(n.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",s&&(r.maxHeight=hr(s)),o&&(r.maxWidth=hr(o))}this._lastBoundingBoxSize=n,Ph(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Ph(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ph(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const n={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const u=this._viewportRuler.getViewportScrollPosition();Ph(n,this._getExactOverlayY(e,t,u)),Ph(n,this._getExactOverlayX(e,t,u))}else n.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),o.maxHeight&&(r?n.maxHeight=hr(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=hr(o.maxWidth):s&&(n.maxWidth="")),Ph(this._pane.style,n)}_getExactOverlayY(t,e,n){let r={top:"",bottom:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=hr(s.y),r}_getExactOverlayX(t,e,n){let o,r={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),o=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=hr(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:m3(t,n),isOriginOutsideView:wI(t,n),isOverlayClipped:m3(e,n),isOverlayOutsideView:wI(e,n)}}_subtractOverflows(t,...e){return e.reduce((n,r)=>n-Math.max(r,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.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&&CM(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 lt)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,n=t.height||0;return{top:t.y,bottom:t.y+n,left:t.x,right:t.x+e,height:n,width:e}}}function Ph(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function v3(i){if("number"!=typeof i&&null!=i){const[t,e]=i.split(HK);return e&&"px"!==e?null:parseFloat(t)}return i||null}function y3(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}const b3="cdk-global-overlay-wrapper";class x3{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(b3),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,n=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:a}=n,l=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==s&&"100vh"!==s||a&&"100%"!==a&&"100vh"!==a),u=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===u?(b="center",p?g=h:m=h):p?"left"===u||"end"===u?(b="flex-end",m=h):("right"===u||"start"===u)&&(b="flex-start",g=h):"left"===u||"start"===u?(b="flex-start",m=h):("right"===u||"end"===u)&&(b="flex-end",g=h),t.position=this._cssPosition,t.marginLeft=l?"0":m,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":g,e.justifyContent=b,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(b3),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let $K=(()=>{class i{constructor(e,n,r,s){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new x3}flexibleConnectedTo(e){return new GK(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return i.\u0275fac=function(e){return new(e||i)(J(kM),J(Ut),J(Ti),J(LM))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),WK=0,os=(()=>{class i{constructor(e,n,r,s,o,a,l,c,u,h,p,m){this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=a,this._ngZone=l,this._document=c,this._directionality=u,this._location=h,this._outsideClickDispatcher=p,this._animationsModuleType=m}create(e){const n=this._createHostElement(),r=this._createPaneElement(n),s=this._createPortalOutlet(r),o=new km(e);return o.direction=o.direction||this._directionality.value,new Fy(s,n,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){const n=this._document.createElement("div");return n.id="cdk-overlay-"+WK++,n.classList.add("cdk-overlay-pane"),e.appendChild(n),n}_createHostElement(){const e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(um)),new xK(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return i.\u0275fac=function(e){return new(e||i)(J(BK),J(LM),J(Fl),J($K),J(VK),J(Fi),J(ot),J(Ut),J(Ma),J(ey),J(zK),J(Cr,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const jK=[{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"}],w3=new fe("cdk-connected-overlay-scroll-strategy");let MI=(()=>{class i{constructor(e){this.elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(A(lt))},i.\u0275dir=xe({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),i})(),M3=(()=>{class i{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=jt(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=jt(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=jt(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=jt(e)}get push(){return this._push}set push(e){this._push=jt(e)}constructor(e,n,r,s,o){this._overlay=e,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=Yt.EMPTY,this._attachSubscription=Yt.EMPTY,this._detachSubscription=Yt.EMPTY,this._positionSubscription=Yt.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new Ve,this.positionChange=new Ve,this.attach=new Ve,this.detach=new Ve,this.overlayKeydown=new Ve,this.overlayOutsideClick=new Ve,this._templatePortal=new Em(n,r),this._scrollStrategyFactory=s,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=jK);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(n=>{this.overlayKeydown.next(n),27===n.keyCode&&!this.disableClose&&!Vo(n)&&(n.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{this.overlayOutsideClick.next(n)})}_buildConfig(){const e=this._position=this.positionStrategy||this._createPositionStrategy(),n=new km({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(n.width=this.width),(this.height||0===this.height)&&(n.height=this.height),(this.minWidth||0===this.minWidth)&&(n.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(e){const n=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(n).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 MI?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(YN(()=>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 i.\u0275fac=function(e){return new(e||i)(A(os),A(mo),A(Vr),A(w3),A(Ma,8))},i.\u0275dir=xe({type:i,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:[Si]}),i})();const qK={provide:w3,deps:[os],useFactory:function YK(i){return()=>i.scrollStrategies.reposition()}};let Pm=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[os,qK],imports:[Ry,kh,h3,h3]}),i})();function Gc(i,t=Dy){return Vn((e,n)=>{let r=null,s=null,o=null;const a=()=>{if(r){r.unsubscribe(),r=null;const c=s;s=null,n.next(c)}};function l(){const c=o+i,u=t.now();if(u{s=c,o=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{s=r=null}))})}function C3(i){return Dn((t,e)=>i<=e)}function $c(i,t=Na){return i=i??XK,Vn((e,n)=>{let r,s=!0;e.subscribe(Fn(n,o=>{const a=t(o);(s||!i(r,a))&&(s=!1,r=a,n.next(o))}))})}function XK(i,t){return i===t}let S3=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),KK=(()=>{class i{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){const n=Hc(e);return new En(r=>{const o=this._observeElement(n).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(n)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const n=new Fe,r=this._mutationObserverFactory.create(s=>n.next(s));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:n,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:n,stream:r}=this._observedElements.get(e);n&&n.disconnect(),r.complete(),this._observedElements.delete(e)}}}return i.\u0275fac=function(e){return new(e||i)(J(S3))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),E3=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=jt(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=ys(e),this._subscribe()}constructor(e,n,r){this._contentObserver=e,this._elementRef=n,this._ngZone=r,this.event=new Ve,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(Gc(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(A(KK),A(lt),A(ot))},i.\u0275dir=xe({type:i,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),i})(),CI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[S3]}),i})();const A3=new Set;let Om,ZK=(()=>{class i{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):JK}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function QK(i){if(!A3.has(i))try{Om||(Om=document.createElement("style"),Om.setAttribute("type","text/css"),document.head.appendChild(Om)),Om.sheet&&(Om.sheet.insertRule(`@media ${i} {body{ }}`,0),A3.add(i))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return i.\u0275fac=function(e){return new(e||i)(J(Ti))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function JK(i){return{matches:"all"===i||""===i,media:i,addListener:()=>{},removeListener:()=>{}}}let SI=(()=>{class i{constructor(e,n){this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new Fe}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return D3(CM(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=jd(D3(CM(e)).map(o=>this._registerQuery(o).observable));return s=cy(s.pipe(Ai(1)),s.pipe(C3(1),Gc(0))),s.pipe(Qe(o=>{const a={matches:!1,breakpoints:{}};return o.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const n=this._mediaMatcher.matchMedia(e),s={observable:new En(o=>{const a=l=>this._zone.run(()=>o.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(No(n),Qe(({matches:o})=>({query:e,matches:o})),Ze(this._destroySubject)),mql:n};return this._queries.set(e,s),s}}return i.\u0275fac=function(e){return new(e||i)(J(ZK),J(ot))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function D3(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function NM(i,t){return(i.getAttribute(t)||"").match(/\S+/g)||[]}const I3="cdk-describedby-message",BM="cdk-describedby-host";let EI=0,iZ=(()=>{class i{constructor(e,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+EI++,this._document=e,this._id=Nt(dm)+"-"+EI++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;const s=AI(n,r);"string"!=typeof n?(R3(n,this._id),this._messageRegistry.set(s,{messageElement:n,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(n,r),this._isElementDescribedByMessage(e,s)||this._addMessageReference(e,s)}removeDescription(e,n,r){if(!n||!this._isElementNode(e))return;const s=AI(n,r);if(this._isElementDescribedByMessage(e,s)&&this._removeMessageReference(e,s),"string"==typeof n){const o=this._messageRegistry.get(s);o&&0===o.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const e=this._document.querySelectorAll(`[${BM}="${this._id}"]`);for(let n=0;n0!=r.indexOf(I3));e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){const r=this._messageRegistry.get(n);(function tZ(i,t,e){const n=NM(i,t);n.some(r=>r.trim()==e.trim())||(n.push(e.trim()),i.setAttribute(t,n.join(" ")))})(e,"aria-describedby",r.messageElement.id),e.setAttribute(BM,this._id),r.referenceCount++}_removeMessageReference(e,n){const r=this._messageRegistry.get(n);r.referenceCount--,function nZ(i,t,e){const r=NM(i,t).filter(s=>s!=e.trim());r.length?i.setAttribute(t,r.join(" ")):i.removeAttribute(t)}(e,"aria-describedby",r.messageElement.id),e.removeAttribute(BM)}_isElementDescribedByMessage(e,n){const r=NM(e,"aria-describedby"),s=this._messageRegistry.get(n),o=s&&s.messageElement.id;return!!o&&-1!=r.indexOf(o)}_canBeDescribed(e,n){if(!this._isElementNode(e))return!1;if(n&&"object"==typeof n)return!0;const r=null==n?"":`${n}`.trim(),s=e.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return i.\u0275fac=function(e){return new(e||i)(J(Ut),J(Ti))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function AI(i,t){return"string"==typeof i?`${t||""}/${i}`:i}function R3(i,t){i.id||(i.id=`${I3}-${t}-${EI++}`)}class k3{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Fe,this._typeaheadSubscription=Yt.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 Fe,this.change=new Fe,t instanceof am&&(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(Di(e=>this._pressedLetters.push(e)),Gc(t),Dn(()=>this._pressedLetters.length>0),Qe(()=>this._pressedLetters.join(""))).subscribe(e=>{const n=this._getItemsArray();for(let r=1;r!t[s]||this._allowedModifierKeys.indexOf(s)>-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 s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s=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(),n="number"==typeof t?t:e.indexOf(t);this._activeItem=e[n]??null,this._activeItemIndex=n}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 n=1;n<=e.length;n++){const r=(this._activeItemIndex+t*n+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 n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof am?this._items.toArray():this._items}}class rZ extends k3{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class P3 extends k3{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 UM=(()=>{class i{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function oZ(i){return!!(i.offsetWidth||i.offsetHeight||"function"==typeof i.getClientRects&&i.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;const n=function sZ(i){try{return i.frameElement}catch{return null}}(function pZ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}(e));if(n&&(-1===F3(n)||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),s=F3(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function hZ(i){let t=i.nodeName.toLowerCase(),e="input"===t&&i.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,n){return function fZ(i){return!function lZ(i){return function dZ(i){return"input"==i.nodeName.toLowerCase()}(i)&&"hidden"==i.type}(i)&&(function aZ(i){let t=i.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(i)||function cZ(i){return function uZ(i){return"a"==i.nodeName.toLowerCase()}(i)&&i.hasAttribute("href")}(i)||i.hasAttribute("contenteditable")||O3(i))}(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}}return i.\u0275fac=function(e){return new(e||i)(J(Ti))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function O3(i){if(!i.hasAttribute("tabindex")||void 0===i.tabIndex)return!1;let t=i.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function F3(i){if(!O3(i))return null;const t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}class mZ{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,n,r,s=!1){this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||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 n=this._getFirstTabbableElement(e);return n?.focus(t),!!n}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 n=0;n=0;n--){const r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):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(Ai(1)).subscribe(t)}}let DI=(()=>{class i{constructor(e,n,r){this._checker=e,this._ngZone=n,this._document=r}create(e,n=!1){return new mZ(e,this._checker,this._ngZone,this._document,n)}}return i.\u0275fac=function(e){return new(e||i)(J(UM),J(ot),J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function TI(i){return 0===i.buttons||0===i.offsetX&&0===i.offsetY}function II(i){const t=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}const gZ=new fe("cdk-input-modality-detector-options"),_Z={ignoreKeys:[18,17,224,91,16]},Fm=Th({passive:!0,capture:!0});let vZ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(e,n,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new Ct(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Jd(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(TI(o)?"keyboard":"mouse"),this._mostRecentTarget=Jd(o))},this._onTouchstart=o=>{II(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Jd(o))},this._options={..._Z,...s},this.modalityDetected=this._modality.pipe(C3(1)),this.modalityChanged=this.modalityDetected.pipe($c()),e.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Fm),r.addEventListener("mousedown",this._onMousedown,Fm),r.addEventListener("touchstart",this._onTouchstart,Fm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Fm),document.removeEventListener("mousedown",this._onMousedown,Fm),document.removeEventListener("touchstart",this._onTouchstart,Fm))}}return i.\u0275fac=function(e){return new(e||i)(J(Ti),J(ot),J(Ut),J(gZ,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const yZ=new fe("liveAnnouncerElement",{providedIn:"root",factory:function bZ(){return null}}),xZ=new fe("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let wZ=0,RI=(()=>{class i{constructor(e,n,r,s){this._ngZone=n,this._defaultOptions=s,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...n){const r=this._defaultOptions;let s,o;return 1===n.length&&"number"==typeof n[0]?o=n[0]:[s,o]=n,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),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 o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),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",n=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class i{constructor(e,n,r,s,o){this._ngZone=e,this._platform=n,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 Fe,this._rootNodeFocusAndBlurListener=a=>{for(let c=Jd(a);c;c=c.parentElement)"focus"===a.type?this._onFocus(a,c):this._onBlur(a,c)},this._document=s,this._detectionMode=o?.detectionMode||0}monitor(e,n=!1){const r=Hc(e);if(!this._platform.isBrowser||1!==r.nodeType)return dt(null);const s=function oK(i){if(function sK(){if(null==vI){const i=typeof document<"u"?document.head:null;vI=!(!i||!i.createShadowRoot&&!i.attachShadow)}return vI}()){const t=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return n&&(o.checkChildren=!0),o.subject;const a={checkChildren:n,subject:new Fe,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){const n=Hc(e),r=this._elementInfo.get(n);r&&(r.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(r))}focusVia(e,n,r){const s=Hc(e);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,n,l)):(this._setOrigin(n),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,n)=>this.stopMonitoring(n))}_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,n){e.classList.toggle("cdk-focused",!!n),e.classList.toggle("cdk-touch-focused","touch"===n),e.classList.toggle("cdk-keyboard-focused","keyboard"===n),e.classList.toggle("cdk-mouse-focused","mouse"===n),e.classList.toggle("cdk-program-focused","program"===n)}_setOrigin(e,n=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&n,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,n){const r=this._elementInfo.get(n),s=Jd(e);!r||!r.checkChildren&&n!==s||this._originChanged(n,this._getFocusOrigin(s),r)}_onBlur(e,n){const r=this._elementInfo.get(n);!r||r.checkChildren&&e.relatedTarget instanceof Node&&n.contains(e.relatedTarget)||(this._setClasses(n),this._emitOrigin(r,null))}_emitOrigin(e,n){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(n))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const n=e.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,VM),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,VM)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ze(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(e){const n=e.rootNode;if(this._rootNodeFocusListenerCount.has(n)){const r=this._rootNodeFocusListenerCount.get(n);r>1?this._rootNodeFocusListenerCount.set(n,r-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,VM),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,VM),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,n,r){this._setClasses(e,n),this._emitOrigin(r,n),this._lastFocusOrigin=n}_getClosestElementsInfo(e){const n=[];return this._elementInfo.forEach((r,s)=>{(s===e||r.checkChildren&&s.contains(e))&&n.push([s,r])}),n}_isLastInteractionFromInputLabel(e){const{_mostRecentTarget:n,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!n||n===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;const s=e.labels;if(s)for(let o=0;o{class i{constructor(e,n){this._platform=e,this._document=n,this._breakpointSubscription=Nt(SI).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 n=this._document.defaultView||window,r=n&&n.getComputedStyle?n.getComputedStyle(e):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),s){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(kI,N3,B3),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();1===n?e.add(kI,N3):2===n&&e.add(kI,B3)}}}return i.\u0275fac=function(e){return new(e||i)(J(Ti),J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),V3=(()=>{class i{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return i.\u0275fac=function(e){return new(e||i)(J(U3))},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[CI]}),i})();function CZ(i,t){}class zM{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 z3=(()=>{class i extends PM{constructor(e,n,r,s,o,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=n,this._config=s,this._interactivityChecker=o,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),h},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 n=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),n}attachTemplatePortal(e){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,n){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(n)}_focusByCssSelector(e,n){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,n)}_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(n=>{n||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 n=null;if("string"==typeof e?n=this._document.querySelector(e):"boolean"==typeof e?n=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(n=e),this._config.restoreFocus&&n&&"function"==typeof n.focus){const r=RM(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const e=this._elementRef.nativeElement,n=RM();return e===n||e.contains(n)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=RM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(DI),A(Ut,8),A(zM),A(UM),A(ot),A(Fy),A(Wc))},i.\u0275cmp=it({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,n){if(1&e&&Xn(Am,7),2&e){let r;Dt(r=Tt())&&(n._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,n){2&e&&At("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledBy)("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[rt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,n){1&e&&_e(0,CZ,0,0,"ng-template",0)},dependencies:[Am],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),i})();class PI{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Fe,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{27===n.keyCode&&!this.disableClose&&!Vo(n)&&(n.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 n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(t),n.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 H3=new fe("DialogScrollStrategy"),SZ=new fe("DialogData"),EZ=new fe("DefaultDialogConfig"),DZ={provide:H3,deps:[os],useFactory:function AZ(i){return()=>i.scrollStrategies.block()}};let TZ=0,G3=(()=>{class i{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,n,r,s,o,a){this._overlay=e,this._injector=n,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Fe,this._afterOpenedAtThisLevel=new Fe,this._ariaHiddenElements=new Map,this.afterAllClosed=dy(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(No(void 0))),this._scrollStrategy=a}open(e,n){(n={...this._defaultOptions||new zM,...n}).id=n.id||"cdk-dialog-"+TZ++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),a=new PI(o,n),l=this._attachContainer(o,a,n);return a.containerInstance=l,this._attachDialogContent(e,a,l,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){OI(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){OI(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),OI(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const n=new km({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&&(n.backdropClass=e.backdropClass),n}_attachContainer(e,n,r){const s=r.injector||r.viewContainerRef?.injector,o=[{provide:zM,useValue:r},{provide:PI,useValue:n},{provide:Fy,useValue:e}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=z3;const l=new Rh(a,r.viewContainerRef,Fi.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,n,r,s){if(e instanceof mo){const o=this._createInjector(s,n,r,void 0);let a={$implicit:s.data,dialogRef:n};s.templateContext&&(a={...a,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new Em(e,null,a,o))}else{const o=this._createInjector(s,n,r,this._injector),a=r.attachComponentPortal(new Rh(e,s.viewContainerRef,o,s.componentFactoryResolver));n.componentInstance=a.instance}}_createInjector(e,n,r,s){const o=e.injector||e.viewContainerRef?.injector,a=[{provide:SZ,useValue:e.data},{provide:PI,useValue:n}];return e.providers&&("function"==typeof e.providers?a.push(...e.providers(n,e,r)):a.push(...e.providers)),e.direction&&(!o||!o.get(Ma,null,{optional:!0}))&&a.push({provide:Ma,useValue:{value:e.direction,change:dt()}}),Fi.create({parent:o||s,providers:a})}_removeOpenDialog(e,n){const r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const e=this._overlayContainer.getContainerElement();if(e.parentElement){const n=e.parentElement.children;for(let r=n.length-1;r>-1;r--){const s=n[r];s!==e&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return i.\u0275fac=function(e){return new(e||i)(J(os),J(Fi),J(EZ,8),J(i,12),J(LM),J(H3))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();function OI(i,t){let e=i.length;for(;e--;)t(i[e])}let IZ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[G3,DZ],imports:[Pm,kh,V3,kh]}),i})();const RZ=["text"];function kZ(i,t){if(1&i&&ke(0,"mat-pseudo-checkbox",6),2&i){const e=ye();z("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function PZ(i,t){1&i&&ke(0,"mat-pseudo-checkbox",7),2&i&&z("disabled",ye().disabled)}function OZ(i,t){if(1&i&&(j(0,"span",8),Ye(1),q()),2&i){const e=ye();$(1),Zi("(",e.group.label,")")}}const FZ=[[["mat-icon"]],"*"],LZ=["mat-icon","*"],BZ=new fe("mat-sanity-checks",{providedIn:"root",factory:function NZ(){return!0}});let Gn=(()=>{class i{constructor(e,n,r){this._sanityChecks=n,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!yI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return i.\u0275fac=function(e){return new(e||i)(J(U3),J(BZ,8),J(Ut))},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Ry,Ry]}),i})();function HM(i){return class extends i{get disabled(){return this._disabled}set disabled(t){this._disabled=jt(t)}constructor(...t){super(...t),this._disabled=!1}}}function Ly(i,t){return class extends i{get color(){return this._color}set color(e){const n=e||this.defaultColor;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),n&&this._elementRef.nativeElement.classList.add(`mat-${n}`),this._color=n)}constructor(...e){super(...e),this.defaultColor=t,this.color=t}}}function GM(i){return class extends i{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=jt(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function FI(i,t=0){return class extends i{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?ys(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function j3(i){return class extends i{updateErrorState(){const t=this.errorState,s=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);s!==t&&(this.errorState=s,this.stateChanges.next())}constructor(...t){super(...t),this.errorState=!1}}}function UZ(i){return class extends i{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new En(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 q3=(()=>{class i{isErrorState(e,n){return!!(e&&e.invalid&&(e.touched||n&&n.submitted))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();class zZ{constructor(t,e,n,r=!1){this._renderer=t,this.element=e,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const X3=Th({passive:!0,capture:!0});class HZ{constructor(){this._events=new Map,this._delegateEventHandler=t=>{const e=Jd(t);e&&this._events.get(t.type)?.forEach((n,r)=>{(r===e||r.contains(e))&&n.forEach(s=>s.handleEvent(t))})}}addHandler(t,e,n,r){const s=this._events.get(e);if(s){const o=s.get(n);o?o.add(r):s.set(n,new Set([r]))}else this._events.set(e,new Map([[n,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,X3)})}removeHandler(t,e,n){const r=this._events.get(t);if(!r)return;const s=r.get(e);s&&(s.delete(n),0===s.size&&r.delete(e),0===r.size&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,X3)))}}const K3={enterDuration:225,exitDuration:150},Z3=Th({passive:!0,capture:!0}),Q3=["mousedown","touchstart"],J3=["mouseup","mouseleave","touchend","touchcancel"];class Lm{constructor(t,e,n,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Hc(n))}fadeInRipple(t,e,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...K3,...n.animation};n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);const o=n.radius||function $Z(i,t,e){const n=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(n*n+r*r)}(t,e,r),a=t-r.left,l=e-r.top,c=s.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=a-o+"px",u.style.top=l-o+"px",u.style.height=2*o+"px",u.style.width=2*o+"px",null!=n.color&&(u.style.backgroundColor=n.color),u.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(u);const h=window.getComputedStyle(u),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new zZ(this,u,n,g);u.style.transform="scale3d(1, 1, 1)",b.state=0,n.persistent||(this._mostRecentTransientRipple=b);let v=null;return!g&&(c||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const y=()=>this._finishRippleTransition(b),M=()=>this._destroyRipple(b);u.addEventListener("transitionend",y),u.addEventListener("transitioncancel",M),v={onTransitionEnd:y,onTransitionCancel:M}}),this._activeRipples.set(b,v),(g||!c)&&this._finishRippleTransition(b),b}fadeOutRipple(t){if(2===t.state||3===t.state)return;const e=t.element,n={...K3,...t.config.animation};e.style.transitionDuration=`${n.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!n.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=Hc(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,Q3.forEach(n=>{Lm._eventManager.addHandler(this._ngZone,n,e,this)}))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{J3.forEach(e=>{this._triggerElement.addEventListener(e,this,Z3)})}),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:n}=t.config;t.state=1,!n&&(!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=TI(t),n=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&&(Q3.forEach(e=>Lm._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&J3.forEach(e=>t.removeEventListener(e,this,Z3)))}}Lm._eventManager=new HZ;const LI=new fe("mat-ripple-global-options");let Oh=(()=>{class i{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,n,r,s,o){this._elementRef=e,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new Lm(this,n,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,n=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,n,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...e})}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot),A(Ti),A(LI,8),A(Cr,8))},i.\u0275dir=xe({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,n){2&e&&an("mat-ripple-unbounded",n.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"]}),i})(),By=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,Gn]}),i})(),WZ=(()=>{class i{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return i.\u0275fac=function(e){return new(e||i)(A(Cr,8))},i.\u0275cmp=it({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,n){2&e&&an("mat-pseudo-checkbox-indeterminate","indeterminate"===n.state)("mat-pseudo-checkbox-checked","checked"===n.state)("mat-pseudo-checkbox-disabled",n.disabled)("mat-pseudo-checkbox-minimal","minimal"===n.appearance)("mat-pseudo-checkbox-full","full"===n.appearance)("_mat-animation-noopable","NoopAnimations"===n._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(e,n){},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}),i})(),eU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn]}),i})();const tU=new fe("MAT_OPTION_PARENT_COMPONENT"),nU=new fe("MatOptgroup");let jZ=0;class YZ{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let qZ=(()=>{class i{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=jt(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(e,n,r,s){this._element=e,this._changeDetectorRef=n,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+jZ++,this.onSelectionChange=new Ve,this._stateChanges=new Fe}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,n){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(n)}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)&&!Vo(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 YZ(this,e))}}return i.\u0275fac=function(e){ho()},i.\u0275dir=xe({type:i,viewQuery:function(e,n){if(1&e&&Xn(RZ,7),2&e){let r;Dt(r=Tt())&&(n._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),i})(),Nm=(()=>{class i extends qZ{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ri),A(tU,8),A(nU,8))},i.\u0275cmp=it({type:i,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,n){1&e&&ze("click",function(){return n._selectViaInteraction()})("keydown",function(s){return n._handleKeydown(s)}),2&e&&(Vl("id",n.id),At("aria-selected",n.selected)("aria-disabled",n.disabled.toString()),an("mdc-list-item--selected",n.selected)("mat-mdc-option-multiple",n.multiple)("mat-mdc-option-active",n.active)("mdc-list-item--disabled",n.disabled))},exportAs:["matOption"],features:[rt],ngContentSelectors:LZ,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,n){1&e&&(Ki(FZ),_e(0,kZ,1,2,"mat-pseudo-checkbox",0),Bt(1),j(2,"span",1,2),Bt(4,1),q(),_e(5,PZ,1,1,"mat-pseudo-checkbox",3),_e(6,OZ,2,1,"span",4),ke(7,"div",5)),2&e&&(z("ngIf",n.multiple),$(5),z("ngIf",!n.multiple&&n.selected&&!n.hideSingleSelectionIndicator),$(1),z("ngIf",n.group&&n.group._inert),$(1),z("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disabled||n.disableRipple))},dependencies:[Oh,gi,WZ],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}),i})(),NI=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[By,vo,Gn,eU]}),i})();class iU{}class ZZ{}const jc="*";function Ca(i,t){return{type:7,name:i,definitions:t,options:{}}}function zr(i,t=null){return{type:4,styles:t,timings:i}}function sU(i,t=null){return{type:2,steps:i,options:t}}function Yn(i){return{type:6,styles:i,offset:null}}function bs(i,t,e){return{type:0,name:i,styles:t,options:e}}function oU(i){return{type:5,steps:i}}function Er(i,t,e=null){return{type:1,expr:i,animation:t,options:e}}function BI(i=null){return{type:9,options:i}}function UI(i,t,e=null){return{type:11,selector:i,animation:t,options:e}}function aU(i){Promise.resolve().then(i)}class Uy{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(){aU(()=>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(n=>n()),e.length=0}}class lU{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,n=0,r=0;const s=this.players.length;0==s?aU(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++e==s&&this._onFinish()}),o.onDestroy(()=>{++n==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,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(n=>{const r=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(r)})}getPosition(){const t=this.players.reduce((e,n)=>null===e||n.totalTime>e.totalTime?n: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(n=>n()),e.length=0}}const VI="!";function QZ(i,t){}class $M{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 zI="mdc-dialog--open",cU="mdc-dialog--opening",dU="mdc-dialog--closing";let tQ=(()=>{class i extends z3{constructor(e,n,r,s,o,a,l,c){super(e,n,r,s,o,a,l,c),this._animationStateChanged=new Ve}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(DI),A(Ut,8),A($M),A(UM),A(ot),A(Fy),A(Wc))},i.\u0275cmp=it({type:i,selectors:[["ng-component"]],features:[rt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();const uU="--mat-dialog-transition-duration";function hU(i){return null==i?null:"number"==typeof i?i:i.endsWith("ms")?ys(i.substring(0,i.length-2)):i.endsWith("s")?1e3*ys(i.substring(0,i.length-1)):"0"===i?0:null}let nQ=(()=>{class i extends tQ{constructor(e,n,r,s,o,a,l,c,u){super(e,n,r,s,o,a,l,u),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?hU(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?hU(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(uU,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(cU,zI)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(zI),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(zI),this._animationsEnabled?(this._hostElement.style.setProperty(uU,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(dU)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(cU,dU)}_waitForAnimationToComplete(e,n){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(DI),A(Ut,8),A($M),A(UM),A(ot),A(Fy),A(Cr,8),A(Wc))},i.\u0275cmp=it({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,n){2&e&&(Vl("id",n._config.id),At("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledBy)("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),an("_mat-animation-noopable",!n._animationsEnabled))},features:[rt],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(j(0,"div",0)(1,"div",1),_e(2,QZ,0,0,"ng-template",2),q()())},dependencies:[Am],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}),i})();class Vy{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new Fe,this._beforeClosed=new Fe,this._state=0,this.disableClose=e.disableClose,this.id=t.id,n._animationStateChanged.pipe(Dn(r=>"opened"===r.state),Ai(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(Dn(r=>"closed"===r.state),Ai(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Rr(this.backdropClick(),this.keydownEvents().pipe(Dn(r=>27===r.keyCode&&!this.disableClose&&!Vo(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),fU(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(Dn(e=>"closing"===e.state),Ai(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 fU(i,t,e){return i._closeInteractionType=t,i.close(e)}const HI=new fe("MatMdcDialogData"),iQ=new fe("mat-mdc-dialog-default-options"),pU=new fe("mat-mdc-dialog-scroll-strategy"),sQ={provide:pU,deps:[os],useFactory:function rQ(i){return()=>i.scrollStrategies.block()}};let oQ=0,aQ=(()=>{class i{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,n,r,s,o,a,l,c,u,h){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Fe,this._afterOpenedAtThisLevel=new Fe,this._idPrefix="mat-dialog-",this.dialogConfigClass=$M,this.afterAllClosed=dy(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(No(void 0))),this._scrollStrategy=a,this._dialog=n.get(G3)}open(e,n){let r;(n={...this._defaultOptions||new $M,...n}).id=n.id||`${this._idPrefix}${oQ++}`,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(e,{...n,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:zM,useValue:n}]},templateContext:()=>({dialogRef:r}),providers:(o,a,l)=>(r=new this._dialogRefConstructor(o,n,l),r.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let n=e.length;for(;n--;)e[n].close()}}return i.\u0275fac=function(e){ho()},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),Bm=(()=>{class i extends aQ{constructor(e,n,r,s,o,a,l,c){super(e,n,s,a,l,o,Vy,nQ,HI,c),this._idPrefix="mat-mdc-dialog-"}}return i.\u0275fac=function(e){return new(e||i)(J(os),J(Fi),J(ey,8),J(iQ,8),J(pU),J(i,12),J(LM),J(Cr,8))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),lQ=0,cQ=(()=>{class i{constructor(e,n,r){this.dialogRef=e,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=vU(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){fU(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return i.\u0275fac=function(e){return new(e||i)(A(Vy,8),A(lt),A(Bm))},i.\u0275dir=xe({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,n){1&e&&ze("click",function(s){return n._onButtonClick(s)}),2&e&&At("aria-label",n.ariaLabel||null)("type",n.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Si]}),i})(),mU=(()=>{class i{constructor(e,n,r){this._dialogRef=e,this._elementRef=n,this._dialog=r,this.id="mat-mdc-dialog-title-"+lQ++}ngOnInit(){this._dialogRef||(this._dialogRef=vU(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const e=this._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=this.id)})}}return i.\u0275fac=function(e){return new(e||i)(A(Vy,8),A(lt),A(Bm))},i.\u0275dir=xe({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,n){2&e&&Vl("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),i})(),gU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),i})(),_U=(()=>{class i{constructor(){this.align="start"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(e,n){2&e&&an("mat-mdc-dialog-actions-align-center","center"===n.align)("mat-mdc-dialog-actions-align-end","end"===n.align)},inputs:{align:"align"}}),i})();function vU(i,t){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(n=>n.id===e.id):null}let yU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[Bm,sQ],imports:[IZ,Pm,kh,Gn,Gn]}),i})();const dQ=["mat-button",""],xU=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],wU=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],hQ=["mat-mini-fab",""],pQ=["mat-icon-button",""],mQ=["*"],gQ=[{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"]}],_Q=Ly(HM(GM(class{constructor(i){this._elementRef=i}})));let GI=(()=>{class i extends _Q{constructor(e,n,r,s){super(e),this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=Nt(Wc),this._isFab=!1;const o=e.nativeElement.classList;for(const a of gQ)this._hasHostAttributes(a.selector)&&a.mdcClasses.forEach(l=>{o.add(l)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e="program",n){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,n):this._elementRef.nativeElement.focus(n)}_hasHostAttributes(...e){return e.some(n=>this._elementRef.nativeElement.hasAttribute(n))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return i.\u0275fac=function(e){ho()},i.\u0275dir=xe({type:i,viewQuery:function(e,n){if(1&e&&Xn(Oh,5),2&e){let r;Dt(r=Tt())&&(n.ripple=r.first)}},features:[rt]}),i})(),WM=(()=>{class i extends GI{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(Ti),A(ot),A(Cr,8))},i.\u0275cmp=it({type:i,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),an("_mat-animation-noopable","NoopAnimations"===n._animationMode)("mat-unthemed",!n.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[rt],attrs:dQ,ngContentSelectors:wU,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,n){1&e&&(Ki(xU),ke(0,"span",0),Bt(1),j(2,"span",1),Bt(3,1),q(),Bt(4,2),ke(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(an("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),$(6),z("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Oh],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}),i})();const yQ=new fe("mat-mdc-fab-default-options",{providedIn:"root",factory:MU});function MU(){return{color:"accent"}}const CU=MU();let SU=(()=>{class i extends GI{constructor(e,n,r,s,o){super(e,n,r,s),this._options=o,this._isFab=!0,this._options=this._options||CU,this.color=this.defaultColor=this._options.color||CU.color}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(Ti),A(ot),A(Cr,8),A(yQ,8))},i.\u0275cmp=it({type:i,selectors:[["button","mat-mini-fab",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),an("_mat-animation-noopable","NoopAnimations"===n._animationMode)("mat-unthemed",!n.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[rt],attrs:hQ,ngContentSelectors:wU,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,n){1&e&&(Ki(xU),ke(0,"span",0),Bt(1),j(2,"span",1),Bt(3,1),q(),Bt(4,2),ke(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(an("mdc-button__ripple",!n._isFab)("mdc-fab__ripple",n._isFab),$(6),z("matRippleDisabled",n._isRippleDisabled())("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Oh],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-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-fab[hidden]{display:none}.mdc-fab::-moz-focus-inner{padding:0;border:0}.mdc-fab .mdc-fab__focus-ring{position:absolute}.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__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 )}@media screen and (forced-colors: active){.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}.mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__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-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,.mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}.mdc-fab:active,.mdc-fab:focus{outline:none}.mdc-fab:hover{cursor:pointer}.mdc-fab>svg{width:100%}.mdc-fab--mini{width:40px;height:40px}.mdc-fab--extended{border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}.mdc-fab--extended .mdc-fab__ripple{border-radius:24px}.mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mdc-fab--extended .mdc-fab__icon,.mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-fab::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-fab::before{border-color:CanvasText}}.mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}.mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}.mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}.mdc-fab:not(.mdc-fab--extended){border-radius:50%}.mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}.mat-mdc-fab,.mat-mdc-mini-fab{-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:var(--mdc-fab-container-color, transparent);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);color:var(--mat-mdc-fab-color, inherit);flex-shrink:0}.mat-mdc-fab .mat-mdc-button-ripple,.mat-mdc-fab .mat-mdc-button-persistent-ripple,.mat-mdc-fab .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab .mat-mdc-button-ripple,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-fab .mat-ripple-element,.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-fab .mdc-button__label,.mat-mdc-mini-fab .mdc-button__label{z-index:1}.mat-mdc-fab .mat-mdc-focus-indicator,.mat-mdc-mini-fab .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab:focus .mat-mdc-focus-indicator::before,.mat-mdc-mini-fab:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-fab .mat-mdc-button-touch-target,.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-fab._mat-animation-noopable,.mat-mdc-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab:not(:disabled) .mdc-fab__icon,.mat-mdc-mini-fab:not(:disabled) .mdc-fab__icon{color:var(--mdc-fab-icon-color, inherit)}.mat-mdc-fab:not(.mdc-fab--extended),.mat-mdc-mini-fab:not(.mdc-fab--extended){border-radius:var(--mdc-fab-container-shape, 50%)}.mat-mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple,.mat-mdc-mini-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:var(--mdc-fab-container-shape, 50%)}.mat-mdc-fab:hover,.mat-mdc-fab:focus,.mat-mdc-mini-fab:hover,.mat-mdc-mini-fab:focus{box-shadow: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-fab:active,.mat-mdc-fab:focus:active,.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)}.mat-mdc-fab[disabled],.mat-mdc-mini-fab[disabled]{cursor:default;pointer-events:none;box-shadow: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-fab:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-mini-fab:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}.mat-mdc-fab .mat-icon,.mat-mdc-fab .material-icons,.mat-mdc-mini-fab .mat-icon,.mat-mdc-mini-fab .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab .mat-mdc-focus-indicator::before,.mat-mdc-mini-fab .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-extended-fab{border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}.mat-mdc-extended-fab .mdc-fab__ripple{border-radius:24px}.mat-mdc-extended-fab .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mat-mdc-extended-fab .mdc-fab__icon,.mat-mdc-extended-fab .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon,.mat-mdc-extended-fab .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons,.mat-mdc-extended-fab>.mat-icon[dir=rtl],.mat-mdc-extended-fab>.material-icons[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-extended-fab .mdc-button__label+.material-icons[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}'],encapsulation:2,changeDetection:0}),i})(),$I=(()=>{class i extends GI{constructor(e,n,r,s){super(e,n,r,s)}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(Ti),A(ot),A(Cr,8))},i.\u0275cmp=it({type:i,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,n){2&e&&(At("disabled",n.disabled||null),an("_mat-animation-noopable","NoopAnimations"===n._animationMode)("mat-unthemed",!n.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[rt],attrs:pQ,ngContentSelectors:mQ,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,n){1&e&&(Ki(),ke(0,"span",0),Bt(1),ke(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&($(3),z("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",n._elementRef.nativeElement))},dependencies:[Oh],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}',".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}),i})(),jM=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,By,Gn]}),i})();const bQ=["class","dialog"];let EU=(()=>{class i{constructor(e,n){this.dialogRef=e,this.data=n}}return i.\u0275fac=function(e){return new(e||i)(A(Vy),A(HI))},i.\u0275cmp=it({type:i,selectors:[["app-confirm",8,"dialog"]],attrs:bQ,decls:10,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(e,n){1&e&&(j(0,"h1",0),Ye(1,"Confirmation"),q(),j(2,"div",1)(3,"p"),Ye(4),q()(),j(5,"div",2)(6,"button",3),ze("click",function(){return n.dialogRef.close()}),Ye(7,"Cancel"),q(),j(8,"button",4),Ye(9,"Yes"),q()()),2&e&&($(4),$i(n.data.text),$(4),z("mat-dialog-close",!0))},dependencies:[WM,cQ,mU,gU,_U]}),i})();function WI(i,t){const e="object"==typeof t;return new Promise((n,r)=>{const s=new Jo({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{e?n(t.defaultValue):r(new ly)}});i.subscribe(s)})}let Yc=(()=>{class i{constructor(e){this.ngZone=e,this.openedResource$=new Ct(null),this.openedResourcePath$=new Ct(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(vt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(n=>setTimeout(n,0))}}),0)}wrapHandler(e){return(...n)=>{try{ot.assertInAngularZone(),e.bind(this)(...n)}catch{this.ngZone.run(e,this,n)}}}openFile(e,n=!1){var r=this;return vt(function*(){r.openedResource$.next(null),r.openedResourcePath$.next(null);const s=yield eel.open_file(e,n)();r.openedResource$.next({...s,id:s.name}),r.openedResourcePath$.next(e)})()}openFileWithSystemApp(e){return vt(function*(){yield eel.open_file_with_system_app(e)()})()}retrieveValue(e){return vt(function*(){return yield eel.retrieve_value(e)()})()}runCustomAction(e,n,r){return vt(function*(){return eel.run_custom_action(e,n,r)()})()}saveFile(e){var n=this;return vt(function*(){const r=n.openedResource$.getValue();if(!r)return;const s=yield eel.save_file(n.openedResourcePath$.getValue(),e)();n.openedResource$.next({id:r.id,name:r.name,schema:r.schema,data:s})})()}serializeResource(e,n={}){return vt(function*(){return eel.serialize_resource(e,n)()})()}serializeResourceTmp(e,n,r={}){return vt(function*(){return eel.serialize_resource_tmp(e,n,r)()})()}serializeReversible(e,n){return vt(function*(){return eel.serialize_reversible(e,n)()})()}deserializeResource(e){return vt(function*(){return eel.deserialize_resource(e)()})()}}return i.\u0275fac=function(e){return new(e||i)(J(ot))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var jI=Kr(489);const AU=i=>!(!i||"object"!=typeof i),DU=(i={},t,e,n=[])=>{const r=[];if(AU(i)){const s=Object.entries(i);for(let o=0;o{class i{constructor(e){var n=this;this.eelDelegate=e,this._hasUnsavedChanges$=new Ct(!1),this.resource$=new Ct(null),this.error$=new Ct(null),this.customActionRunning$=new Ct(!1),this.changedDataBlocks={},this.dataBlockChange$=new Fe,this.hideHiddenFields$=new Ct(!0),this.eelDelegate.openedResource$.subscribe(r=>{if(this.clearUnsavedChanges(),r?.data.error_class)this.error$.next(r),this.resource$.next(null);else if(r?.schema){const s=DU(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,u=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!u&&c[h]?.block_class_mro===l&&(u=c[h]),c=c[h];c[a[a.length-1]]=u}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=vt(function*([s,o]){n.changedDataBlocks[s]=o,n.updateUnsavedChanges();const a=yield n.eelDelegate.retrieveValue(s);n.changedDataBlocks[s]==o&&((0,jI.isNumber)(o)?Math.abs(o-a)<1e-10:(0,jI.isEqual)(o,a))&&(delete n.changedDataBlocks[s],n.updateUnsavedChanges())});return function(s){return r.apply(this,arguments)}}())}updateUnsavedChanges(){this._hasUnsavedChanges$.next(Object.keys(this.changedDataBlocks).length>0)}get hasUnsavedChanges$(){return this._hasUnsavedChanges$.asObservable()}get hasUnsavedChanges(){return this._hasUnsavedChanges$.getValue()}clearUnsavedChanges(){Object.keys(this.changedDataBlocks).forEach(e=>{delete this.changedDataBlocks[e]}),this.updateUnsavedChanges()}processExternalChanges(e,n){var r=this;return vt(function*(){r.customActionRunning$.next(!0);const s=yield n();if(s.error_class)throw r.customActionRunning$.next(!1),s;if(r.resource$.getValue().id===e)r.resource$.getValue().data=s;else{let o=e.substring(r.resource$.getValue().id.length).replace("__","/").split("/").filter(c=>c),a=r.resource$.getValue().data;for(const c of o.slice(0,o.length-1))a=a[c]||a[+c];let l=o[o.length-1];void 0===a[l]&&void 0!==a[+l]&&(l=+l),a[l]=s}r.clearUnsavedChanges(),r.changedDataBlocks.__has_external_changes__=1,r.updateUnsavedChanges(),r.customActionRunning$.next(!1)})()}runCustomAction(e,n,r){var s=this;return vt(function*(){return s.processExternalChanges(e,()=>s.eelDelegate.runCustomAction(e,n,r))})()}deserializeResource(e){var n=this;return vt(function*(){return n.processExternalChanges(e,()=>n.eelDelegate.deserializeResource(e))})()}reloadResource(){var e=this;return vt(function*(){const n=e.eelDelegate.openedResourcePath$.getValue();n&&e.eelDelegate.openFile(n,!0).then()})()}saveResource(){var e=this;return vt(function*(){const n=Object.entries(e.changedDataBlocks).filter(([r,s])=>"__has_external_changes__"!=r);yield e.eelDelegate.saveFile(n.map(([r,s])=>({id:r,value:s}))),e.clearUnsavedChanges()})()}}return i.\u0275fac=function(e){return new(e||i)(J(Yc))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function xQ(i,t){if(1&i){const e=xi();j(0,"div",2)(1,"button",3),ze("click",function(){return bn(e),xn(ye().action())}),Ye(2),q()()}if(2&i){const e=ye();$(2),Zi(" ",e.data.action," ")}}const wQ=["label"];function MQ(i,t){}const CQ=Math.pow(2,31)-1;class YI{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Fe,this._afterOpened=new Fe,this._onAction=new Fe,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,CQ))}_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 TU=new fe("MatSnackBarData");class YM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let SQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),i})(),EQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),i})(),AQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),i})(),DQ=(()=>{class i{constructor(e,n){this.snackBarRef=e,this.data=n}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return i.\u0275fac=function(e){return new(e||i)(A(YI),A(TU))},i.\u0275cmp=it({type:i,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,n){1&e&&(j(0,"div",0),Ye(1),q(),_e(2,xQ,3,1,"div",1)),2&e&&($(1),Zi(" ",n.data.message,"\n"),$(1),z("ngIf",n.hasAction))},dependencies:[gi,WM,SQ,EQ,AQ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),i})();const TQ={snackBarState:Ca("state",[bs("void, hidden",Yn({transform:"scale(0.8)",opacity:0})),bs("visible",Yn({transform:"scale(1)",opacity:1})),Er("* => visible",zr("150ms cubic-bezier(0, 0, 0.2, 1)")),Er("* => void, * => hidden",zr("75ms cubic-bezier(0.4, 0.0, 1, 1)",Yn({opacity:0})))])};let IQ=0,RQ=(()=>{class i extends PM{constructor(e,n,r,s,o){super(),this._ngZone=e,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Nt(Ut),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Fe,this._onExit=new Fe,this._onEnter=new Fe,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+IQ++,this.attachDomPortal=a=>{this._assertNotAttached();const l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();const n=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),n}attachTemplatePortal(e){this._assertNotAttached();const n=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),n}onAnimationEnd(e){const{fromState:n,toState:r}=e;if(("void"===r&&"void"!==n||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.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(Ai(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const e=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(r=>e.classList.add(r)):e.classList.add(n)),this._exposeToModals()}_exposeToModals(){const e=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const n=e.getAttribute("aria-owns");if(n){const r=n.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]"),n=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&n){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),n.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return i.\u0275fac=function(e){return new(e||i)(A(ot),A(lt),A(ri),A(Ti),A(YM))},i.\u0275dir=xe({type:i,viewQuery:function(e,n){if(1&e&&Xn(Am,7),2&e){let r;Dt(r=Tt())&&(n._portalOutlet=r.first)}},features:[rt]}),i})(),kQ=(()=>{class i extends RQ{_afterPortalAttached(){super._afterPortalAttached();const e=this._label.nativeElement,n="mdc-snackbar__label";e.classList.toggle(n,!e.querySelector(`.${n}`))}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275cmp=it({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,n){if(1&e&&Xn(wQ,7),2&e){let r;Dt(r=Tt())&&(n._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,n){1&e&&x1("@state.done",function(s){return n.onAnimationEnd(s)}),2&e&&Sw("@state",n._animationState)},features:[rt],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,n){1&e&&(j(0,"div",0)(1,"div",1,2)(3,"div",3),_e(4,MQ,0,0,"ng-template",4),q(),ke(5,"div"),q()()),2&e&&($(5),At("aria-live",n._live)("role",n._role)("id",n._liveElementId))},dependencies:[Am],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:[TQ.snackBarState]}}),i})(),IU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Pm,kh,vo,jM,Gn,Gn]}),i})();const RU=new fe("mat-snack-bar-default-options",{providedIn:"root",factory:function PQ(){return new YM}});let OQ=(()=>{class i{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,n,r,s,o,a){this._overlay=e,this._live=n,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}openFromComponent(e,n){return this._attach(e,n)}openFromTemplate(e,n){return this._attach(e,n)}open(e,n="",r){const s={...this._defaultConfig,...r};return s.data={message:e,action:n},s.announcementMessage===e&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,n){const s=Fi.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:YM,useValue:n}]}),o=new Rh(this.snackBarContainerComponent,n.viewContainerRef,s),a=e.attach(o);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){const r={...new YM,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new YI(o,s);if(e instanceof mo){const l=new Em(e,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new Rh(e,void 0,l),u=o.attachComponentPortal(c);a.instance=u.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ze(s.detachments())).subscribe(l=>{s.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,n){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),n.duration&&n.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(n.duration))}_createOverlay(e){const n=new km;n.direction=e.direction;let r=this._overlay.position().global();const s="rtl"===e.direction,o="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!s||"end"===e.horizontalPosition&&s,a=!o&&"center"!==e.horizontalPosition;return o?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),n.positionStrategy=r,this._overlay.create(n)}_createInjector(e,n){return Fi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:YI,useValue:n},{provide:TU,useValue:e.data}]})}}return i.\u0275fac=function(e){return new(e||i)(J(os),J(RI),J(Fi),J(SI),J(i,12),J(RU))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),kU=(()=>{class i extends OQ{constructor(e,n,r,s,o,a){super(e,n,r,s,o,a),this.simpleSnackBarComponent=DQ,this.snackBarContainerComponent=kQ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return i.\u0275fac=function(e){return new(e||i)(J(os),J(RI),J(Fi),J(SI),J(i,12),J(RU))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:IU}),i})();const FQ=["*",[["mat-toolbar-row"]]],LQ=["*","mat-toolbar-row"],NQ=Ly(class{constructor(i){this._elementRef=i}});let BQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),i})(),UQ=(()=>{class i extends NQ{constructor(e,n,r){super(e),this._platform=n,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(Ti),A(Ut))},i.\u0275cmp=it({type:i,selectors:[["mat-toolbar"]],contentQueries:function(e,n,r){if(1&e&&Li(r,BQ,5),2&e){let s;Dt(s=Tt())&&(n._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,n){2&e&&an("mat-toolbar-multiple-rows",n._toolbarRows.length>0)("mat-toolbar-single-row",0===n._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[rt],ngContentSelectors:LQ,decls:2,vars:0,template:function(e,n){1&e&&(Ki(FQ),Bt(0),Bt(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}),i})(),VQ=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,Gn]}),i})(),zQ=(()=>{class i{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=jt(e)}get inset(){return this._inset}set inset(e){this._inset=jt(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,n){2&e&&(At("aria-orientation",n.vertical?"vertical":"horizontal"),an("mat-divider-vertical",n.vertical)("mat-divider-horizontal",!n.vertical)("mat-divider-inset",n.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,n){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0}),i})(),PU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,Gn]}),i})();const HQ=["tooltip"],OU=new fe("mat-tooltip-scroll-strategy"),WQ={provide:OU,deps:[os],useFactory:function $Q(i){return()=>i.scrollStrategies.reposition({scrollThrottle:20})}},YQ=new fe("mat-tooltip-default-options",{providedIn:"root",factory:function jQ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),FU="tooltip-panel",LU=Th({passive:!0});let JQ=(()=>{class i{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=jt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=jt(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=ys(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ys(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,n,r,s,o,a,l,c,u,h,p,m){this._overlay=e,this._elementRef=n,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=o,this._platform=a,this._ariaDescriber=l,this._focusMonitor=c,this._dir=h,this._defaultOptions=p,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 Fe,this._scrollStrategy=u,this._document=m,p&&(p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),h.change.pipe(Ze(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ze(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(([n,r])=>{e.removeEventListener(n,r,LU)}),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,n){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(n);this._detach(),this._portal=this._portal||new Rh(this._tooltipComponent,this._viewContainerRef);const s=this._tooltipInstance=r.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Ze(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(e)}hide(e=this.hideDelay){const n=this._tooltipInstance;n&&(n.isVisible()?n.hide(e):(n._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 s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&s._origin instanceof lt)return this._overlayRef;this._detach()}const n=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(n);return r.positionChanges.pipe(Ze(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${FU}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ze(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ze(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ze(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!Vo(s)&&(s.preventDefault(),s.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 n=e.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();n.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(e){return e}_getOrigin(){const e=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n||"below"==n?r={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?r={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(r={originX:"end",originY:"center"});const{x:s,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:o}}}_getOverlayPosition(){const e=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n?r={overlayX:"center",overlayY:"bottom"}:"below"==n?r={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?r={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Ai(1),Ze(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,n){return"above"===this.position||"below"===this.position?"top"===n?n="bottom":"bottom"===n&&(n="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:n}}_updateCurrentPositionClass(e){const{overlayY:n,originX:r,originY:s}=e;let o;if(o="center"===n?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===n&&"top"===s?"above":"below",o!==this._currentPosition){const a=this._overlayRef;if(a){const l=`${this._cssClassPrefix}-${FU}-`;a.removePanelClass(l+this._currentPosition),a.addPanelClass(l+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{let n;this._setupPointerExitEventsIfNeeded(),void 0!==e.x&&void 0!==e.y&&(n=e),this.show(void 0,n)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{const n=e.targetTouches?.[0],r=n?{x:n.clientX,y:n.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",n=>{const r=n.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",n=>this._wheelListener(n)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const n=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",n],["touchcancel",n])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([n,r])=>{this._elementRef.nativeElement.addEventListener(n,r,LU)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){const n=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&this.hide()}}_disableNativeGesturesIfNecessary(){const e=this.touchGestures;if("off"!==e){const n=this._elementRef.nativeElement,r=n.style;("on"===e||"INPUT"!==n.nodeName&&"TEXTAREA"!==n.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===e||!n.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return i.\u0275fac=function(e){ho()},i.\u0275dir=xe({type:i,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"]}}),i})(),xs=(()=>{class i extends JQ{constructor(e,n,r,s,o,a,l,c,u,h,p,m){super(e,n,r,s,o,a,l,c,u,h,p,m),this._tooltipComponent=tJ,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 i.\u0275fac=function(e){return new(e||i)(A(os),A(lt),A(ky),A(Vr),A(ot),A(Ti),A(iZ),A(Wc),A(OU),A(Ma,8),A(YQ,8),A(Ut))},i.\u0275dir=xe({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[rt]}),i})(),eJ=(()=>{class i{constructor(e,n){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Fe,this._animationsDisabled="NoopAnimations"===n}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 n=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(n.classList.remove(e?s:r),n.classList.add(e?r:s),this._isVisible=e,e&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const o=getComputedStyle(n);("0s"===o.getPropertyValue("animation-duration")||"none"===o.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(n.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}}return i.\u0275fac=function(e){return new(e||i)(A(ri),A(Cr,8))},i.\u0275dir=xe({type:i}),i})(),tJ=(()=>{class i extends eJ{constructor(e,n,r){super(e,r),this._elementRef=n,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 i.\u0275fac=function(e){return new(e||i)(A(ri),A(lt),A(Cr,8))},i.\u0275cmp=it({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(e,n){if(1&e&&Xn(HQ,7),2&e){let r;Dt(r=Tt())&&(n._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,n){1&e&&ze("mouseleave",function(s){return n._handleMouseLeave(s)}),2&e&&va("zoom",n.isVisible()?1:null)},features:[rt],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,n){1&e&&(j(0,"div",0,1),ze("animationend",function(s){return n._handleAnimationEnd(s)}),j(2,"div",2),Ye(3),q()()),2&e&&(an("mdc-tooltip--multiline",n._isMultiline),z("ngClass",n.tooltipClass),$(3),$i(n.message))},dependencies:[fm],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}),i})(),NU=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[WQ],imports:[V3,vo,Pm,Gn,Gn,Py]}),i})();function BU(...i){const t=Ru(i),{args:e,keys:n}=VN(i),r=new En(s=>{const{length:o}=e;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let u=0;u{h||(h=!0,c--),a[u]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(n?zN(n,a):a),s.complete())}))}});return t?r.pipe(NT(t)):r}class qI{}class tu{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const n=e.indexOf(":");if(n>0){const r=e.slice(0,n),s=r.toLowerCase(),o=e.slice(n+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{let r;if(r="string"==typeof n?[n]:"number"==typeof n?[n.toString()]:n.map(s=>s.toString()),r.length>0){const s=e.toLowerCase();this.headers.set(s,r),this.maybeSetNormalizedName(e,s)}})}: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 tu?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 tu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof tu?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 n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":const s=t.value;if(s){let o=this.headers.get(e);if(!o)return;o=o.filter(a=>-1===s.indexOf(a)),0===o.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}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 nJ{encodeKey(t){return VU(t)}encodeValue(t){return VU(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const rJ=/%(\d[a-f0-9])/gi,sJ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function VU(i){return encodeURIComponent(i).replace(rJ,(t,e)=>sJ[e]??t)}function qM(i){return`${i}`}class nu{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new nJ,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function iJ(i,t){const e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,a]=-1==s?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,s)),t.decodeValue(r.slice(s+1))],l=e.get(o)||[];l.push(a),e.set(o,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e],r=Array.isArray(n)?n.map(qM):[qM(n)];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(n=>{const r=t[n];Array.isArray(r)?r.forEach(s=>{e.push({param:n,value:s,op:"a"})}):e.push({param:n,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(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new nu({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(qM(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let n=this.map.get(t.param)||[];const r=n.indexOf(qM(t.value));-1!==r&&n.splice(r,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class oJ{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 zU(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function HU(i){return typeof Blob<"u"&&i instanceof Blob}function GU(i){return typeof FormData<"u"&&i instanceof FormData}class zy{constructor(t,e,n,r){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function aJ(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new tu),this.context||(this.context=new oJ),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ah.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((h,p)=>h.set(p,t.setParams[p]),c)),new zy(e,n,s,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:o})}}var as=(()=>((as=as||{})[as.Sent=0]="Sent",as[as.UploadProgress=1]="UploadProgress",as[as.ResponseHeader=2]="ResponseHeader",as[as.DownloadProgress=3]="DownloadProgress",as[as.Response=4]="Response",as[as.User=5]="User",as))();class cJ{constructor(t,e=200,n="OK"){this.headers=t.headers||new tu,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class XI extends cJ{constructor(t={}){super(t),this.type=as.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new XI({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})}}function KI(i,t){return{body:t,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials}}let ZI=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let s;if(e instanceof zy)s=e;else{let l,c;l=r.headers instanceof tu?r.headers:new tu(r.headers),r.params&&(c=r.params instanceof nu?r.params:new nu({fromObject:r.params})),s=new zy(e,n,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=dt(s).pipe(qd(l=>this.handler.handle(l)));if(e instanceof zy||"events"===r.observe)return o;const a=o.pipe(Dn(l=>l instanceof XI));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(Qe(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(Qe(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(Qe(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(Qe(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:(new nu).append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,r={}){return this.request("PATCH",e,KI(r,n))}post(e,n,r={}){return this.request("POST",e,KI(r,n))}put(e,n,r={}){return this.request("PUT",e,KI(r,n))}}return i.\u0275fac=function(e){return new(e||i)(J(qI))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const wJ=["*"];let KM;function Hy(i){return function MJ(){if(void 0===KM&&(KM=null,typeof window<"u")){const i=window;void 0!==i.trustedTypes&&(KM=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return KM}()?.createHTML(i)||i}function ZU(i){return Error(`Unable to find icon with the name "${i}"`)}function QU(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function JU(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}class Fh{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}}let ZM=(()=>{class i{constructor(e,n,r,s){this._httpClient=e,this._sanitizer=n,this._errorHandler=s,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,n,r){return this.addSvgIconInNamespace("",e,n,r)}addSvgIconLiteral(e,n,r){return this.addSvgIconLiteralInNamespace("",e,n,r)}addSvgIconInNamespace(e,n,r,s){return this._addSvgIconConfig(e,n,new Fh(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,s){const o=this._sanitizer.sanitize(Hn.HTML,r);if(!o)throw JU(r);const a=Hy(o);return this._addSvgIconConfig(e,n,new Fh("",a,s))}addSvgIconSet(e,n){return this.addSvgIconSetInNamespace("",e,n)}addSvgIconSetLiteral(e,n){return this.addSvgIconSetLiteralInNamespace("",e,n)}addSvgIconSetInNamespace(e,n,r){return this._addSvgIconSetConfig(e,new Fh(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){const s=this._sanitizer.sanitize(Hn.HTML,n);if(!s)throw JU(n);const o=Hy(s);return this._addSvgIconSetConfig(e,new Fh("",o,r))}registerFontClassAlias(e,n=e){return this._fontCssClassesByAlias.set(e,n),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){const n=this._sanitizer.sanitize(Hn.RESOURCE_URL,e);if(!n)throw QU(e);const r=this._cachedIconsByUrl.get(n);return r?dt(QM(r)):this._loadSvgIconFromConfig(new Fh(e,null)).pipe(Di(s=>this._cachedIconsByUrl.set(n,s)),Qe(s=>QM(s)))}getNamedSvgIcon(e,n=""){const r=eV(n,e);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(n,e),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(n);return o?this._getSvgFromIconSetConfigs(e,o):pm(ZU(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?dt(QM(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(Qe(n=>QM(n)))}_getSvgFromIconSetConfigs(e,n){const r=this._extractIconWithNameFromAnySet(e,n);return r?dt(r):BU(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Vc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize(Hn.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),dt(null)})))).pipe(Qe(()=>{const o=this._extractIconWithNameFromAnySet(e,n);if(!o)throw ZU(e);return o}))}_extractIconWithNameFromAnySet(e,n){for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.svgText&&s.svgText.toString().indexOf(e)>-1){const o=this._svgElementFromConfig(s),a=this._extractSvgIconFromSet(o,e,s.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Di(n=>e.svgText=n),Qe(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?dt(null):this._fetchIcon(e).pipe(Di(n=>e.svgText=n))}_extractSvgIconFromSet(e,n,r){const s=e.querySelector(`[id="${n}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const a=this._svgElementFromString(Hy(""));return a.appendChild(o),this._setSvgAttributes(a,r)}_svgElementFromString(e){const n=this._document.createElement("DIV");n.innerHTML=e;const r=n.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){const n=this._svgElementFromString(Hy("")),r=e.attributes;for(let s=0;sHy(c)),Xd(()=>this._inProgressUrlFetches.delete(o)),Pu());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(eV(e,n),r),this}_addSvgIconSetConfig(e,n){const r=this._iconSetConfigs.get(e);return r?r.push(n):this._iconSetConfigs.set(e,[n]),this}_svgElementFromConfig(e){if(!e.svgElement){const n=this._svgElementFromString(e.svgText);this._setSvgAttributes(n,e.options),e.svgElement=n}return e.svgElement}_getIconConfigFromResolvers(e,n){for(let r=0;rt?t.pathname+t.search:""}}}),tV=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],RJ=tV.map(i=>`[${i}]`).join(", "),kJ=/^url\(['"]?#(.*?)['"]?\)$/;let nV=(()=>{class i extends AJ{get inline(){return this._inline}set inline(e){this._inline=jt(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 n=this._cleanupFontValue(e);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){const n=this._cleanupFontValue(e);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}constructor(e,n,r,s,o,a){super(e),this._iconRegistry=n,this._location=s,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Yt.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 n=e.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const e=this._elementsWithExternalReferences;if(e&&e.size){const n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();const n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){const e=this._elementRef.nativeElement;let n=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){const r=e.childNodes[n];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const e=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),n.forEach(r=>e.classList.add(r)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.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 n=this._elementsWithExternalReferences;n&&n.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${e}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(e){const n=e.querySelectorAll(RJ),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=n[s],l=a.getAttribute(o),c=l?l.match(kJ):null;if(c){let u=r.get(a);u||(u=[],r.set(a,u)),u.push({name:o,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){const[n,r]=this._splitIconName(e);n&&(this._svgNamespace=n),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,n).pipe(Ai(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${n}:${r}! ${s.message}`))})}}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ZM),ua("aria-hidden"),A(TJ),A(Za),A(DJ,8))},i.\u0275cmp=it({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){2&e&&(At("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),an("mat-icon-inline",n.inline)("mat-icon-no-color","primary"!==n.color&&"accent"!==n.color&&"warn"!==n.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[rt],ngContentSelectors:wJ,decls:1,vars:0,template:function(e,n){1&e&&(Ki(),Bt(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}),i})(),iV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,Gn]}),i})(),rV=(()=>{class i{constructor(e){this.viewContainerRef=e}}return i.\u0275fac=function(e){return new(e||i)(A(Vr))},i.\u0275dir=xe({type:i,selectors:[["","dataBlockUI",""]]}),i})(),PJ=(()=>{class i{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new Ve}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-fallback-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},decls:2,vars:3,consts:[["matTooltipPosition","above",3,"matTooltip"]],template:function(e,n){1&e&&(j(0,"p",0),Ye(1),q()),2&e&&(z("matTooltip",n.resourceDescription),$(1),nm("",null==n.resource?null:n.resource.name,"> GUI component for block ",((null==n.resource||null==n.resource.schema?null:n.resource.schema.block_class_mro)||"").split("__")[0]," not implemented :(\n"))},dependencies:[xs],changeDetection:0}),i})();function OJ(i,t){if(1&i&&(j(0,"h2",4),Ye(1),q()),2&i){const e=ye();z("matTooltip",e.resourceDescription),$(1),$i(e.name)}}function FJ(i,t){1&i&&ke(0,"app-block-actions",5),2&i&&z("resource",ye().resource)}const LJ=function(i,t,e,n){return{id:i,name:t,data:e,schema:n}};function NJ(i,t){if(1&i&&ke(0,"app-editor",7),2&i){const e=ye().$implicit,n=ye();z("resource",FL(3,LJ,n.resource.id+(n.resource.id.includes("__")?"/":"__")+e.key,e.key,null==n.data?null:n.data[e.key],null==n.schema?null:n.schema.fields[e.index].schema))("resourceDescription",(null==n.schema?null:n.schema.fields[e.index].description)||"")("disabled",n.disabled||!(null==n.schema||!n.schema.fields[e.index].is_programmatic))}}function BJ(i,t){if(1&i&&(fo(0),_e(1,NJ,1,8,"app-editor",6),Ht(2,"async"),po()),2&i){const e=t.$implicit,n=ye();$(1),z("ngIf",!(Zt(2,1,n.main.hideHiddenFields$)&&(null!=n.schema&&n.schema.fields[e.index].is_unknown||void 0!==(null==n.schema?null:n.schema.fields[e.index].schema.required_value)||null!=n.schema&&n.schema.fields[e.index].is_programmatic)))}}let qc=(()=>{class i{constructor(e){this.main=e,this.resource=null,this.resourceDescription="",this.hideBlockActions=!1,this.disabled=!1,this.fieldWhitelist=null,this.fieldBlacklist=null,this.changed=new Ve,this.destroyed$=new Fe}get name(){return this.resource&&this.resource.name}get data(){return this.resource&&this.resource.data}get schema(){return this.resource&&this.resource.schema}get fieldKeys(){let e=this.schema?.fields.map((n,r)=>({index:r,key:n.name}))||[];return this.fieldWhitelist?e=e.filter(({key:n})=>this.fieldWhitelist?.includes(n)):this.fieldBlacklist&&(e=e.filter(({key:n})=>!this.fieldBlacklist?.includes(n))),e}fieldTrackBy(e,n){return n.index}ngAfterViewInit(){var e=this;this.main.dataBlockChange$.pipe(Ze(this.destroyed$),Dn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=vt(function*([r,s]){const o=r.substring(e.resource.id.length+1);e.data[o]=s});return function(r){return n.apply(this,arguments)}}())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-compound-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled",fieldWhitelist:"fieldWhitelist",fieldBlacklist:"fieldBlacklist"},outputs:{changed:"changed"},decls:5,vars:6,consts:[["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],[3,"resource",4,"ngIf"],[1,"container"],[4,"ngFor","ngForOf","ngForTrackBy"],["matTooltipPosition","above",3,"matTooltip"],[3,"resource"],[3,"resource","resourceDescription","disabled",4,"ngIf"],[3,"resource","resourceDescription","disabled"]],template:function(e,n){if(1&e&&(_e(0,OJ,2,2,"h2",0),Ht(1,"async"),_e(2,FJ,1,1,"app-block-actions",1),j(3,"div",2),_e(4,BJ,3,3,"ng-container",3),q()),2&e){let r;z("ngIf",n.name&&n.name!=(null==(r=Zt(1,4,n.main.resource$))?null:r.name)),$(2),z("ngIf",!n.hideBlockActions),$(2),z("ngForOf",n.fieldKeys)("ngForTrackBy",n.fieldTrackBy)}},styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around;column-gap:1rem}"],changeDetection:0}),i})(),sV=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return i.\u0275fac=function(e){return new(e||i)(A(ma),A(lt))},i.\u0275dir=xe({type:i}),i})(),Lh=(()=>{class i extends sV{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,features:[rt]}),i})();const yo=new fe("NgValueAccessor"),VJ={provide:yo,useExisting:Ln(()=>Wl),multi:!0},HJ=new fe("CompositionEventMode");let Wl=(()=>{class i extends sV{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function zJ(){const i=Nc()?Nc().getUserAgent():"";return/android (\d+)/.test(i.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 i.\u0275fac=function(e){return new(e||i)(A(ma),A(lt),A(HJ,8))},i.\u0275dir=xe({type:i,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,n){1&e&&ze("input",function(s){return n._handleInput(s.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(s){return n._compositionEnd(s.target.value)})},features:[An([VJ]),rt]}),i})();const GJ=!1;function iu(i){return null==i||("string"==typeof i||Array.isArray(i))&&0===i.length}function aV(i){return null!=i&&"number"==typeof i.length}const Hr=new fe("NgValidators"),ru=new fe("NgAsyncValidators"),$J=/^(?=.{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 sl{static min(t){return lV(t)}static max(t){return cV(t)}static required(t){return function dV(i){return iu(i.value)?{required:!0}:null}(t)}static requiredTrue(t){return function uV(i){return!0===i.value?null:{required:!0}}(t)}static email(t){return function hV(i){return iu(i.value)||$J.test(i.value)?null:{email:!0}}(t)}static minLength(t){return fV(t)}static maxLength(t){return pV(t)}static pattern(t){return function mV(i){if(!i)return JM;let t,e;return"string"==typeof i?(e="","^"!==i.charAt(0)&&(e+="^"),e+=i,"$"!==i.charAt(i.length-1)&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(iu(n.value))return null;const r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return xV(t)}static composeAsync(t){return wV(t)}}function lV(i){return t=>{if(iu(t.value)||iu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(iu(t.value)||iu(i))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function fV(i){return t=>iu(t.value)||!aV(t.value)?null:t.value.lengthaV(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function JM(i){return null}function gV(i){return null!=i}function _V(i){const t=Gv(i)?Pi(i):i;if(GJ&&!b1(t)){let e="Expected async validator to return Promise or Observable.";throw"object"==typeof i&&(e+=" Are you using a synchronous validator where an async validator is expected?"),new he(-1101,e)}return t}function vV(i){let t={};return i.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function yV(i,t){return t.map(e=>e(i))}function bV(i){return i.map(t=>function WJ(i){return!i.validate}(t)?t:e=>t.validate(e))}function xV(i){if(!i)return null;const t=i.filter(gV);return 0==t.length?null:function(e){return vV(yV(e,t))}}function JI(i){return null!=i?xV(bV(i)):null}function wV(i){if(!i)return null;const t=i.filter(gV);return 0==t.length?null:function(e){return BU(yV(e,t).map(_V)).pipe(Qe(vV))}}function eR(i){return null!=i?wV(bV(i)):null}function MV(i,t){return null===i?[t]:Array.isArray(i)?[...i,t]:[i,t]}function CV(i){return i._rawValidators}function SV(i){return i._rawAsyncValidators}function tR(i){return i?Array.isArray(i)?i:[i]:[]}function eC(i,t){return Array.isArray(i)?i.includes(t):i===t}function EV(i,t){const e=tR(t);return tR(i).forEach(r=>{eC(e,r)||e.push(r)}),e}function AV(i,t){return tR(t).filter(e=>!eC(i,e))}class DV{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=JI(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=eR(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 Js extends DV{get formDirective(){return null}get path(){return null}}class jl extends DV{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class TV{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 Xc=(()=>{class i extends TV{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(A(jl,2))},i.\u0275dir=xe({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&an("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},features:[rt]}),i})(),nR=(()=>{class i extends TV{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(A(Js,10))},i.\u0275dir=xe({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&an("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},features:[rt]}),i})();function IV(i,t){return i?`with name: '${t}'`:`at index: ${t}`}const sR=!1,Gy="VALID",nC="INVALID",zm="PENDING",$y="DISABLED";function oR(i){return(iC(i)?i.validators:i)||null}function aR(i,t){return(iC(t)?t.asyncValidators:i)||null}function iC(i){return null!=i&&!Array.isArray(i)&&"object"==typeof i}function RV(i,t,e){const n=i.controls;if(!(t?Object.keys(n):n).length)throw new he(1e3,sR?function XJ(i){return`\n There are no form controls registered with this ${i?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(t):"");if(!n[e])throw new he(1001,sR?function KJ(i,t){return`Cannot find form control ${IV(i,t)}`}(t,e):"")}function kV(i,t,e){i._forEachChild((n,r)=>{if(void 0===e[r])throw new he(1002,sR?function ZJ(i,t){return`Must supply a value for form control ${IV(i,t)}`}(t,r):"")})}class rC{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===Gy}get invalid(){return this.status===nC}get pending(){return this.status==zm}get disabled(){return this.status===$y}get enabled(){return this.status!==$y}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(EV(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(EV(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(AV(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(AV(t,this._rawAsyncValidators))}hasValidator(t){return eC(this._rawValidators,t)}hasAsyncValidator(t){return eC(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=zm,!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=$y,this.errors=null,this._forEachChild(n=>{n.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(n=>n(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Gy,this._forEachChild(n=>{n.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(n=>n(!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===Gy||this.status===zm)&&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()?$y:Gy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=zm,this._hasOwnPendingAsyncValidator=!0;const e=_V(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{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((n,r)=>n&&n._find(r),this)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.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 Ve,this.statusChanges=new Ve}_calculateStatus(){return this._allControlsDisabled()?$y:this.errors?nC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zm)?zm:this._anyControlsHaveStatus(nC)?nC:Gy}_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){iC(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 QJ(i){return Array.isArray(i)?JI(i):i||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function JJ(i){return Array.isArray(i)?eR(i):i||null}(this._rawAsyncValidators)}}class Hm extends rC{constructor(t,e,n){super(oR(e),aR(n,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,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.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,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){kV(this,!0,t),Object.keys(t).forEach(n=>{RV(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(n=>{const r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>!!n._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,s)=>{n=e(n,r,s)}),n}_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 PV extends Hm{}const Nh=new fe("CallSetDisabledState",{providedIn:"root",factory:()=>Wy}),Wy="always";function sC(i,t){return[...t.path,i]}function jy(i,t,e=Wy){lR(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(i.disabled),function tee(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,"change"===i.updateOn&&OV(i,t)})}(i,t),function iee(i,t){const e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}(i,t),function nee(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,"blur"===i.updateOn&&i._pendingChange&&OV(i,t),"submit"!==i.updateOn&&i.markAsTouched()})}(i,t),function eee(i,t){if(t.valueAccessor.setDisabledState){const e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}(i,t)}function oC(i,t,e=!0){const n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),lC(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function aC(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function lR(i,t){const e=CV(i);null!==t.validator?i.setValidators(MV(e,t.validator)):"function"==typeof e&&i.setValidators([e]);const n=SV(i);null!==t.asyncValidator?i.setAsyncValidators(MV(n,t.asyncValidator)):"function"==typeof n&&i.setAsyncValidators([n]);const r=()=>i.updateValueAndValidity();aC(t._rawValidators,r),aC(t._rawAsyncValidators,r)}function lC(i,t){let e=!1;if(null!==i){if(null!==t.validator){const r=CV(i);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==t.validator);s.length!==r.length&&(e=!0,i.setValidators(s))}}if(null!==t.asyncValidator){const r=SV(i);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==t.asyncValidator);s.length!==r.length&&(e=!0,i.setAsyncValidators(s))}}}const n=()=>{};return aC(t._rawValidators,n),aC(t._rawAsyncValidators,n),e}function OV(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function FV(i,t){lR(i,t)}function dR(i,t){if(!i.hasOwnProperty("model"))return!1;const e=i.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function LV(i,t){i._syncPendingControls(),t.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function uR(i,t){if(!t)return null;let e,n,r;return Array.isArray(t),t.forEach(s=>{s.constructor===Wl?e=s:function oee(i){return Object.getPrototypeOf(i.constructor)===Lh}(s)?n=s:r=s}),r||n||e||null}const lee={provide:Js,useExisting:Ln(()=>qy)},Yy=(()=>Promise.resolve())();let qy=(()=>{class i extends Js{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new Ve,this.form=new Hm({},JI(e),eR(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Yy.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),jy(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Yy.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Yy.then(()=>{const n=this._findContainer(e.path),r=new Hm({});FV(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Yy.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){Yy.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,LV(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 i.\u0275fac=function(e){return new(e||i)(A(Hr,10),A(ru,10),A(Nh,8))},i.\u0275dir=xe({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&ze("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([lee]),rt]}),i})();function NV(i,t){const e=i.indexOf(t);e>-1&&i.splice(e,1)}function BV(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}const Yl=class extends rC{constructor(t=null,e,n){super(oR(e),aR(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),iC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=BV(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(n=>n(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){NV(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){NV(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){BV(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}},uee={provide:jl,useExisting:Ln(()=>su)},zV=(()=>Promise.resolve())();let su=(()=>{class i extends jl{constructor(e,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new Yl,this._registered=!1,this.update=new Ve,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=uR(0,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),dR(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(){jy(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){zV.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&function hm(i){return"boolean"==typeof i?i:null!=i&&"false"!==i}(n);zV.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?sC(e,this._parent):[e]}}return i.\u0275fac=function(e){return new(e||i)(A(Js,9),A(Hr,10),A(ru,10),A(yo,10),A(ri,8),A(Nh,8))},i.\u0275dir=xe({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[An([uee]),rt,Si]}),i})(),hR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),i})();const hee={provide:yo,useExisting:Ln(()=>Bh),multi:!0};let Bh=(()=>{class i extends Lh{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&ze("input",function(s){return n.onChange(s.target.value)})("blur",function(){return n.onTouched()})},features:[An([hee]),rt]}),i})(),HV=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();const fR=new fe("NgModelWithFormControlWarning"),_ee={provide:Js,useExisting:Ln(()=>Uh)};let Uh=(()=>{class i extends Js{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ve,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(lC(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 n=this.form.get(e.path);return jy(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){oC(e.control||null,e,!1),function aee(i,t){const e=i.indexOf(t);e>-1&&i.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,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this.submitted=!0,LV(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 n=e.control,r=this.form.get(e.path);n!==r&&(oC(n||null,e),(i=>i instanceof Yl)(r)&&(jy(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);FV(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function ree(i,t){return lC(i,t)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){lR(this.form,this),this._oldForm&&lC(this._oldForm,this)}_checkFormPresent(){}}return i.\u0275fac=function(e){return new(e||i)(A(Hr,10),A(ru,10),A(Nh,8))},i.\u0275dir=xe({type:i,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&ze("submit",function(s){return n.onSubmit(s)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[An([_ee]),rt,Si]}),i})();const bee={provide:jl,useExisting:Ln(()=>cC)};let cC=(()=>{class i extends jl{set isDisabled(e){}constructor(e,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new Ve,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=uR(0,s)}ngOnChanges(e){this._added||this._setUpControl(),dR(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 sC(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 i._ngModelWarningSentOnce=!1,i.\u0275fac=function(e){return new(e||i)(A(Js,13),A(Hr,10),A(ru,10),A(yo,10),A(fR,8))},i.\u0275dir=xe({type:i,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[An([bee]),rt,Si]}),i})();function XV(i){return"number"==typeof i?i:parseInt(i,10)}function KV(i){return"number"==typeof i?i:parseFloat(i)}let Vh=(()=>{class i{constructor(){this._validator=JM}ngOnChanges(e){if(this.inputName in e){const n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):JM,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,features:[Si]}),i})();const Aee={provide:Hr,useExisting:Ln(()=>zh),multi:!0};let zh=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>KV(e),this.createValidator=e=>cV(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&At("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[An([Aee]),rt]}),i})();const Dee={provide:Hr,useExisting:Ln(()=>Hh),multi:!0};let Hh=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>KV(e),this.createValidator=e=>lV(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&At("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[An([Dee]),rt]}),i})();const kee={provide:Hr,useExisting:Ln(()=>yR),multi:!0};let yR=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>XV(e),this.createValidator=e=>fV(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&At("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[An([kee]),rt]}),i})();const Pee={provide:Hr,useExisting:Ln(()=>bR),multi:!0};let bR=(()=>{class i extends Vh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>XV(e),this.createValidator=e=>pV(e)}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&At("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[An([Pee]),rt]}),i})(),ez=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[HV]}),i})();class tz extends rC{constructor(t,e,n){super(oR(e),aR(n,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,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){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:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){kV(this,!1,t),t.forEach((n,r)=>{RV(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,r)=>{n.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,n)=>!!n._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_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 nz(i){return!!i&&(void 0!==i.asyncValidators||void 0!==i.validators||void 0!==i.updateOn)}let Fee=(()=>{class i{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new i;return e.useNonNullable=!0,e}group(e,n=null){const r=this._reduceControls(e);let s={};return nz(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Hm(r,s)}record(e,n=null){const r=this._reduceControls(e);return new PV(r,n)}control(e,n,r){let s={};return this.useNonNullable?(nz(n)?s=n:(s.validators=n,s.asyncValidators=r),new Yl(e,{...s,nonNullable:!0})):new Yl(e,n,r)}array(e,n,r){const s=e.map(o=>this._createControl(o));return new tz(s,n,r)}_reduceControls(e){const n={};return Object.keys(e).forEach(r=>{n[r]=this._createControl(e[r])}),n}_createControl(e){return e instanceof Yl||e instanceof rC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),iz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Nh,useValue:e.callSetDisabledState??Wy}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[ez]}),i})(),rz=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:fR,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Nh,useValue:e.callSetDisabledState??Wy}]}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[ez]}),i})();const Lee=["matFormFieldNotchedOutline",""],Nee=["*"],Bee=["textField"],Uee=["iconPrefixContainer"],Vee=["textPrefixContainer"];function zee(i,t){1&i&&ke(0,"span",19)}function Hee(i,t){if(1&i){const e=xi();j(0,"label",17),ze("cdkObserveContent",function(){return bn(e),xn(ye(2)._refreshOutlineNotchWidth())}),Bt(1,1),_e(2,zee,1,0,"span",18),q()}if(2&i){const e=ye(2);z("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),At("for",e._control.id)("aria-owns",e._control.id),$(2),z("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Gee(i,t){1&i&&_e(0,Hee,3,6,"label",16),2&i&&z("ngIf",ye()._hasFloatingLabel())}function $ee(i,t){1&i&&ke(0,"div",20)}function Wee(i,t){}function jee(i,t){1&i&&_e(0,Wee,0,0,"ng-template",22),2&i&&(ye(2),z("ngTemplateOutlet",cr(1)))}function Yee(i,t){if(1&i&&(j(0,"div",21),_e(1,jee,1,1,"ng-template",9),q()),2&i){const e=ye();z("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),$(1),z("ngIf",!e._forceDisplayInfixLabel())}}function qee(i,t){1&i&&(j(0,"div",23,24),Bt(2,2),q())}function Xee(i,t){1&i&&(j(0,"div",25,26),Bt(2,3),q())}function Kee(i,t){}function Zee(i,t){1&i&&_e(0,Kee,0,0,"ng-template",22),2&i&&(ye(),z("ngTemplateOutlet",cr(1)))}function Qee(i,t){1&i&&(j(0,"div",27),Bt(1,4),q())}function Jee(i,t){1&i&&(j(0,"div",28),Bt(1,5),q())}function ete(i,t){1&i&&ke(0,"div",29)}function tte(i,t){1&i&&(j(0,"div",30),Bt(1,6),q()),2&i&&z("@transitionMessages",ye()._subscriptAnimationState)}function nte(i,t){if(1&i&&(j(0,"mat-hint",34),Ye(1),q()),2&i){const e=ye(2);z("id",e._hintLabelId),$(1),$i(e.hintLabel)}}function ite(i,t){if(1&i&&(j(0,"div",31),_e(1,nte,2,2,"mat-hint",32),Bt(2,7),ke(3,"div",33),Bt(4,8),q()),2&i){const e=ye();z("@transitionMessages",e._subscriptAnimationState),$(1),z("ngIf",e.hintLabel)}}const rte=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],ste=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let zo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["mat-label"]]}),i})(),ote=0;const sz=new fe("MatError");let ate=(()=>{class i{constructor(e,n){this.id="mat-mdc-error-"+ote++,e||n.nativeElement.setAttribute("aria-live","polite")}}return i.\u0275fac=function(e){return new(e||i)(ua("aria-live"),A(lt))},i.\u0275dir=xe({type:i,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,n){2&e&&Vl("id",n.id)},inputs:{id:"id"},features:[An([{provide:sz,useExisting:i}])]}),i})(),lte=0,oz=(()=>{class i{constructor(){this.align="start",this.id="mat-mdc-hint-"+lte++}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(e,n){2&e&&(Vl("id",n.id),At("align",null),an("mat-mdc-form-field-hint-end","end"===n.align))},inputs:{align:"align",id:"id"}}),i})();const az=new fe("MatPrefix");let cte=(()=>{class i{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[An([{provide:az,useExisting:i}])]}),i})();const dte=new fe("MatSuffix");let lz=(()=>{class i{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function ute(i){if(null!==i.offsetParent)return i.scrollWidth;const e=i.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);const n=e.scrollWidth;return e.remove(),n}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return i.\u0275fac=function(e){return new(e||i)(A(lt))},i.\u0275dir=xe({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,n){2&e&&an("mdc-floating-label--float-above",n.floating)},inputs:{floating:"floating"}}),i})();const cz="mdc-line-ripple--active",dC="mdc-line-ripple--deactivating";let dz=(()=>{class i{constructor(e,n){this._elementRef=e,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(dC);"opacity"===r.propertyName&&o&&s.remove(cz,dC)},n.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const e=this._elementRef.nativeElement.classList;e.remove(dC),e.add(cz)}deactivate(){this._elementRef.nativeElement.classList.add(dC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot))},i.\u0275dir=xe({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),i})(),uz=(()=>{class i{constructor(e,n){this._elementRef=e,this._ngZone=n,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 i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot))},i.\u0275cmp=it({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,n){2&e&&an("mdc-notched-outline--notched",n.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:Lee,ngContentSelectors:Nee,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(e,n){1&e&&(Ki(),ke(0,"div",0),j(1,"div",1),Bt(2),q(),ke(3,"div",2)),2&e&&($(1),va("width",n._getNotchWidth()))},encapsulation:2,changeDetection:0}),i})();const hte={transitionMessages:Ca("transitionMessages",[bs("enter",Yn({opacity:1,transform:"translateY(0%)"})),Er("void => enter",[Yn({opacity:0,transform:"translateY(-5px)"}),zr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let xR=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i}),i})();const uC=new fe("MatFormField"),fte=new fe("MAT_FORM_FIELD_DEFAULT_OPTIONS");let hz=0,ql=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=jt(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 n=this._appearance;this._appearance=e||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==n&&(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,n,r,s,o,a,l,c){this._elementRef=e,this._changeDetectorRef=n,this._ngZone=r,this._dir=s,this._platform=o,this._defaults=a,this._animationMode=l,this._document=c,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-"+hz++,this._hintLabelId="mat-mdc-hint-"+hz++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Fe,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(Ze(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(),Rr(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(Ze(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ze(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 n=this._control?this._control.ngControl:null;return n&&n[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 n=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;n?e.push(n.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(n=>n.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 n=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,s=n?.getBoundingClientRect().width??0,o=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"} * (${s+o}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const e=this._elementRef.nativeElement;if(e.getRootNode){const n=e.getRootNode();return n&&n!==e}return document.documentElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ri),A(ot),A(Ma),A(Ti),A(fte,8),A(Cr,8),A(Ut))},i.\u0275cmp=it({type:i,selectors:[["mat-form-field"]],contentQueries:function(e,n,r){if(1&e&&(Li(r,zo,5),Li(r,zo,7),Li(r,xR,5),Li(r,az,5),Li(r,dte,5),Li(r,sz,5),Li(r,oz,5)),2&e){let s;Dt(s=Tt())&&(n._labelChildNonStatic=s.first),Dt(s=Tt())&&(n._labelChildStatic=s.first),Dt(s=Tt())&&(n._formFieldControl=s.first),Dt(s=Tt())&&(n._prefixChildren=s),Dt(s=Tt())&&(n._suffixChildren=s),Dt(s=Tt())&&(n._errorChildren=s),Dt(s=Tt())&&(n._hintChildren=s)}},viewQuery:function(e,n){if(1&e&&(Xn(Bee,5),Xn(Uee,5),Xn(Vee,5),Xn(lz,5),Xn(uz,5),Xn(dz,5)),2&e){let r;Dt(r=Tt())&&(n._textField=r.first),Dt(r=Tt())&&(n._iconPrefixContainer=r.first),Dt(r=Tt())&&(n._textPrefixContainer=r.first),Dt(r=Tt())&&(n._floatingLabel=r.first),Dt(r=Tt())&&(n._notchedOutline=r.first),Dt(r=Tt())&&(n._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,n){2&e&&an("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===n._animationMode)("mat-form-field-appearance-fill","fill"==n.appearance)("mat-form-field-appearance-outline","outline"==n.appearance)("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-focused",n._control.focused)("mat-primary","accent"!==n.color&&"warn"!==n.color)("mat-accent","accent"===n.color)("mat-warn","warn"===n.color)("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[An([{provide:uC,useExisting:i}])],ngContentSelectors:ste,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,n){1&e&&(Ki(rte),_e(0,Gee,1,1,"ng-template",null,0,Fc),j(2,"div",1,2),ze("click",function(s){return n._control.onContainerClick&&n._control.onContainerClick(s)}),_e(4,$ee,1,0,"div",3),j(5,"div",4),_e(6,Yee,2,3,"div",5),_e(7,qee,3,0,"div",6),_e(8,Xee,3,0,"div",7),j(9,"div",8),_e(10,Zee,1,1,"ng-template",9),Bt(11),q(),_e(12,Qee,2,0,"div",10),_e(13,Jee,2,0,"div",11),q(),_e(14,ete,1,0,"div",12),q(),j(15,"div",13),_e(16,tte,2,1,"div",14),_e(17,ite,5,2,"div",15),q()),2&e&&($(2),an("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),$(2),z("ngIf",!n._hasOutline()&&!n._control.disabled),$(2),z("ngIf",n._hasOutline()),$(1),z("ngIf",n._hasIconPrefix),$(1),z("ngIf",n._hasTextPrefix),$(2),z("ngIf",!n._hasOutline()||n._forceDisplayInfixLabel()),$(2),z("ngIf",n._hasTextSuffix),$(1),z("ngIf",n._hasIconSuffix),$(1),z("ngIf",!n._hasOutline()),$(1),an("mat-mdc-form-field-subscript-dynamic-size","dynamic"===n.subscriptSizing),z("ngSwitch",n._getDisplayedMessages()),$(1),z("ngSwitchCase","error"),$(1),z("ngSwitchCase","hint"))},dependencies:[gi,ry,iy,CT,E3,oz,lz,uz,dz],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:[hte.transitionMessages]},changeDetection:0}),i})(),hC=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,vo,CI,Gn]}),i})();const mz=Th({passive:!0});let gte=(()=>{class i{constructor(e,n){this._platform=e,this._ngZone=n,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return Os;const n=Hc(e),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Fe,o="cdk-text-field-autofilled",a=l=>{"cdk-text-field-autofill-start"!==l.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===l.animationName&&n.classList.contains(o)&&(n.classList.remove(o),this._ngZone.run(()=>s.next({target:l.target,isAutofilled:!1}))):(n.classList.add(o),this._ngZone.run(()=>s.next({target:l.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{n.addEventListener("animationstart",a,mz),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",a,mz)}}),s}stopMonitoring(e){const n=Hc(e),r=this._monitoredElements.get(n);r&&(r.unlisten(),r.subject.complete(),n.classList.remove("cdk-text-field-autofill-monitored"),n.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(n))}ngOnDestroy(){this._monitoredElements.forEach((e,n)=>this.stopMonitoring(n))}}return i.\u0275fac=function(e){return new(e||i)(J(Ti),J(ot))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),_te=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();const wR=new fe("MAT_INPUT_VALUE_ACCESSOR"),vte=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let yte=0;const bte=j3(class{constructor(i,t,e,n){this._defaultErrorStateMatcher=i,this._parentForm=t,this._parentFormGroup=e,this.ngControl=n,this.stateChanges=new Fe}});let ou=(()=>{class i extends bte{get disabled(){return this._disabled}set disabled(e){this._disabled=jt(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(sl.required)??!1}set required(e){this._required=jt(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&l3().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=jt(e)}constructor(e,n,r,s,o,a,l,c,u,h){super(a,s,o,r),this._elementRef=e,this._platform=n,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+yte++,this.focused=!1,this.stateChanges=new Fe,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(g=>l3().has(g)),this._iOSKeyupListener=g=>{const b=g.target;!b.value&&0===b.selectionStart&&0===b.selectionEnd&&(b.setSelectionRange(1,1),b.setSelectionRange(0,0))};const p=this._elementRef.nativeElement,m=p.nodeName.toLowerCase();this._inputValueAccessor=l||p,this._previousNativeValue=this.value,this.id=this.id,n.IOS&&u.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===m,this._isTextarea="textarea"===m,this._isInFormField=!!h,this._isNativeSelect&&(this.controlType=p.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 n=this._elementRef.nativeElement;this._previousPlaceholder=e,e?n.setAttribute("placeholder",e):n.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){vte.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,n=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&n&&n.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 i.\u0275fac=function(e){return new(e||i)(A(lt),A(Ti),A(jl,10),A(qy,8),A(Uh,8),A(q3),A(wR,10),A(gte),A(ot),A(uC,8))},i.\u0275dir=xe({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(e,n){1&e&&ze("focus",function(){return n._focusChanged(!0)})("blur",function(){return n._focusChanged(!1)})("input",function(){return n._onInput()}),2&e&&(Vl("id",n.id)("disabled",n.disabled)("required",n.required),At("name",n.name||null)("readonly",n.readonly&&!n._isNativeSelect||null)("aria-invalid",n.empty&&n.required?null:n.errorState)("aria-required",n.required)("id",n.id),an("mat-input-server",n._isServer)("mat-mdc-form-field-textarea-control",n._isInFormField&&n._isTextarea)("mat-mdc-form-field-input-control",n._isInFormField)("mdc-text-field__input",n._isInFormField)("mat-mdc-native-select-inline",n._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:[An([{provide:xR,useExisting:i}]),rt,Si]}),i})(),gz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,hC,hC,_te,Gn]}),i})();function xte(i,t){if(1&i&&(j(0,"mat-label"),Ye(1),q()),2&i){const e=ye(2);$(1),$i(e.resource.name)}}function wte(i,t){if(1&i){const e=xi();j(0,"mat-form-field",1),_e(1,xte,2,1,"mat-label",2),j(2,"input",3),ze("ngModelChange",function(r){return bn(e),xn(ye().resource.data=r)})("change",function(){return bn(e),xn(ye().changed.emit())}),q()()}if(2&i){const e=ye();z("matTooltip",e.resourceDescription),$(1),z("ngIf",e.resource.name),$(1),z("max",e.resource.schema.max_value)("min",e.resource.schema.min_value)("step",e.resource.schema.value_interval)("disabled",e.disabled||void 0!==e.resource.schema.required_value)("ngModel",e.resource.data)}}let Mte=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new Ve}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-integer-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["matInput","","type","number",3,"max","min","step","disabled","ngModel","ngModelChange","change"]],template:function(e,n){1&e&&_e(0,wte,3,7,"mat-form-field",0),2&e&&z("ngIf",n.resource)},dependencies:[gi,Wl,Bh,Xc,Hh,zh,su,ql,zo,ou,xs],changeDetection:0}),i})();function Cte(i,t){if(1&i&&(j(0,"mat-label"),Ye(1),q()),2&i){const e=ye(2);$(1),$i(e.resource.name)}}function Ste(i,t){if(1&i){const e=xi();j(0,"mat-form-field",1),_e(1,Cte,2,1,"mat-label",2),j(2,"input",3),ze("ngModelChange",function(r){return bn(e),xn(ye().resource.data=r)})("change",function(){return bn(e),xn(ye().changed.emit())}),q()()}if(2&i){const e=ye();z("matTooltip",e.resourceDescription),$(1),z("ngIf",e.resource.name),$(1),z("disabled",e.disabled||void 0!==e.resource.schema.required_value)("maxlength",e.maxLength)("minlength",e.minLength)("ngModel",e.resource.data)}}let Ete=(()=>{class i{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new Ve,this.minLength=null,this.maxLength=null}get resource(){return this._resource}set resource(e){this._resource=e,isNaN(+this._resource?.schema.length)||(this.minLength=this.maxLength=+this._resource?.schema.length)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-string-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["matInput","","type","text",3,"disabled","maxlength","minlength","ngModel","ngModelChange","change"]],template:function(e,n){1&e&&_e(0,Ste,3,6,"mat-form-field",0),2&e&&z("ngIf",n.resource)},dependencies:[gi,Wl,Xc,yR,bR,su,ql,zo,ou,xs],changeDetection:0}),i})();const Xl=(i,t)=>i+(i.includes("__")?"/":"__")+t,Gh=function(){return[]};function Ate(i,t){if(1&i&&(j(0,"mat-panel-description"),Ye(1," Click to view items ("),j(2,"b"),Ye(3),q(),Ye(4,") "),q()),2&i){const e=ye(2);$(3),$i((e.resourceData||Zs(1,Gh)).length)}}function Dte(i,t){1&i&&(j(0,"mat-panel-description"),Ye(1," Empty array "),q())}function Tte(i,t){}function Ite(i,t){if(1&i){const e=xi();j(0,"mat-expansion-panel",4),ze("opened",function(){return bn(e),xn(ye().onContentsTrigger(!0))})("closed",function(){return bn(e),xn(ye().onContentsTrigger(!1))}),j(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Ye(3),q(),_e(4,Ate,5,2,"mat-panel-description",1),_e(5,Dte,2,0,"mat-panel-description",1),q(),_e(6,Tte,0,0,"ng-template",6),q()}if(2&i){const e=ye(),n=cr(3);$(1),z("matTooltip",e.resourceDescription),$(2),Zi(" ",e.name," "),$(1),z("ngIf",(e.resourceData||Zs(5,Gh)).length>0),$(1),z("ngIf",0==(e.resourceData||Zs(6,Gh)).length),$(1),z("ngTemplateOutlet",n)}}function Rte(i,t){}function kte(i,t){if(1&i&&(fo(0),j(1,"h2",5),Ye(2),q(),j(3,"div",7),_e(4,Rte,0,0,"ng-template",6),q(),po()),2&i){const e=ye(),n=cr(3);$(1),z("matTooltip",e.resourceDescription),$(1),$i(e.name),$(2),z("ngTemplateOutlet",n)}}function Pte(i,t){}function Ote(i,t){if(1&i&&ke(0,"app-editor",10),2&i){const e=ye().$implicit,n=ye(3);z("resource",n.children[n.pageIndex*n.pageSize+e])("disabled",n.disabled)}}function Fte(i,t){if(1&i&&(fo(0),_e(1,Ote,1,2,"app-editor",9),po()),2&i){const e=t.$implicit,n=ye(3);$(1),z("ngIf",n.pageIndex*n.pageSize+e0)}let MR=(()=>{class i{constructor(e,n){this.main=e,this.cdr=n,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new Ve,this.showAsCollapsable=!1,this.renderContents=!1,this.minPageSize=10,this.pageIndex=0,this.pageSize=0,this.pageSizeOptions=[10,25,50,100],this.children=[],this.renderIndexes=[],this.goToIndex=0,this.pageIndexes=[],this.destroyed$=new Fe}set resource(e){this._resource=e,this.showAsCollapsable=this._resource?.data?.length>5,this.buildChildren(),this.renderPage(0,this.minPageSize),this.updatePageIndexes()}get resource(){return this._resource}get resourceData(){return this._resource?.data}buildChildren(){this.children=(this.resourceData||[]).map((e,n)=>({id:Xl(this._resource.id,n),name:""+n,data:e,schema:this._resource.schema.child_schema}))}get schema(){return this._resource?.schema}get name(){return this._resource?.name||null}ngAfterViewInit(){var e=this;this.main.dataBlockChange$.pipe(Ze(this.destroyed$),Dn(([n,r])=>!!this.resource&&n.startsWith(this.resource.id)&&!n.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var n=vt(function*([r,s]){const o=r.substring(e.resource.id.length+1);e.resourceData[+o]=s});return function(r){return n.apply(this,arguments)}}())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}onContentsTrigger(e){void 0!==this.contentsTimeout&&(clearTimeout(this.contentsTimeout),this.contentsTimeout=void 0),e?(this.renderContents=!0,this.cdr.markForCheck()):this.contentsTimeout=setTimeout(()=>{this.contentsTimeout=void 0,this.renderContents=!1,this.cdr.markForCheck()},2e3)}renderPage(e,n){this.pageSize!==n&&(this.renderIndexes=new Array(n).fill(null).map((r,s)=>s)),this.goToIndex=this.pageIndex=e,this.pageSize=n,this.cdr.markForCheck()}updatePageIndexes(){this.goToIndex=this.pageIndex,this.pageIndexes=[];for(let e=0;e{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Ct(null),this.imageUrl$=new Ct(null),this.destroyed$=new Fe,this.changed=new Ve}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Ze(e.destroyed$)).subscribe(function(){var n=vt(function*(r){if(r){const s=yield e.eelDelegate.serializeResource(r.id);e.imageUrl$.next(s.find(o=>o.endsWith(".png"))||null)}else e.imageUrl$.next(null)});return function(r){return n.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(Yc),A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-bitmap-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:8,consts:[[3,"resource","fieldBlacklist"],[3,"src",4,"ngIf"],[3,"src"]],template:function(e,n){1&e&&(ke(0,"app-compound-block-ui",0),Ht(1,"async"),_e(2,$te,2,3,"img",1),Ht(3,"async")),2&e&&(z("resource",Zt(1,3,n._resource$))("fieldBlacklist",Zs(7,Wte)),$(2),z("ngIf",Zt(3,5,n.imageUrl$)))},dependencies:[gi,qc,Hl],styles:["[_nghost-%COMP%]{width:100%;display:flex;justify-content:center;flex-direction:column;align-items:center;row-gap:1rem}img[_ngcontent-%COMP%]{min-width:10rem;max-width:100%;max-height:25rem;object-fit:contain;background-image:linear-gradient(45deg,#808080 25%,transparent 25%),linear-gradient(-45deg,#808080 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#808080 75%),linear-gradient(-45deg,transparent 75%,#808080 75%);background-size:16px 16px;background-color:#aaa}"],changeDetection:0}),i})();const Yte=["*"],Qte=new fe("MAT_CARD_CONFIG");let _z=(()=>{class i{constructor(e){this.appearance=e?.appearance||"raised"}}return i.\u0275fac=function(e){return new(e||i)(A(Qte,8))},i.\u0275cmp=it({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(e,n){2&e&&an("mat-mdc-card-outlined","outlined"===n.appearance)("mdc-card--outlined","outlined"===n.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:Yte,decls:1,vars:0,template:function(e,n){1&e&&(Ki(),Bt(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}),i})(),vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,vo,Gn]}),i})();class CR{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(t=!1,e,n=!0,r){this._multiple=t,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Fe,e&&e.length&&(t?e.forEach(s=>this._markSelected(s)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(n=>this._markSelected(n));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(n=>this._unmarkSelected(n));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);const e=this.selected,n=new Set(t);t.forEach(s=>this._markSelected(s)),e.filter(s=>!n.has(s)).forEach(s=>this._unmarkSelected(s));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 SR=(()=>{class i{constructor(){this._listeners=[]}notify(e,n){for(let r of this._listeners)r(e,n)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(n=>e!==n)}}ngOnDestroy(){this._listeners=[]}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Mne=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[Gn,vo,By,Gn]}),i})();const Cz={transformPanel:Ca("transformPanel",[Er("void => enter-dropdown",zr("120ms cubic-bezier(0, 0, 0.2, 1)",oU([Yn({opacity:0,transform:"scale(1, 0.8)"}),Yn({opacity:1,transform:"scale(1, 1)"})]))),Er("void => enter-dialog",zr("150ms cubic-bezier(0, 0, 0.2, 1)",oU([Yn({opacity:0,transform:"scale(0.7)"}),Yn({transform:"none",opacity:1})]))),Er("* => void",zr("100ms linear",Yn({opacity:0})))]),fadeInCalendar:Ca("fadeInCalendar",[bs("void",Yn({opacity:0})),bs("enter",Yn({opacity:1})),Er("void => *",zr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},Az=function(i){return{active:i}};function zne(i,t){if(1&i){const e=xi();j(0,"button",2),ze("click",function(){const s=bn(e).$implicit;return xn(ye().select(s))}),q()}if(2&i){const e=t.$implicit,n=ye();va("background-color",e),z("ngClass",om(3,Az,n.selectedColor===e))}}function Hne(i,t){if(1&i){const e=xi();j(0,"button",2),ze("click",function(){const s=bn(e).$implicit;return xn(ye().select(s))}),q()}if(2&i){const e=t.$implicit,n=ye();va("background-color",e),z("ngClass",om(3,Az,n.selectedColor===e))}}const Gne=/^\s+/,$ne=/\s+$/,$m=Math.round,Wne=(Math,Math,Math,/[^0-9]/g),Dz=["#ffffff","#ffff00","#ff00ff","#ff0000","#c0c0c0","#808080","#808000","#800080","#800000","#00ffff","#00ff00","#008080","#008000","#0000ff","#000080","#000000"];function Tz(i,t,e){const n=i.getImageData(t,e,1,1).data;return{r:n[0],g:n[1],b:n[2]}}function $h(i){return 1==i.length?"0"+i:""+i}function Yne(i){return Math.round(255*parseFloat(i)).toString(16)}function Iz(i){return Ho(i)/255}function Ho(i){return parseInt(i,16)}function Rz(i,t,e,n){var r=[$h($m(i).toString(16)),$h($m(t).toString(16)),$h($m(e).toString(16))];return n&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}const au="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",DR="[\\s|\\(]+("+au+")[,|\\s]+("+au+")[,|\\s]+("+au+")\\s*\\)?",TR="[\\s|\\(]+("+au+")[,|\\s]+("+au+")[,|\\s]+("+au+")[,|\\s]+("+au+")\\s*\\)?",Wh={CSS_UNIT:new RegExp(au),rgb:new RegExp("rgb"+DR),rgba:new RegExp("rgba"+TR),hsl:new RegExp("hsl"+DR),hsla:new RegExp("hsla"+TR),hsv:new RegExp("hsv"+DR),hsva:new RegExp("hsva"+TR),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function IR(i){let t;return i=i.replace(Gne,"").replace($ne,"").toLowerCase(),(t=Wh.rgb.exec(i))?{r:t[1],g:t[2],b:t[3],a:1}:(t=Wh.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Wh.hex8.exec(i))?{r:Ho(t[1]),g:Ho(t[2]),b:Ho(t[3]),a:Iz(t[4])}:(t=Wh.hex6.exec(i))?{r:Ho(t[1]),g:Ho(t[2]),b:Ho(t[3]),a:1}:(t=Wh.hex4.exec(i))?{r:Ho(t[1]+""+t[1]),g:Ho(t[2]+""+t[2]),b:Ho(t[3]+""+t[3]),a:Iz(t[4]+""+t[4])}:(t=Wh.hex3.exec(i))?{r:Ho(t[1]+""+t[1]),g:Ho(t[2]+""+t[2]),b:Ho(t[3]+""+t[3]),a:1}:null}class jh{constructor(t,e,n,r){this.r=t>255?255:t,this.g=e>255?255:e,this.b=n>255?255:n,this.a=null!=r?r>1?1:r:1,this.roundA=Math.round(this.a),this.hex=Rz(this.r,this.g,this.b),this.rgba=this.toRgba()}toHex(t){return Rz(this.r,this.g,this.b,t)}toRgba(){return`rgba(${this.r},${this.g},${this.b},${this.a})`}toHexString(t){return"#"+this.toHex(t)}toRgbString(){return 1===this.a?"rgb("+Math.round(this.r)+", "+Math.round(this.g)+", "+Math.round(this.b)+")":"rgba("+Math.round(this.r)+", "+Math.round(this.g)+", "+Math.round(this.b)+", "+this.roundA+")"}toHex8(t){return function jne(i,t,e,n,r){var s=[$h($m(i).toString(16)),$h($m(t).toString(16)),$h($m(e).toString(16)),$h(Yne(n))];return r&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}(this.r,this.g,this.b,this.a,t)}toHex8String(t){return"#"+this.toHex8(t)}toString(t){let n;return t||!(this.a<1&&this.a>=0)||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t?("rgb"===t&&(n=this.toRgbString()),("hex"===t||"hex6"===t)&&(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),n||this.toHexString()):this.toRgbString()}}let kz=(()=>{class i{constructor(e,n){this.zone=e,this.colorChanged=new Ve,this.x=0,this.y=0,this.drag=!1,this._destroyed=new Fe,this.elementId=n}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}ngAfterViewInit(){this.canvas=document.getElementById(this.elementId),this.ctx=this.canvas.getContext("2d"),this.width=this.canvas.width,this.height=this.canvas.height,this.draw()}draw(){this.ctx.clearRect(0,0,this.width,this.height),this.ctx.rect(0,0,this.width,this.height),this.fillGradient(),0!=this.y&&this.redrawIndicator(this.x,this.y)}onMousedown(e){this.drag=!0,this.changeColor(e),this.zone.runOutsideAngular(()=>{this.canvas.addEventListener("mousemove",this.onMousemove.bind(this))})}onMousemove(e){this.drag&&this.zone.run(()=>{this.changeColor(e)})}onMouseup(e){this.drag=!1,this.canvas.removeEventListener("mousemove",this.onMousemove)}emitChange(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){ho()},i.\u0275dir=xe({type:i,inputs:{color:"color"},outputs:{colorChanged:"colorChanged"}}),i})(),Kne=(()=>{class i extends kz{constructor(e){super(e,"color-strip"),this.zone=e}ngOnInit(){}ngAfterViewInit(){super.ngAfterViewInit()}fillGradient(){const e=this.ctx.createLinearGradient(0,0,0,this.height);e.addColorStop(0,"rgba(255, 0, 0, 1)"),e.addColorStop(.17,"rgba(255, 255, 0, 1)"),e.addColorStop(.34,"rgba(0, 255, 0, 1)"),e.addColorStop(.51,"rgba(0, 255, 255, 1)"),e.addColorStop(.68,"rgba(0, 0, 255, 1)"),e.addColorStop(.85,"rgba(255, 0, 255, 1)"),e.addColorStop(1,"rgba(255, 0, 0, 1)"),this.ctx.fillStyle=e,this.ctx.fill()}redrawIndicator(e,n){this.ctx.beginPath(),this.ctx.strokeStyle="white",this.ctx.lineWidth=2,this.ctx.arc(7.5,n,7.5,0,2*Math.PI,!1),this.ctx.stroke(),this.ctx.closePath()}changeColor(e){this.x=e.offsetX,this.y=e.offsetY,this.draw();const{r:n,g:r,b:s}=Tz(this.ctx,e.offsetX,e.offsetY);this.emitChange(new jh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(A(ot))},i.\u0275cmp=it({type:i,selectors:[["ngx-mat-color-slider"]],features:[rt],decls:1,vars:0,consts:[["id","color-strip","width","15","height","234",1,"zone-strip",3,"mousedown","mouseup"]],template:function(e,n){1&e&&(j(0,"canvas",0),ze("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),q())}}),i})(),Zne=(()=>{class i{constructor(){}onInput(e){this._formatInput(e.target)}_formatInput(e){let n=Number(e.value.replace(Wne,""));n=isNaN(n)?0:n,e.value=n}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["","ngxMatNumericColorInput",""]],hostBindings:function(e,n){1&e&&ze("input",function(s){return n.onInput(s)})}}),i})(),Jne=(()=>{class i extends kz{constructor(e){super(e,"color-block"),this.zone=e,this._resetBaseColor=!0,this.formGroup=new Hm({r:new Yl(null,[sl.required]),g:new Yl(null,[sl.required]),b:new Yl(null,[sl.required]),a:new Yl(null,[sl.required]),hex:new Yl(null,[sl.required,sl.pattern(Wh.hex6)])})}get rCtrl(){return this.formGroup.get("r")}get gCtrl(){return this.formGroup.get("g")}get bCtrl(){return this.formGroup.get("b")}get aCtrl(){return this.formGroup.get("a")}get hexCtrl(){return this.formGroup.get("hex")}ngOnInit(){Rr(this.rCtrl.valueChanges,this.gCtrl.valueChanges,this.bCtrl.valueChanges,this.aCtrl.valueChanges).pipe(Ze(this._destroyed),Gc(400)).subscribe(r=>{const s=new jh(Number(this.rCtrl.value),Number(this.gCtrl.value),Number(this.bCtrl.value),Number(this.aCtrl.value));this.emitChange(s)}),this.hexCtrl.valueChanges.pipe(Ze(this._destroyed),Gc(400),$c()).subscribe(r=>{const s=IR(r);if(null!=s){const o=new jh(s.r,s.g,s.b,s.a);this.emitChange(o)}})}ngOnChanges(e){e.color&&e.color.currentValue&&(this.updateForm(e.color.currentValue),this._resetBaseColor&&(this._baseColor=e.color.currentValue),this._resetBaseColor=!0,e.color.firstChange||this.draw())}updateForm(e){const n={emitEvent:!1};this.rCtrl.setValue(e.r,n),this.gCtrl.setValue(e.g,n),this.bCtrl.setValue(e.b,n),this.aCtrl.setValue(e.a,n),this.hexCtrl.setValue(e.hex,n)}redrawIndicator(e,n){this.ctx.beginPath(),this.ctx.strokeStyle="white",this.ctx.arc(e,n,5,0,2*Math.PI,!1),this.ctx.stroke(),this.ctx.closePath()}fillGradient(){this.ctx.fillStyle=this._baseColor?this._baseColor.rgba:"rgba(255,255,255,1)",this.ctx.fillRect(0,0,this.width,this.height);const e=this.ctx.createLinearGradient(0,0,this.width,0);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(1,"rgba(255,255,255,0)"),this.ctx.fillStyle=e,this.ctx.fillRect(0,0,this.width,this.height);const n=this.ctx.createLinearGradient(0,0,0,this.height);n.addColorStop(0,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,1)"),this.ctx.fillStyle=n,this.ctx.fillRect(0,0,this.width,this.height)}onSliderColorChanged(e){this._baseColor=e,this.color=e,this.fillGradient(),this.emitChange(e)}changeColor(e){this.x=e.offsetX,this.y=e.offsetY,this._resetBaseColor=!1,this.draw();const{r:n,g:r,b:s}=Tz(this.ctx,e.offsetX,e.offsetY);this.emitChange(new jh(n,r,s))}}return i.\u0275fac=function(e){return new(e||i)(A(ot))},i.\u0275cmp=it({type:i,selectors:[["ngx-mat-color-canvas"]],hostAttrs:[1,"ngx-mat-color-canvas"],features:[rt,Si],decls:30,vars:3,consts:[[3,"formGroup"],[1,"color-canvas-row"],[1,"zone-canvas"],["id","color-block","width","200","height","235",1,"zone-block",3,"mousedown","mouseup"],[3,"colorChanged"],[1,"zone-inputs"],["matInput","","formControlName","r","ngxMatNumericColorInput","","autocomplete","off"],["matInput","","formControlName","g","ngxMatNumericColorInput","","autocomplete","off"],["matInput","","formControlName","b","ngxMatNumericColorInput","","autocomplete","off"],["mat-mini-fab","",1,"preview"],["matPrefix","",1,"symbol"],["matInput","","formControlName","hex","autocomplete","off"],[1,"input-opacity"],["matInput","","formControlName","a","type","number","min","0","max","1","step","0.1","autocomplete","off"]],template:function(e,n){1&e&&(j(0,"form",0)(1,"div",1)(2,"div",2)(3,"canvas",3),ze("mousedown",function(s){return n.onMousedown(s)})("mouseup",function(s){return n.onMouseup(s)}),q(),j(4,"ngx-mat-color-slider",4),ze("colorChanged",function(s){return n.onSliderColorChanged(s)}),q()(),j(5,"div",5)(6,"mat-form-field")(7,"mat-label"),Ye(8,"R"),q(),ke(9,"input",6),q(),j(10,"mat-form-field")(11,"mat-label"),Ye(12,"G"),q(),ke(13,"input",7),q(),j(14,"mat-form-field")(15,"mat-label"),Ye(16,"B"),q(),ke(17,"input",8),q()()(),j(18,"div",1),ke(19,"button",9),j(20,"mat-form-field")(21,"mat-label"),Ye(22,"HEX6"),q(),j(23,"mat-label",10),Ye(24,"#\xa0"),q(),ke(25,"input",11),q(),j(26,"mat-form-field",12)(27,"mat-label"),Ye(28,"A"),q(),ke(29,"input",13),q()()()),2&e&&(z("formGroup",n.formGroup),$(19),va("background-color",(null==n.color?null:n.color.rgba)||"transparent"))},dependencies:[ou,ql,zo,cte,SU,hR,Wl,Bh,Xc,nR,Hh,zh,Uh,cC,Kne,Zne],styles:[".ngx-mat-color-canvas .color-canvas-row{display:flex}.ngx-mat-color-canvas .color-canvas-row:first-of-type{height:235px;margin-bottom:12px}.ngx-mat-color-canvas .color-canvas-row:first-of-type .card{height:180px}.ngx-mat-color-canvas .color-canvas-row canvas:hover{cursor:crosshair}.ngx-mat-color-canvas .color-canvas-row .zone{display:flex}.ngx-mat-color-canvas .color-canvas-row .zone-canvas{height:235px}.ngx-mat-color-canvas .color-canvas-row .zone-canvas .zone-block{border:1px solid rgba(0,0,0,.12)}.ngx-mat-color-canvas .color-canvas-row .zone-strip{flex-basis:auto;margin-left:10px}.ngx-mat-color-canvas .color-canvas-row .zone-inputs{display:flex;width:60px;height:235px;flex-direction:column;margin-left:16px;margin-top:12px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2){display:flex}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .preview{min-width:40px;min-height:40px;height:40px;width:40px;margin-top:12px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field{margin-left:16px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:first-of-type{width:170px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:first-of-type .symbol{font-weight:700;color:#0000008a}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:last-of-type{width:60px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:last-of-type .mat-mdc-text-field-wrapper{padding:0 8px}.ngx-mat-color-canvas .mat-mdc-form-field-label{font-weight:700}.ngx-mat-color-canvas .mat-mdc-form-field .mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:transparent}\n"],encapsulation:2}),i})(),eie=(()=>{class i{constructor(){this.colorChanged=new Ve,this.colors1=Dz.slice(0,8),this.colors2=Dz.slice(8,16)}set color(e){e&&(this.selectedColor=e.toHexString())}ngOnInit(){}select(e){this.selectedColor=e;const{r:n,g:r,b:s,a:o}=IR(e);this.colorChanged.emit(new jh(n,r,s,o))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["ngx-mat-color-collection"]],hostAttrs:[1,"ngx-mat-color-collection"],inputs:{color:"color"},outputs:{colorChanged:"colorChanged"},decls:4,vars:2,consts:[[1,"color-collection-row"],["mat-mini-fab","","class","btn-color",3,"background-color","ngClass","click",4,"ngFor","ngForOf"],["mat-mini-fab","",1,"btn-color",3,"ngClass","click"]],template:function(e,n){1&e&&(j(0,"div",0),_e(1,zne,1,5,"button",1),q(),j(2,"div",0),_e(3,Hne,1,5,"button",1),q()),2&e&&($(1),z("ngForOf",n.colors1),$(2),z("ngForOf",n.colors2))},dependencies:[fm,_o,SU],styles:[".ngx-mat-color-collection .btn-color{height:20px;width:20px;margin-right:11px;box-shadow:none;opacity:.3}.ngx-mat-color-collection .btn-color.active{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;opacity:1}\n"],encapsulation:2}),i})(),Pz=(()=>{class i{constructor(){this.colorChanged=new Ve}ngOnInit(){}handleColorChanged(e){this.colorChanged.emit(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["ngx-mat-color-palette"]],hostAttrs:[1,"ngx-mat-color-palette"],inputs:{color:"color"},outputs:{colorChanged:"colorChanged"},decls:2,vars:2,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(j(0,"ngx-mat-color-canvas",0),ze("colorChanged",function(s){return n.handleColorChanged(s)}),q(),j(1,"ngx-mat-color-collection",0),ze("colorChanged",function(s){return n.handleColorChanged(s)}),q()),2&e&&(z("color",n.color),$(1),z("color",n.color))},dependencies:[Jne,eie],styles:[".ngx-mat-color-palette .actions{margin-top:10px;display:flex}.ngx-mat-color-palette .actions .left{display:flex;flex-direction:column;margin-right:15px}.ngx-mat-color-palette .actions .left .preview{flex:2 1 auto;margin-bottom:10px}.ngx-mat-color-palette .actions .right{display:flex;width:60px;flex-direction:column}\n"],encapsulation:2}),i})(),RR=(()=>{class i{constructor(){}sameColor(e,n){return null==e&&null==n||null!=e&&null!=n&&e.rgba===n.rgba}format(e,n){return e.toString(n)}parse(e){const n=IR(e);return n?new jh(n.r,n.g,n.b,n.a):null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();const tie={display:{colorInput:"hex"}},Oz=new fe("mat-color-formats"),Fz=new fe("ngx-mat-colorpicker-scroll-strategy"),iie={provide:Fz,deps:[os],useFactory:function nie(i){return()=>i.scrollStrategies.reposition()}},rie=Ly(class{constructor(i){this._elementRef=i}});let Lz=(()=>{class i extends rie{constructor(e){super(e)}}return i.\u0275fac=function(e){return new(e||i)(A(lt))},i.\u0275cmp=it({type:i,selectors:[["ngx-mat-color-picker-content"]],viewQuery:function(e,n){if(1&e&&Xn(Pz,5),2&e){let r;Dt(r=Tt())&&(n._palette=r.first)}},hostAttrs:[1,"ngx-mat-colorpicker-content"],hostVars:3,hostBindings:function(e,n){2&e&&(Sw("@transformPanel","enter"),an("ngx-mat-colorpicker-content-touch",n.picker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatColorPickerContent"],features:[rt],decls:1,vars:1,consts:[[3,"color","colorChanged"]],template:function(e,n){1&e&&(j(0,"ngx-mat-color-palette",0),ze("colorChanged",function(s){return n.picker.select(s)}),q()),2&e&&z("color",n.picker._selected)},dependencies:[Pz],styles:[".ngx-mat-colorpicker-content{display:block;border-radius:4px;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background-color:#fff;color:#000000de;padding:16px}.ngx-mat-colorpicker-content .ngx-mat-color-palette{width:296px;height:354px}.ngx-mat-colorpicker-content-touch{display:block;max-height:80vh;overflow:auto}.ngx-mat-colorpicker-content-touch .ngx-mat-color-palette{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-colorpicker-content-touch .ngx-mat-color-palette{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-colorpicker-content-touch .ngx-mat-color-palette{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[Cz.transformPanel,Cz.fadeInCalendar]},changeDetection:0}),i})(),sie=(()=>{class i{constructor(e,n,r,s,o,a,l,c){this._dialog=e,this._overlay=n,this._zone=r,this._adapter=s,this._dir=o,this._document=l,this._viewContainerRef=c,this.openedStream=new Ve,this.closedStream=new Ve,this._touchUi=!1,this._opened=!1,this._defaultColor="primary",this._validSelected=null,this._disabledChange=new Fe,this._focusedElementBeforeOpen=null,this._inputSubscription=Yt.EMPTY,this._selectedChanged=new Fe,this._scrollStrategy=a}get disabled(){return void 0===this._disabled&&this._pickerInput?this._pickerInput.disabled:!!this._disabled}set disabled(e){const n=jt(e);n!==this._disabled&&(this._disabled=n,this._disabledChange.next(n))}get touchUi(){return this._touchUi}set touchUi(e){this._touchUi=jt(e)}get opened(){return this._opened}set opened(e){e?this.open():this.close()}get defaultColor(){return this._defaultColor}set defaultColor(e){this._defaultColor=e}get color(){return this._color||(this._pickerInput?this._pickerInput.getThemePalette():void 0)}set color(e){this._color=e}get _selected(){return this._validSelected}set _selected(e){this._validSelected=e}ngOnInit(){}ngOnDestroy(){this.close(),this._inputSubscription.unsubscribe(),this._disabledChange.complete(),this._popupRef&&(this._popupRef.dispose(),this._popupComponentRef=null)}select(e){let n=this._selected;this._selected=e,this._adapter.sameColor(n,this._selected)||this._selectedChanged.next(e)}registerInput(e){if(this._pickerInput)throw Error("A ColorPicker can only be associated with a single input.");this._pickerInput=e,this._inputSubscription=this._pickerInput._valueChange.subscribe(n=>this._selected=n)}open(){if(!this._opened&&!this.disabled){if(!this._pickerInput)throw Error("Attempted to open an ColorPicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Lz,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"ngx-mat-colorpicker-dialog"}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._dialogRef.componentInstance.picker=this,this._setColor()}_openAsPopup(){this._portal||(this._portal=new Rh(Lz,this._viewContainerRef)),this._popupRef||this._createPopup(),this._popupRef.hasAttached()||(this._popupComponentRef=this._popupRef.attach(this._portal),this._popupComponentRef.instance.picker=this,this._setColor(),this._zone.onStable.asObservable().pipe(Ai(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const e=new km({positionStrategy:this._createPopupPositionStrategy(),hasBackdrop:!0,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-colorpicker-popup"});this._popupRef=this._overlay.create(e),this._popupRef.overlayElement.setAttribute("role","dialog"),Rr(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Dn(n=>27===n.keyCode||this._pickerInput&&n.altKey&&38===n.keyCode))).subscribe(n=>{n&&n.preventDefault(),this.close()})}close(){if(!this._opened)return;this._popupRef&&this._popupRef.hasAttached()&&this._popupRef.detach(),this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null),this._portal&&this._portal.isAttached&&this._portal.detach();const e=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(e)):e()}_setColor(){const e=this.color;this._popupComponentRef&&(this._popupComponentRef.instance.color=e),this._dialogRef&&(this._dialogRef.componentInstance.color=e)}_createPopupPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this._pickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".ngx-mat-colorpicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition().withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])}}return i.\u0275fac=function(e){return new(e||i)(A(Bm),A(os),A(ot),A(RR),A(Ma,8),A(Fz),A(Ut,8),A(Vr))},i.\u0275cmp=it({type:i,selectors:[["ngx-mat-color-picker"]],inputs:{disabled:"disabled",touchUi:"touchUi",opened:"opened",defaultColor:"defaultColor",color:"color"},outputs:{openedStream:"opened",closedStream:"closed"},exportAs:["ngxMatColorPicker"],decls:0,vars:0,template:function(e,n){},encapsulation:2,changeDetection:0}),i})();class mC{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}const oie={provide:yo,useExisting:Ln(()=>kR),multi:!0},aie={provide:Hr,useExisting:Ln(()=>kR),multi:!0};let kR=(()=>{class i{constructor(e,n,r,s){if(this._elementRef=e,this._formField=n,this._colorFormats=r,this._adapter=s,this.colorChange=new Ve,this.colorInput=new Ve,this._disabledChange=new Ve,this._valueChange=new Ve,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._pickerSubscription=Yt.EMPTY,this._validator=sl.compose([]),this._lastValueValid=!1,!this._colorFormats)throw function Xne(i){return Error(`NgxMatColorPicker: No provider found for ${i}. You must define MAT_COLOR_FORMATS in your module`)}("MAT_COLOR_FORMATS")}set ngxMatColorPicker(e){e&&(this._picker=e,this._picker.registerInput(this),this._pickerSubscription.unsubscribe(),this._pickerSubscription=this._picker._selectedChanged.subscribe(n=>{this.value=n,this._cvaOnChange(n),this._onTouched(),this.colorInput.emit(new mC(this,this._elementRef.nativeElement)),this.colorChange.emit(new mC(this,this._elementRef.nativeElement))}))}get disabled(){return!!this._disabled}set disabled(e){const n=jt(e),r=this._elementRef.nativeElement;this._disabled!==n&&(this._disabled=n,this._disabledChange.emit(n)),n&&r.blur&&r.blur()}get value(){return this._value}set value(e){const n=this.value;this._value=e,this._formatValue(e),this._adapter.sameColor(n,e)||this._valueChange.emit(e)}getThemePalette(){return this._formField?this._formField.color:void 0}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}getPopupConnectionElementRef(){return this.getConnectedOverlayOrigin()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}ngOnInit(){}ngOnDestroy(){this._pickerSubscription.unsubscribe(),this._valueChange.complete(),this._disabledChange.complete()}writeValue(e){this.value=e}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onChange(){this.colorChange.emit(new mC(this,this._elementRef.nativeElement))}_onKeydown(e){this._picker&&e.altKey&&40===e.keyCode&&!this._elementRef.nativeElement.readOnly&&(this._picker.open(),e.preventDefault())}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(e){this._elementRef.nativeElement.value=e?this._adapter.format(e,this._colorFormats.display.colorInput):""}_onInput(e){const n=this._lastValueValid,r=this._adapter.parse(e);this._adapter.sameColor(r,this._value)?n!==this._lastValueValid&&this._validatorOnChange():(this._value=r,this._cvaOnChange(r),this._valueChange.emit(r),this.colorInput.emit(new mC(this,this._elementRef.nativeElement)))}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ql,8),A(Oz,8),A(RR))},i.\u0275dir=xe({type:i,selectors:[["input","ngxMatColorPicker",""]],hostVars:3,hostBindings:function(e,n){1&e&&ze("input",function(s){return n._onInput(s.target.value)})("change",function(){return n._onChange()})("blur",function(){return n._onBlur()})("keydown",function(s){return n._onKeydown(s)}),2&e&&(Vl("disabled",n.disabled),At("aria-haspopup",n._picker?"dialog":null)("aria-owns",(null==n._picker?null:n._picker.opened)&&n._picker.id||null))},inputs:{ngxMatColorPicker:"ngxMatColorPicker",disabled:"disabled",value:"value"},outputs:{colorChange:"colorChange",colorInput:"colorInput"},exportAs:["ngxMatColorPickerInput"],features:[An([oie,aie,{provide:wR,useExisting:i}])]}),i})(),lie=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[RR,iie],imports:[vo,gz,jM,vz,Mne,iz,rz,yU,kh,iV]}),i})();const cie=["picker"],die=function(i){return{"background-color":i}};function uie(i,t){if(1&i){const e=xi();j(0,"div",5),ze("click",function(r){const o=bn(e).index;return xn(ye().onColorClicked(r.currentTarget,o))}),q()}if(2&i){const e=t.$implicit,n=t.index,r=ye();z("ngStyle",om(2,die,"#"+r.lpad(e.toString(16),"0",8)))("matTooltip",n+": #"+e.toString(16))}}const hie=function(){return["colors"]};let fie=(()=>{class i{constructor(){this.resource=null,this.changed=new Ve,this.selectedIndex=null}get resourceData(){return this.resource?.data}lpad(e,n,r){for(;e.length>>24,(16711680&r)>>>16,(65280&r)>>>8,255&r)),this.picker.open();const s=new x3;s.top(Math.min(e.offsetTop,window.innerHeight-450)+"px"),s.left(Math.min(e.offsetLeft,window.innerWidth-380)+"px"),this.picker._popupRef.updatePositionStrategy(s),s.apply()}onColorChange(e){this.resourceData?null!==this.selectedIndex&&(this.resourceData.colors[this.selectedIndex]=e?parseInt(e.toHex8String().substring(1),16):0,this.changed.emit()):this.selectedIndex=null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-palette-block-ui"]],viewQuery:function(e,n){if(1&e&&Xn(cie,5),2&e){let r;Dt(r=Tt())&&(n.picker=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:6,vars:5,consts:[[3,"resource","fieldBlacklist"],["id","colors-container"],["class","color-box",3,"ngStyle","matTooltip","click",4,"ngFor","ngForOf"],["matInput","",1,"hidden",3,"ngxMatColorPicker","colorChange"],["picker",""],[1,"color-box",3,"ngStyle","matTooltip","click"]],template:function(e,n){if(1&e&&(ke(0,"app-compound-block-ui",0),j(1,"div",1),_e(2,uie,1,4,"div",2),q(),j(3,"input",3),ze("colorChange",function(s){return n.onColorChange(s.value)}),q(),ke(4,"ngx-mat-color-picker",null,4)),2&e){const r=cr(5);z("resource",n.resource)("fieldBlacklist",Zs(4,hie)),$(2),z("ngForOf",null==n.resourceData?null:n.resourceData.colors),$(1),z("ngxMatColorPicker",r)}},dependencies:[_o,Kw,ou,xs,kR,sie,qc],styles:["#colors-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.color-box[_ngcontent-%COMP%]{border:solid .1rem;outline:solid .1rem;width:2rem;height:2rem}"],changeDetection:0}),i})();const pie=["editor"];let mie=(()=>{class i{constructor(e){this.cdr=e,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new Ve,this.editorProps={showHeader:!1,height:"10rem",readonly:!1}}get resource(){return this._resource}set resource(e){this._resource=e,this.editor&&(this.editorProps.data=e?new Uint8Array(e.data):void 0,this.editorProps.height=Math.min(24,1.5*Math.ceil((e?.data||[]).length/8))+"rem",this.editor.$set({props:this.editorProps}),this.cdr.markForCheck())}ngAfterViewInit(){this.resource&&(this.editorProps.data=new Uint8Array(this.resource.data),this.editorProps.height=Math.min(24,1.5*Math.ceil(this.resource.data.length/8))+"rem"),this.editor=new HexEditor({target:this.editorDiv?.nativeElement,props:this.editorProps}),this.cdr.markForCheck()}ngOnDestroy(){this.editor&&this.editor.$destroy()}}return i.\u0275fac=function(e){return new(e||i)(A(ri))},i.\u0275cmp=it({type:i,selectors:[["app-binary-block-ui"]],viewQuery:function(e,n){if(1&e&&Xn(pie,5),2&e){let r;Dt(r=Tt())&&(n.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:4,vars:2,consts:[["matTooltipPosition","above",3,"matTooltip"],["editor",""]],template:function(e,n){1&e&&(j(0,"h2",0),Ye(1),q(),ke(2,"div",null,1)),2&e&&(z("matTooltip",n.resourceDescription),$(1),$i(null==n.resource?null:n.resource.name))},dependencies:[xs],changeDetection:0}),i})();const gie=["picker"];function _ie(i,t){if(1&i&&(j(0,"mat-label",8),Ye(1),q()),2&i){const e=ye();$(1),$i(null==e.resource?null:e.resource.name)}}const vie=function(i){return{transform:i}};let yie=(()=>{class i{constructor(e){this.cdr=e,this.resource=null,this.resourceDescription="",this.changed=new Ve,this.pi=Math.PI,this.dragging=!1}mousedown(e){this.dragging=!0,this.updateRotation(e)}mousemove(e){this.dragging&&this.updateRotation(e)}mouseout(){this.dragging=!1}updateRotation(e){const n=this.picker.nativeElement.getBoundingClientRect();let r=Math.atan2(e.clientY-n.top-n.height/2,e.clientX-n.left-n.width/2);e.shiftKey&&(r=15*Math.round(180*r/Math.PI/15)*Math.PI/180),this.resource.data=r,this.changed.emit(),this.cdr.markForCheck()}}return i.\u0275fac=function(e){return new(e||i)(A(ri))},i.\u0275cmp=it({type:i,selectors:[["app-angle-block-ui"]],viewQuery:function(e,n){if(1&e&&Xn(gie,5),2&e){let r;Dt(r=Tt())&&(n.picker=r.first)}},hostBindings:function(e,n){1&e&&ze("mousedown",function(s){return n.mousedown(s)})("mousemove",function(s){return n.mousemove(s)})("mouseup",function(){return n.mouseout()})("mouseleave",function(){return n.mouseout()})},inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},decls:14,vars:13,consts:[["id","wrapper","matTooltipPosition","above",3,"matTooltip"],[1,"circle-container"],["picker",""],[1,"ui-anglepicker-pointer",3,"ngStyle"],[1,"ui-anglepicker-dot"],[1,"ui-anglepicker-line"],["id","labels"],["id","name-span",4,"ngIf"],["id","name-span"]],template:function(e,n){1&e&&(j(0,"div",0)(1,"div",1,2)(3,"div",3),ke(4,"div",4)(5,"div",5),q()(),j(6,"div",6),_e(7,_ie,2,1,"mat-label",7),j(8,"mat-label"),Ye(9),Ht(10,"number"),q(),j(11,"mat-label"),Ye(12),Ht(13,"number"),q()()()),2&e&&(z("matTooltip",n.resourceDescription),$(3),z("ngStyle",om(11,vie,"rotate("+((null==n.resource?null:n.resource.data)||0)+"rad)")),$(4),z("ngIf",null==n.resource?null:n.resource.name),$(2),Zi("",N1(10,5,180*(null==n.resource?null:n.resource.data)/n.pi||0,"1.2-2")," deg"),$(3),Zi("",N1(13,8,(null==n.resource?null:n.resource.data)||0,"1.2-2")," rad"))},dependencies:[gi,Kw,zo,xs,uN],styles:["#wrapper[_ngcontent-%COMP%]{display:flex;padding-bottom:1.34375em}#name-span[_ngcontent-%COMP%]{font-weight:500}.circle-container[_ngcontent-%COMP%]{width:52px;height:52px;background:rgba(0,0,0,.04);border:1px solid rgba(0,0,0,.6);border-radius:50%;position:relative;display:inline-block}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:50%;margin:-2px 0 0 -2px;transform-origin:2px 2px}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%] .ui-anglepicker-dot[_ngcontent-%COMP%]{height:4px;width:4px;position:absolute;background:#838383;border-radius:50%}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%] .ui-anglepicker-line[_ngcontent-%COMP%]{margin-top:1.5px;margin-right:-2px;height:1px;background:#838383}#labels[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-left:1rem;min-width:6rem}"],changeDetection:0}),i})();class Nz{constructor(){}deepEquals(t,e){if(null===t&&null!==e)return!1;if(null===e&&null!==t)return!1;if(!0===Array.isArray(t)){if(!1===Array.isArray(e))return!1;if(t.length!==e.length)return!1;{const n=new Set,r=new Set,s=new Set,o=new Set;for(const h of t)!0===Array.isArray(h)?n.add(h):"object"==typeof h?r.add(h):"function"==typeof h?o.add(JSON.stringify(""+h)):s.add(h);const a=new Set,l=new Set,c=new Set,u=new Set;for(const h of e)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?u.add(JSON.stringify(""+h)):c.add(h);if(s.size!==c.size)return!1;{let h=!0;for(const p of s)if(!1===c.has(p)){h=!1;break}if(!1===h)return!1;if(r.size===l.size){h=!0;for(const p of r){let m=!1;for(const g of l)if(!0===this.deepEquals(p,g)){m=!0;break}if(!1===m){h=!1;break}}if(!1===h)return!1;if(n.size===a.size){h=!0;for(const p of n){let m=!1;for(const g of a)if(!0===this.deepEquals(p,g)){m=!0;break}if(!1===m){h=!1;break}}if(!1===h)return!1;if(o.size===u.size){h=!0;for(const p of o)if(!1===u.has(p)){h=!1;break}return!1!==h}return!1}return!1}return!1}}}if("object"==typeof t&&null!==t){if("object"!=typeof e)return!1;{let n=!0;if(Object.keys(t).length===Object.keys(e).length){for(const[r,s]of Object.entries(t))if(n=this.deepEquals(s,e[r]),!1===n)break}else n=!1;return n}}return!0!==Array.isArray(e)&&("object"!=typeof e||null===e)&&("function"==typeof t?"function"==typeof e&&JSON.stringify(""+t)===JSON.stringify(""+e):JSON.stringify(t)===JSON.stringify(e))}}function bie(i,t){if(1&i&&(j(0,"mat-list-option",3),Ye(1),q()),2&i){const e=t.$implicit,n=ye();z("value",e)("selected",n.selectedValue==e),$(1),Zi(" ",e," ")}}function xie(i,t){if(1&i&&(j(0,"mat-card"),ke(1,"app-editor",4),q()),2&i){const e=ye();$(1),z("resource",e.resources[e.selectedValue])}}let gC=(()=>{class i{constructor(e){this.deep=e,this._resources={},this._selectedValue=null}get resources(){return this._resources}set resources(e){const n=!this._resources||!this.deep.deepEquals(Object.keys(this._resources),Object.keys(e));this._resources=e,n&&(this.selectedValue=Object.keys(e).length>0?Object.keys(e)[0]:null)}set selectedValue(e){this._selectedValue=e}get selectedValue(){return this._selectedValue}get keys(){return Object.keys(this.resources)}}return i.\u0275fac=function(e){return new(e||i)(A(Nz))},i.\u0275cmp=it({type:i,selectors:[["app-sidenav-res-list"]],inputs:{resources:"resources"},decls:3,vars:3,consts:[[3,"multiple","selectionChange"],[3,"value","selected",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"value","selected"],[3,"resource"]],template:function(e,n){1&e&&(j(0,"mat-selection-list",0),ze("selectionChange",function(s){return n.selectedValue=s.source.selectedOptions.selected[0].value}),_e(1,bie,2,3,"mat-list-option",1),q(),_e(2,xie,2,1,"mat-card",2)),2&e&&(z("multiple",!1),$(1),z("ngForOf",n.keys),$(1),z("ngIf",n.selectedValue))},styles:["[_nghost-%COMP%]{display:flex;align-items:flex-start;column-gap:1rem;height:inherit;scroll-snap-align:start;scroll-margin:.5rem}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%]{height:100%;max-height:calc(100vh - 54px - 1rem);overflow-y:auto;max-width:33%;flex-shrink:0;padding:0}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] mat-list-option[aria-selected=true][_ngcontent-%COMP%]{background-color:#e0e0e0}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] mat-list-option[aria-selected=true][_ngcontent-%COMP%]:focus{background-color:unset}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] .mdc-radio{display:none}[_nghost-%COMP%] mat-card[_ngcontent-%COMP%]{width:100%;height:100%;padding:1rem}"],changeDetection:0}),i})(),wie=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new Ve}get resource(){return this._resource}set resource(e){this._resource=e,this.resourceMap={};const n=(this._resource?.schema.fields||[]).find(r=>"children"===r.name)?.schema.child_schema;if(n)for(let r=0;r void",UI("@transformPanel",[BI()],{optional:!0}))]),transformPanel:Ca("transformPanel",[bs("void",Yn({opacity:0,transform:"scale(1, 0.8)"})),Er("void => showing",zr("120ms cubic-bezier(0, 0, 0.2, 1)",Yn({opacity:1,transform:"scale(1, 1)"}))),Er("* => void",zr("100ms linear",Yn({opacity:0})))])};let Bz=0;const Uz=new fe("mat-select-scroll-strategy"),Oie=new fe("MAT_SELECT_CONFIG"),Fie={provide:Uz,deps:[os],useFactory:function Pie(i){return()=>i.scrollStrategies.reposition()}},Lie=new fe("MatSelectTrigger");class Nie{constructor(t,e){this.source=t,this.value=e}}const Bie=GM(FI(HM(j3(class{constructor(i,t,e,n,r){this._elementRef=i,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=n,this.ngControl=r,this.stateChanges=new Fe}}))));let Uie=(()=>{class i extends Bie{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(sl.required)??!1}set required(e){this._required=jt(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=jt(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=jt(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=ys(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,n,r,s,o,a,l,c,u,h,p,m,g,b){super(o,s,l,c,h),this._viewportRuler=e,this._changeDetectorRef=n,this._ngZone=r,this._dir=a,this._parentFormField=u,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(v,y)=>v===y,this._uid="mat-select-"+Bz++,this._triggerAriaLabelledBy=null,this._destroy=new Fe,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+Bz++,this._panelDoneAnimatingStream=new Fe,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=dy(()=>{const v=this.options;return v?v.changes.pipe(No(v),vs(()=>Rr(...v.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Ai(1),vs(()=>this.optionSelectionChanges))}),this.openedChange=new Ve,this._openedStream=this.openedChange.pipe(Dn(v=>v),Qe(()=>{})),this._closedStream=this.openedChange.pipe(Dn(v=>!v),Qe(()=>{})),this.selectionChange=new Ve,this.valueChange=new Ve,this.ngControl&&(this.ngControl.valueAccessor=this),null!=b?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=b.typeaheadDebounceInterval),this._scrollStrategyFactory=m,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new CR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe($c(),Ze(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Ze(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(No(null),Ze(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),n=this.ngControl;if(e!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(void 0!==this._previousControl&&null!==n.disabled&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.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(n=>n.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 n=e.keyCode,r=40===n||38===n||37===n||39===n,s=13===n||32===n,o=this._keyManager;if(!o.isTyping()&&s&&!Vo(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;o.onKeydown(e);const l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){const n=this._keyManager,r=e.keyCode,s=40===r||38===r,o=n.isTyping();if(s&&e.altKey)e.preventDefault(),this.close();else if(o||13!==r&&32!==r||!n.activeItem||Vo(e))if(!o&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();const a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{const a=n.activeItemIndex;n.onKeydown(e),this._multiple&&s&&e.shiftKey&&n.activeItem&&n.activeItemIndex!==a&&n.activeItem._selectViaInteraction()}else e.preventDefault(),n.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(Ai(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(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{const n=this._selectOptionByValue(e);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const n=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 n&&this._selectionModel.select(n),n}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new rZ(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=Rr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ze(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Rr(...this.options.map(n=>n._stateChanges)).pipe(Ze(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,n){const r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),n&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),n&&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((n,r)=>this.sortComparator?this.sortComparator(n,r,e):e.indexOf(n)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let n=null;n=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),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 n=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}_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 i.\u0275fac=function(e){return new(e||i)(A(kM),A(ri),A(ot),A(q3),A(lt),A(Ma,8),A(qy,8),A(Uh,8),A(uC,8),A(jl,10),ua("tabindex"),A(Uz),A(RI),A(Oie,8))},i.\u0275dir=xe({type:i,viewQuery:function(e,n){if(1&e&&(Xn(Mie,5),Xn(Cie,5),Xn(M3,5)),2&e){let r;Dt(r=Tt())&&(n.trigger=r.first),Dt(r=Tt())&&(n.panel=r.first),Dt(r=Tt())&&(n._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:[rt,Si]}),i})(),Ky=(()=>{class i extends Uie{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(Ze(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 n=this.options.toArray()[e];if(n){const r=this.panel.nativeElement,s=function XZ(i,t,e){if(e.length){let n=t.toArray(),r=e.toArray(),s=0;for(let o=0;oe+n?Math.max(0,i-n+t):e}(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Nie(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof MI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=jt(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275cmp=it({type:i,selectors:[["mat-select"]],contentQueries:function(e,n,r){if(1&e&&(Li(r,Lie,5),Li(r,Nm,5),Li(r,nU,5)),2&e){let s;Dt(s=Tt())&&(n.customTrigger=s.first),Dt(s=Tt())&&(n.options=s),Dt(s=Tt())&&(n.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,n){1&e&&ze("keydown",function(s){return n._handleKeydown(s)})("focus",function(){return n._onFocus()})("blur",function(){return n._onBlur()}),2&e&&(At("id",n.id)("tabindex",n.tabIndex)("aria-controls",n.panelOpen?n.id+"-panel":null)("aria-expanded",n.panelOpen)("aria-label",n.ariaLabel||null)("aria-required",n.required.toString())("aria-disabled",n.disabled.toString())("aria-invalid",n.errorState)("aria-activedescendant",n._getAriaActiveDescendant()),an("mat-mdc-select-disabled",n.disabled)("mat-mdc-select-invalid",n.errorState)("mat-mdc-select-required",n.required)("mat-mdc-select-empty",n.empty)("mat-mdc-select-multiple",n.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[An([{provide:xR,useExisting:i},{provide:tU,useExisting:i}]),rt],ngContentSelectors:Rie,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,n){if(1&e&&(Ki(Iie),j(0,"div",0,1),ze("click",function(){return n.toggle()}),j(3,"div",2),_e(4,Sie,2,1,"span",3),_e(5,Die,3,2,"span",4),q(),j(6,"div",5)(7,"div",6),Fr(),j(8,"svg",7),ke(9,"path",8),q()()()(),_e(10,Tie,3,9,"ng-template",9),ze("backdropClick",function(){return n.close()})("attach",function(){return n._onAttached()})("detach",function(){return n.close()})),2&e){const r=cr(1);At("aria-owns",n.panelOpen?n.id+"-panel":null),$(3),z("ngSwitch",n.empty),At("id",n._valueId),$(1),z("ngSwitchCase",!0),$(1),z("ngSwitchCase",!1),$(5),z("cdkConnectedOverlayPanelClass",n._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",n._scrollStrategy)("cdkConnectedOverlayOrigin",n._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",n.panelOpen)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayWidth",n._overlayWidth)}},dependencies:[fm,iy,CT,aN,M3,MI],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:[kie.transformPanel]},changeDetection:0}),i})(),Vz=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[Fie],imports:[vo,Pm,NI,Gn,Py,hC,NI,Gn]}),i})();function Vie(i,t){if(1&i&&(j(0,"mat-label"),Ye(1),q()),2&i){const e=ye(3);$(1),$i(e.resource.name)}}function zie(i,t){if(1&i&&(j(0,"mat-option",6),Ye(1),q()),2&i){const e=t.$implicit,n=ye(3);z("value",e[1])("disabled",n.disabled),$(1),Zi(" ",e[1]," ")}}function Hie(i,t){if(1&i){const e=xi();j(0,"mat-form-field",3),_e(1,Vie,2,1,"mat-label",0),j(2,"mat-select",4),ze("valueChange",function(r){return bn(e),xn(ye(2).resource.data=r)})("selectionChange",function(){return bn(e),xn(ye(2).changed.emit())}),_e(3,zie,2,3,"mat-option",5),q()()}if(2&i){const e=ye(2);z("matTooltip",e.resourceDescription),$(1),z("ngIf",e.resource.name),$(1),z("value",e.resource.data)("disabled",e.disabled),$(1),z("ngForOf",e.resource.schema.enum_names)}}function Gie(i,t){if(1&i&&(j(0,"mat-label"),Ye(1),q()),2&i){const e=ye(3);$(1),$i(e.resource.name)}}function $ie(i,t){if(1&i){const e=xi();j(0,"mat-form-field",3),_e(1,Gie,2,1,"mat-label",0),j(2,"input",7),ze("ngModelChange",function(r){return bn(e),xn(ye(2).resource.data=r)})("change",function(){return bn(e),xn(ye(2).changed.emit())}),q()()}if(2&i){const e=ye(2);z("matTooltip",e.resourceDescription),$(1),z("ngIf",e.resource.name),$(1),z("min",0)("max",256*(e.resource.schema.length||1)-1)("ngModel",e.resource.data)}}function Wie(i,t){if(1&i&&(fo(0),_e(1,Hie,4,5,"mat-form-field",1),_e(2,$ie,3,5,"ng-template",null,2,Fc),po()),2&i){const e=cr(3),n=ye();$(1),z("ngIf",n.isKnownEnumValue(n.resource.data))("ngIfElse",e)}}let jie=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new Ve}isKnownEnumValue(e){return!!this.resource?.schema.enum_names.find(([n,r])=>r==e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-enum-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[[4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf","ngIfElse"],["unknownEnum",""],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled","valueChange","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange","change"]],template:function(e,n){1&e&&_e(0,Wie,4,2,"ng-container",0),2&e&&z("ngIf",n.resource)},dependencies:[_o,gi,Wl,Bh,Xc,Hh,zh,su,ql,zo,ou,xs,Ky,Nm],changeDetection:0}),i})();const Yie=["*"],Xie=["unscopedContent"];function Kie(i,t){1&i&&Bt(0,4)}function Zie(i,t){if(1&i&&(j(0,"div",11),ke(1,"input",12),j(2,"div",13),Fr(),j(3,"svg",14),ke(4,"path",15),q(),ns(),ke(5,"div",16),q()()),2&i){const e=ye();an("mdc-checkbox--disabled",e.disabled),$(1),z("checked",e.selected)("disabled",e.disabled)}}function Qie(i,t){if(1&i&&(j(0,"div",17),ke(1,"input",18),j(2,"div",19),ke(3,"div",20)(4,"div",21),q()()),2&i){const e=ye();an("mdc-radio--disabled",e.disabled),$(1),z("checked",e.selected)("disabled",e.disabled)}}function Jie(i,t){}function ere(i,t){if(1&i&&(j(0,"span",22),_e(1,Jie,0,0,"ng-template",23),q()),2&i){ye();const e=cr(3);$(1),z("ngTemplateOutlet",e)}}function tre(i,t){}function nre(i,t){if(1&i&&(j(0,"span",24),_e(1,tre,0,0,"ng-template",23),q()),2&i){ye();const e=cr(5);$(1),z("ngTemplateOutlet",e)}}function ire(i,t){}function rre(i,t){1&i&&_e(0,ire,0,0,"ng-template",23),2&i&&(ye(),z("ngTemplateOutlet",cr(1)))}function sre(i,t){}function ore(i,t){if(1&i&&(j(0,"span",25),_e(1,sre,0,0,"ng-template",23),q()),2&i){ye();const e=cr(3);$(1),z("ngTemplateOutlet",e)}}function are(i,t){}function lre(i,t){if(1&i&&(j(0,"span",25),_e(1,are,0,0,"ng-template",23),q()),2&i){ye();const e=cr(5);$(1),z("ngTemplateOutlet",e)}}function cre(i,t){}function dre(i,t){1&i&&_e(0,cre,0,0,"ng-template",23),2&i&&(ye(),z("ngTemplateOutlet",cr(1)))}const ure=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],hre=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],zz=new fe("ListOption");let fre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(A(lt))},i.\u0275dir=xe({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),i})(),pre=(()=>{class i{constructor(e){this._elementRef=e}}return i.\u0275fac=function(e){return new(e||i)(A(lt))},i.\u0275dir=xe({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),i})(),Hz=(()=>{class i{constructor(e){this._listOption=e}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return i.\u0275fac=function(e){return new(e||i)(A(zz,8))},i.\u0275dir=xe({type:i,hostVars:4,hostBindings:function(e,n){2&e&&an("mdc-list-item__start",n._isAlignedAtStart())("mdc-list-item__end",!n._isAlignedAtStart())}}),i})(),mre=(()=>{class i extends Hz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[rt]}),i})(),gre=(()=>{class i extends Hz{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[rt]}),i})();const _re=new fe("MAT_LIST_CONFIG");let PR=(()=>{class i{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Nt(_re,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=jt(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=jt(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,hostVars:1,hostBindings:function(e,n){2&e&&At("aria-disabled",n.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),i})(),Gz=(()=>{class i{set lines(e){this._explicitLines=ys(e,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=jt(e)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(e){this._disabled=jt(e)}get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(e,n,r,s,o,a){this._elementRef=e,this._ngZone=n,this._listBase=r,this._platform=s,this._explicitLines=null,this._disableRipple=!1,this._disabled=!1,this._subscriptions=new Yt,this._rippleRenderer=null,this._hasUnscopedTextContent=!1,this.rippleConfig=o||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement="button"===this._hostElement.nodeName.toLowerCase(),this._noopAnimations="NoopAnimations"===a,r&&!r._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),null!==this._rippleRenderer&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!(!this._avatars.length&&!this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new Lm(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Rr(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();const n=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",2===n),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",3===n),this._hasUnscopedTextContent){const s=0===this._titles.length&&1===n;r.classList.toggle("mdc-list-item__primary-text",s),r.classList.toggle("mdc-list-item__secondary-text",!s)}else r.classList.remove("mdc-list-item__primary-text"),r.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!(!e.textContent||!e.textContent.trim()))}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot),A(PR,8),A(Ti),A(LI,8),A(Cr,8))},i.\u0275dir=xe({type:i,contentQueries:function(e,n,r){if(1&e&&(Li(r,mre,4),Li(r,gre,4)),2&e){let s;Dt(s=Tt())&&(n._avatars=s),Dt(s=Tt())&&(n._icons=s)}},hostVars:4,hostBindings:function(e,n){2&e&&(At("aria-disabled",n.disabled)("disabled",n._isButtonElement&&n.disabled||null),an("mdc-list-item--disabled",n.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),i})();const $z=new fe("SelectionList");let _C=(()=>{class i extends Gz{get checkboxPosition(){return this.togglePosition}set checkboxPosition(e){this.togglePosition=e}get color(){return this._color||this._selectionList.color}set color(e){this._color=e}get value(){return this._value}set value(e){this.selected&&e!==this.value&&this._inputsInitialized&&(this.selected=!1),this._value=e}get selected(){return this._selectionList.selectedOptions.isSelected(this)}set selected(e){const n=jt(e);n!==this._selected&&(this._setSelected(n),(n||this._selectionList.multiple)&&this._selectionList._reportValueChange())}constructor(e,n,r,s,o,a,l){super(e,n,r,s,a,l),this._selectionList=r,this._changeDetectorRef=o,this.selectedChange=new Ve,this.togglePosition="after",this._selected=!1,this._inputsInitialized=!1}ngOnInit(){const e=this._selectionList;e._value&&e._value.some(r=>e.compareWith(this._value,r))&&this._setSelected(!0);const n=this._selected;Promise.resolve().then(()=>{(this._selected||n)&&(this.selected=!0,this._changeDetectorRef.markForCheck())}),this._inputsInitialized=!0}ngOnDestroy(){super.ngOnDestroy(),this.selected&&Promise.resolve().then(()=>{this.selected=!1})}toggle(){this.selected=!this.selected}focus(){this._hostElement.focus()}getLabel(){return(this._titles?.get(0)?._elementRef.nativeElement||this._unscopedContent?.nativeElement)?.textContent||""}_hasCheckboxAt(e){return this._selectionList.multiple&&this._getTogglePosition()===e}_hasRadioAt(e){return!this._selectionList.multiple&&this._getTogglePosition()===e&&!this._selectionList.hideSingleSelectionIndicator}_hasIconsOrAvatarsAt(e){return this._hasProjected("icons",e)||this._hasProjected("avatars",e)}_hasProjected(e,n){return this._getTogglePosition()!==n&&("avatars"===e?0!==this._avatars.length:0!==this._icons.length)}_handleBlur(){this._selectionList._onTouched()}_getTogglePosition(){return this.togglePosition||"after"}_setSelected(e){return e!==this._selected&&(this._selected=e,e?this._selectionList.selectedOptions.select(this):this._selectionList.selectedOptions.deselect(this),this.selectedChange.emit(e),this._changeDetectorRef.markForCheck(),!0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_toggleOnInteraction(){this.disabled||(this._selectionList.multiple?(this.selected=!this.selected,this._selectionList._emitChangeEvent([this])):this.selected||(this.selected=!0,this._selectionList._emitChangeEvent([this])))}_setTabindex(e){this._hostElement.setAttribute("tabindex",e+"")}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot),A($z),A(Ti),A(ri),A(LI,8),A(Cr,8))},i.\u0275cmp=it({type:i,selectors:[["mat-list-option"]],contentQueries:function(e,n,r){if(1&e&&(Li(r,pre,5),Li(r,fre,5)),2&e){let s;Dt(s=Tt())&&(n._lines=s),Dt(s=Tt())&&(n._titles=s)}},viewQuery:function(e,n){if(1&e&&Xn(Xie,5),2&e){let r;Dt(r=Tt())&&(n._unscopedContent=r.first)}},hostAttrs:["role","option",1,"mat-mdc-list-item","mat-mdc-list-option","mdc-list-item"],hostVars:25,hostBindings:function(e,n){1&e&&ze("blur",function(){return n._handleBlur()})("click",function(){return n._toggleOnInteraction()}),2&e&&(At("aria-selected",n.selected),an("mdc-list-item--selected",n.selected&&!n._selectionList.multiple&&n._selectionList.hideSingleSelectionIndicator)("mdc-list-item--with-leading-avatar",n._hasProjected("avatars","before"))("mdc-list-item--with-leading-icon",n._hasProjected("icons","before"))("mdc-list-item--with-trailing-icon",n._hasProjected("icons","after"))("mat-mdc-list-option-with-trailing-avatar",n._hasProjected("avatars","after"))("mdc-list-item--with-leading-checkbox",n._hasCheckboxAt("before"))("mdc-list-item--with-trailing-checkbox",n._hasCheckboxAt("after"))("mdc-list-item--with-leading-radio",n._hasRadioAt("before"))("mdc-list-item--with-trailing-radio",n._hasRadioAt("after"))("mat-accent","primary"!==n.color&&"warn"!==n.color)("mat-warn","warn"===n.color)("_mat-animation-noopable",n._noopAnimations))},inputs:{togglePosition:"togglePosition",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected"},outputs:{selectedChange:"selectedChange"},exportAs:["matListOption"],features:[An([{provide:Gz,useExisting:i},{provide:zz,useExisting:i}]),rt],ngContentSelectors:hre,decls:20,vars:6,consts:[["icons",""],["checkbox",""],["radio",""],["class","mdc-list-item__start mat-mdc-list-option-checkbox-before",4,"ngIf"],["class","mdc-list-item__start mat-mdc-list-option-radio-before",4,"ngIf"],[3,"ngIf"],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],["unscopedContent",""],["class","mdc-list-item__end",4,"ngIf"],[1,"mat-mdc-focus-indicator"],[1,"mdc-checkbox"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","disabled"],[1,"mdc-checkbox__background"],["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"],[1,"mdc-radio"],["type","radio",1,"mdc-radio__native-control",3,"checked","disabled"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],[1,"mdc-list-item__start","mat-mdc-list-option-checkbox-before"],[3,"ngTemplateOutlet"],[1,"mdc-list-item__start","mat-mdc-list-option-radio-before"],[1,"mdc-list-item__end"]],template:function(e,n){1&e&&(Ki(ure),_e(0,Kie,1,0,"ng-template",null,0,Fc),_e(2,Zie,6,4,"ng-template",null,1,Fc),_e(4,Qie,5,4,"ng-template",null,2,Fc),_e(6,ere,2,1,"span",3),_e(7,nre,2,1,"span",4),_e(8,rre,1,1,"ng-template",5),j(9,"span",6),Bt(10),Bt(11,1),j(12,"span",7,8),ze("cdkObserveContent",function(){return n._updateItemLines(!0)}),Bt(14,2),q()(),_e(15,ore,2,1,"span",9),_e(16,lre,2,1,"span",9),_e(17,dre,1,1,"ng-template",5),Bt(18,3),ke(19,"div",10)),2&e&&($(6),z("ngIf",n._hasCheckboxAt("before")),$(1),z("ngIf",n._hasRadioAt("before")),$(1),z("ngIf",n._hasIconsOrAvatarsAt("before")),$(7),z("ngIf",n._hasCheckboxAt("after")),$(1),z("ngIf",n._hasRadioAt("after")),$(1),z("ngIf",n._hasIconsOrAvatarsAt("after")))},dependencies:[E3,gi,ry],styles:['.mat-mdc-list-option-with-trailing-avatar.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar.mdc-list-item,.mat-mdc-list-option-with-trailing-avatar.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end,.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{width:40px;height:40px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{border-radius:50%}.mat-mdc-list-option .mdc-touch-target-wrapper{display:inline}.mat-mdc-list-option .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}.mat-mdc-list-option .mdc-checkbox[hidden]{display:none}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .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){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .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){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-list-option .mdc-checkbox__mixedmark{margin:0 1px}}.mat-mdc-list-option .mdc-checkbox--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .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}.mat-mdc-list-option .mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0}.mdc-checkbox--upgraded .mat-mdc-list-option .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__checkmark-path{stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mat-mdc-list-option .mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mat-mdc-list-option .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mat-mdc-list-option .mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .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)}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mat-mdc-list-option .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}.mat-mdc-list-option .mdc-radio[hidden]{display:none}.mat-mdc-list-option .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-list-option .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:""}.mat-mdc-list-option .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%}.mat-mdc-list-option .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%}.mat-mdc-list-option .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mat-mdc-list-option .mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mat-mdc-list-option .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}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .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){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .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){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5)}.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background,.mat-mdc-list-option [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mat-mdc-list-option .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12}@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}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__background{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)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__mixedmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .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)}.mat-mdc-list-option:not(._mat-animation-noopable) .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)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-list-option:not(._mat-animation-noopable) .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)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .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)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.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)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:focus+.mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#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:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .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-list-option .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .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-list-option .mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-state-layer-size, 40px);height:40px;height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio{padding:calc((40px - 20px) / 2);padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px) / 2)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#000;border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-disabled-unselected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#6200ee;border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#6200ee;border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-unselected-icon-color, #000)}.mat-mdc-list-option .mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);top:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-checkbox__native-control,.mat-mdc-list-option .mdc-radio__native-control{display:none}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected [dir=rtl]::after{right:auto;left:16px}'],encapsulation:2,changeDetection:0}),i})();const vre={provide:yo,useExisting:Ln(()=>vC),multi:!0};class yre{constructor(t,e){this.source=t,this.options=e}}let vC=(()=>{class i extends PR{get multiple(){return this._multiple}set multiple(e){const n=jt(e);n!==this._multiple&&(this._multiple=n,this.selectedOptions=new CR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=jt(e)}constructor(e,n){super(),this._element=e,this._ngZone=n,this._initialized=!1,this._destroyed=new Fe,this._onChange=r=>{},this.selectionChange=new Ve,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new CR(this._multiple),this._onTouched=()=>{},this._selectionListDisabled=!1,this._handleFocusout=()=>{setTimeout(()=>{this._containsFocus()||this._resetActiveOption()})},this._handleFocusin=r=>{if(this.disabled)return;const s=this._items.toArray().findIndex(o=>o._elementRef.nativeElement.contains(r.target));s>-1?this._setActiveOption(s):this._resetActiveOption()},this._isNonInteractive=!1}ngAfterViewInit(){this._initialized=!0,this._setupRovingTabindex(),this._ngZone.runOutsideAngular(()=>{this._element.nativeElement.addEventListener("focusin",this._handleFocusin),this._element.nativeElement.addEventListener("focusout",this._handleFocusout)}),this._value&&this._setOptionsFromValues(this._value),this._watchForSelectionChange()}ngOnChanges(e){const n=e.disabled,r=e.disableRipple,s=e.hideSingleSelectionIndicator;(r&&!r.firstChange||n&&!n.firstChange||s&&!s.firstChange)&&this._markOptionsForCheck()}ngOnDestroy(){this._keyManager?.destroy(),this._element.nativeElement.removeEventListener("focusin",this._handleFocusin),this._element.nativeElement.removeEventListener("focusout",this._handleFocusout),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}focus(e){this._element.nativeElement.focus(e)}selectAll(){return this._setAllOptionsSelected(!0)}deselectAll(){return this._setAllOptionsSelected(!1)}_reportValueChange(){if(this.options&&!this._isDestroyed){const e=this._getSelectedOptionValues();this._onChange(e),this._value=e}}_emitChangeEvent(e){this.selectionChange.emit(new yre(this,e))}writeValue(e){this._value=e,this.options&&this._setOptionsFromValues(e||[])}setDisabledState(e){this.disabled=e}get disabled(){return this._selectionListDisabled}set disabled(e){this._selectionListDisabled=jt(e),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}_watchForSelectionChange(){this.selectedOptions.changed.pipe(Ze(this._destroyed)).subscribe(e=>{for(let n of e.added)n.selected=!0;for(let n of e.removed)n.selected=!1;this._containsFocus()||this._resetActiveOption()})}_setOptionsFromValues(e){this.options.forEach(n=>n._setSelected(!1)),e.forEach(n=>{const r=this.options.find(s=>!s.selected&&this.compareWith(s.value,n));r&&r._setSelected(!0)})}_getSelectedOptionValues(){return this.options.filter(e=>e.selected).map(e=>e.value)}_markOptionsForCheck(){this.options&&this.options.forEach(e=>e._markForCheck())}_setAllOptionsSelected(e,n){const r=[];return this.options.forEach(s=>{(!n||!s.disabled)&&s._setSelected(e)&&r.push(s)}),r.length&&this._reportValueChange(),r}get options(){return this._items}_handleKeydown(e){const n=this._keyManager.activeItem;if(13!==e.keyCode&&32!==e.keyCode||this._keyManager.isTyping()||!n||n.disabled)if(65===e.keyCode&&this.multiple&&!this._keyManager.isTyping()&&Vo(e,"ctrlKey")){const r=this.options.some(s=>!s.disabled&&!s.selected);e.preventDefault(),this._emitChangeEvent(this._setAllOptionsSelected(r,!0))}else this._keyManager.onKeydown(e);else e.preventDefault(),n._toggleOnInteraction()}_setupRovingTabindex(){this._keyManager=new P3(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(e=>this._setActiveOption(e)),this._items.changes.pipe(Ze(this._destroyed)).subscribe(()=>{const e=this._keyManager.activeItem;(!e||!this._items.toArray().indexOf(e))&&this._resetActiveOption()})}_setActiveOption(e){this._items.forEach((n,r)=>n._setTabindex(r===e?0:-1)),this._keyManager.updateActiveItem(e)}_resetActiveOption(){if(this.disabled)return void this._setActiveOption(-1);const e=this._items.find(n=>n.selected&&!n.disabled)||this._items.first;this._setActiveOption(e?this._items.toArray().indexOf(e):-1)}_containsFocus(){const e=RM();return e&&this._element.nativeElement.contains(e)}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot))},i.\u0275cmp=it({type:i,selectors:[["mat-selection-list"]],contentQueries:function(e,n,r){if(1&e&&Li(r,_C,5),2&e){let s;Dt(s=Tt())&&(n._items=s)}},hostAttrs:["role","listbox",1,"mat-mdc-selection-list","mat-mdc-list-base","mdc-list"],hostVars:1,hostBindings:function(e,n){1&e&&ze("keydown",function(s){return n._handleKeydown(s)}),2&e&&At("aria-multiselectable",n.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[An([vre,{provide:PR,useExisting:i},{provide:$z,useExisting:i}]),rt,Si],ngContentSelectors:Yie,decls:1,vars:0,template:function(e,n){1&e&&(Ki(),Bt(0))},styles:['@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-list-divider::after{content:"";display:block;border-bottom-width:1px;border-bottom-style:solid}}.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::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-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px double rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected:focus::before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item__overline-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl]{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item,.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item,.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item,.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start,.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item,.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item,.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item,.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);line-height:var(--mdc-typography-caption-line-height);font-weight:var(--mdc-typography-caption-font-weight);letter-spacing:var(--mdc-typography-caption-letter-spacing);text-decoration:var(--mdc-typography-caption-text-decoration);text-transform:var(--mdc-typography-caption-text-transform)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item,.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-list-item,.mdc-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{margin:calc((3rem - 1.5rem)/2) 16px}.mdc-list-divider{padding:0;background-clip:content-box}.mdc-list-divider.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:16px}.mdc-list-divider.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset{padding-left:auto;padding-right:16px}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl]{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0px;padding-right:auto}[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:0px}[dir=rtl] .mdc-list-divider,.mdc-list-divider[dir=rtl]{padding:0}.mdc-list-item{background-color:var(--mdc-list-list-item-container-color)}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item--with-one-line{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-avatar,.mdc-list-item--with-one-line.mdc-list-item--with-leading-icon,.mdc-list-item--with-one-line.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-one-line.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-one-line.mdc-list-item--with-leading-radio,.mdc-list-item--with-one-line.mdc-list-item--with-leading-switch{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-image,.mdc-list-item--with-one-line.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines.mdc-list-item--with-leading-avatar,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-icon,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-radio,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-switch,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-image,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-three-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item__primary-text{color:var(--mdc-list-list-item-label-text-color)}.mdc-list-item__primary-text{font-family:var(--mdc-list-list-item-label-text-font);line-height:var(--mdc-list-list-item-label-text-line-height);font-size:var(--mdc-list-list-item-label-text-size);font-weight:var(--mdc-list-list-item-label-text-weight);letter-spacing:var(--mdc-list-list-item-label-text-tracking)}.mdc-list-item__secondary-text{color:var(--mdc-list-list-item-supporting-text-color)}.mdc-list-item__secondary-text{font-family:var(--mdc-list-list-item-supporting-text-font);line-height:var(--mdc-list-list-item-supporting-text-line-height);font-size:var(--mdc-list-list-item-supporting-text-size);font-weight:var(--mdc-list-list-item-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-supporting-text-tracking)}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color)}.mdc-list-item--with-leading-icon .mdc-list-item__start{width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start>i{font-size:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon{font-size:var(--mdc-list-list-item-leading-icon-size);width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color)}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font);line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height);font-size:var(--mdc-list-list-item-trailing-supporting-text-size);font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end>i{font-size:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon{font-size:var(--mdc-list-list-item-trailing-icon-size);width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color)}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled .mdc-list-item__overline-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color)}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color)}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color)}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color);opacity:var(--mdc-list-list-item-hover-state-layer-opacity)}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color);opacity:var(--mdc-list-list-item-disabled-state-layer-opacity)}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color);opacity:var(--mdc-list-list-item-focus-state-layer-opacity)}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape);background-color:var(--mdc-list-list-item-leading-avatar-color)}.mat-mdc-list-base{--mdc-list-list-item-container-shape:0;--mdc-list-list-item-leading-avatar-shape:50%;--mdc-list-list-item-container-color:transparent;--mdc-list-list-item-selected-container-color:transparent;--mdc-list-list-item-leading-avatar-color:transparent;--mdc-list-list-item-leading-icon-size:24px;--mdc-list-list-item-leading-avatar-size:40px;--mdc-list-list-item-trailing-icon-size:24px;--mdc-list-list-item-disabled-state-layer-color:transparent;--mdc-list-list-item-disabled-state-layer-opacity:0;--mdc-list-list-item-disabled-label-text-opacity:0.38;--mdc-list-list-item-disabled-leading-icon-opacity:0.38;--mdc-list-list-item-disabled-trailing-icon-opacity:0.38}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}'],encapsulation:2,changeDetection:0}),i})(),bre=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[CI,vo,Gn,By,eU,PU]}),i})();function xre(i,t){if(1&i&&(j(0,"mat-label"),Ye(1),q()),2&i){const e=ye(2);$(1),$i(e.resource.name)}}function wre(i,t){if(1&i&&(j(0,"mat-list-option",5),Ye(1),q()),2&i){const e=t.$implicit,n=ye(2);z("value",e.key)("selected",n.resource.data[e.key])("disabled",n.disabled),$(1),Zi(" ",e.key," ")}}function Mre(i,t){if(1&i){const e=xi();fo(0,1),_e(1,xre,2,1,"mat-label",2),j(2,"mat-selection-list",3),ze("selectionChange",function(r){return bn(e),xn(ye().onSelection(r))}),_e(3,wre,2,4,"mat-list-option",4),Ht(4,"keyvalue"),q(),po()}if(2&i){const e=ye();z("matTooltip",e.resourceDescription),$(1),z("ngIf",e.resource.name),$(1),z("disabled",e.disabled),$(1),z("ngForOf",Zt(4,4,e.resource.data))}}let Cre=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new Ve}onSelection(e){for(const n of e.options)this.resource.data[n.value]=n.selected;this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-flags-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],[3,"disabled","selectionChange"],[3,"value","selected","disabled",4,"ngFor","ngForOf"],[3,"value","selected","disabled"]],template:function(e,n){1&e&&_e(0,Mre,5,6,"ng-container",0),2&e&&z("ngIf",n.resource)},dependencies:[_o,gi,zo,xs,vC,_C,cN],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),i})();class OR{constructor(t=!1,e=Yh.instance){this.parentClock=e,this.tickSub=null,this._tick$=new Fe,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,t&&this.start()}get tick$(){return this._tick$.pipe(Qe(([t,e])=>[e,e-t]))}get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get elapsedTime(){return this.isPaused?this.pausedAt-this.startedAt:this.parentClock.elapsedTime-this.startedAt}createChildClock(t){return new OR(t,this)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks())}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(Qe(([t,e])=>[this.oldRelativeTime,t-this.startedAt]),Di(([t,e])=>this.oldRelativeTime=e)).subscribe(this._tick$)}stopListeningTicks(){var t;null===(t=this.tickSub)||void 0===t||t.unsubscribe(),this.tickSub=null}}class Yh{constructor(){this._tick$=new Fe;let t=this.elapsedTime;dt(void 0,s3).pipe(function Sre(i){let e,t=1/0;return null!=i&&("object"==typeof i?({count:t=1/0,delay:e}=i):t=i),t<=0?()=>Os:Vn((n,r)=>{let o,s=0;const a=()=>{if(o?.unsubscribe(),o=null,null!=e){const c="number"==typeof e?DM(e):rr(e(s)),u=Fn(r,()=>{u.unsubscribe(),l()});c.subscribe(u)}else l()},l=()=>{let c=!1;o=n.subscribe(Fn(r,void 0,()=>{++s[t,this.elapsedTime]),Di(([e,n])=>t=n)).subscribe(this._tick$)}static get instance(){return Yh._instance||(Yh._instance=new Yh),Yh._instance}get tick$(){return this._tick$.pipe(Qe(([t,e])=>[e,e-t]))}get elapsedTime(){return(typeof performance>"u"?Date:performance).now()}createChildClock(t){return new OR(t,this)}}const Ere={transparent:!1,background:0,size:"fullscreen",antialias:!0};class Are{constructor(t,e,n={}){this.scene=t,this.canvas=e,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},Ere),n||{})}}class Zy{constructor(t){this.data=t,this.adjacent=new Set}static fromArray(t,e=!1){const n=new Zy(t[0]);let r=n;for(let s=1;sn.map(r=>new Zy(r)));for(let n=0;n0&&e[n][r].addAdjacent(e[n][r-1]),n>0&&e[n][r].addAdjacent(e[n-1][r]);return e[0][0]}addAdjacent(t){return!this.adjacent.has(t)&&(this.adjacent.add(t),t.adjacent.add(this),!0)}removeAdjacent(t){return!!this.adjacent.has(t)&&(this.adjacent.delete(t),t.adjacent.delete(this),!0)}addEdge(t,e){return!!this.removeAdjacent(e)&&(this.addAdjacent(t),t.addAdjacent(e),!0)}removeEdge(t,e){return!(!t.adjacent.has(this)||!t.adjacent.has(e))&&(t.removeAdjacent(this),t.removeAdjacent(e),this.addAdjacent(e))}walkRead(t){const e=new Set,n=[[this,t]];for(e.add(this);n.length;){const r=n.shift(),[s,o]=r;if(0!==o){const a=Array.from(s.adjacent).filter(l=>!e.has(l));for(const l of a)e.add(l),n.push([l,o-1])}}return e}walkReadPreserveDepth(t){const e=new Set,n=[],r=[[this,t]];for(e.add(this);r.length;){const s=r.shift(),[o,a]=s,l=t-a;if(n[l]||(n[l]=new Set),n[l].add(o),0!==a){const c=Array.from(o.adjacent).filter(u=>!e.has(u));for(const u of c)e.add(u),r.push([u,a-1])}}return n}nodes(){return Array.from(this.walkRead(-1))}}var Kl=(()=>{return(i=Kl||(Kl={}))[i.INPUT_CONTROLLERS=0]="INPUT_CONTROLLERS",i[i.PHYSICS_SIMULATION=200]="PHYSICS_SIMULATION",i[i.OBJECTS_BINDING=400]="OBJECTS_BINDING",i[i.ANIMATION_MIXERS=600]="ANIMATION_MIXERS",i[i.CONTROLLERS=800]="CONTROLLERS",i[i.RENDERING=1e3]="RENDERING",i[i.POST_RENDERING=1200]="POST_RENDERING",Kl;var i})();let Qy=(()=>{class i{constructor(){this.tick$=new Fe,this._world=null,this._name="e0x"+(i.default_name_counter++).toString(16),this._active=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Fe,this._onRemoved$=new Fe}get world(){return this._world}get name(){return this._name}set name(e){this._name=e}get active(){return this._active}set active(e){this._active=e}get children(){return[...this._children]}addChildren(...e){for(const n of e)n.parent&&n.parent.removeChildren([n]),n.parent=this;if(this._children.push(...e),this._world)for(const n of e)this._world.addEntity(n)}removeChildren(e,n=!1){this._children=this._children.filter(r=>!e.includes(r));for(const r of e)r.parent=null,this._world&&this._world.removeEntity(r,n)}get components(){return[...this._components]}addComponents(...e){for(const n of e)n.entity&&n.entity.removeComponents([n]),n.entity=this;if(this._components.push(...e),this._world)for(const n of e)n.addToWorld(this._world)}removeComponents(e,n=!1){this._components=this._components.filter(r=>!e.includes(r));for(const r of e)r.entity=null,this._world&&r.removeFromWorld(this._world,n)}get onSpawned$(){return this._onSpawned$.asObservable()}get onRemoved$(){return this._onRemoved$.asObservable()}onSpawned(e){this._world=e;for(const n of this._components)n.addToWorld(e);for(const n of this._children)e.addEntity(n);this._onSpawned$.next()}onRemoved(){const e=this._world;this._world=null;for(const n of this._children)e.removeEntity(n);for(const n of this._components)n.removeFromWorld(e,!1);this._onRemoved$.next()}dispose(){this.world&&this.world.removeEntity(this,!1),this._onSpawned$.complete(),this._onRemoved$.complete(),this.tick$.complete();for(const e of this._children)e.dispose();for(const e of this._components)e.dispose()}}return i.default_name_counter=0,i})();class Dre extends Qy{constructor(t){super(),this.tickOrder=t}}function yC(i,t=Kl.CONTROLLERS){const e=new Dre(t);return i.addEntity(e),e.tick$.pipe(Xd(()=>{i.removeEntity(e,!0)}))}class Tre extends Qy{constructor(t){super(),this.renderer=t,this.tickOrder=Kl.RENDERING,this._rendererSize$=new Ct(null),this.addComponents(t),this.tick$.subscribe(()=>{this.renderer.render()})}get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}onSpawned(t){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),Rr(wa(window,"resize").pipe(TM(100)),wa(window,"orientationchange")).pipe(Ze(this._onRemoved$),Qe(()=>({x:window.innerWidth,y:window.innerHeight})),No({x:window.innerWidth,y:window.innerHeight})).subscribe(e=>{this._rendererSize$.next("function"==typeof this.rendererOptions.size?this.rendererOptions.size(e):e)})):this.rendererOptions.size instanceof En||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(Ze(this._onRemoved$)).subscribe(e=>{this._rendererSize$.next(e)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(Ze(this._onRemoved$),$c((e,n)=>e?.x==n?.x&&e?.y==n?.y)).subscribe(e=>{e&&this.renderer.resizeRenderer(e)}),super.onSpawned(t)}dispose(){super.dispose(),this._rendererSize$.complete()}}const FR=i=>{i.updateVisibility?i.updateVisibility():Wz(i)},Wz=i=>{for(const t of i.children)FR(t)};class Ire extends Qy{constructor(){super(...arguments),this._visible=!0}get visible(){return this._visible}get worldVisible(){let t=this;for(;;){if(!1===t.visible)return!1;if(!t.parent)break;t=t.parent}return!0}set visible(t){this._visible=t,this.updateVisibility()}updateVisibility(){Wz(this)}addChildren(...t){super.addChildren(...t);for(const e of t)FR(e)}removeChildren(t,e=!1){if(super.removeChildren(t,e),!e)for(const n of t)FR(n)}}class LR{constructor(){this._running=!1,this.stop$=new Fe}get running(){return this._running}start(...t){this.running||(this.startInternal(...t),this._running=!0)}stop(...t){this.running&&(this.stop$.next(),this.stopInternal(...t),this._running=!1)}stopInternal(...t){}}class Rre extends LR{constructor(t,e){super(),this.keyboard=t,this.keymap=e,this._output$=new Fe}get output$(){return this._output$.asObservable()}startInternal(){const t=[[],[],[],[]];this.keymap.includes("wasd")&&(t[0].push("KeyW"),t[1].push("KeyA"),t[2].push("KeyS"),t[3].push("KeyD")),this.keymap.includes("arrows")&&(t[0].push("ArrowUp"),t[1].push("ArrowLeft"),t[2].push("ArrowDown"),t[3].push("ArrowRight")),jd(t.map(e=>this.keyboard.bindMany(...e))).pipe(Ze(this.stop$),Qe(e=>{const n={};if(e.includes(!0)){const[r,s,o,a]=e;r!=o&&(n.upDown=r),s!=a&&(n.leftRight=s)}return n})).subscribe(e=>this._output$.next(e))}}const bC=new En(ds);class kre extends LR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,this.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement],this.handleKeys=this.handleKeys.bind(this),this.resetAllKeys=this.resetAllKeys.bind(this),this.onPointerLockChange=this.onPointerLockChange.bind(this)}startInternal(){window.addEventListener("keydown",this.handleKeys),window.addEventListener("keyup",this.handleKeys),window.addEventListener("blur",this.resetAllKeys),document.addEventListener("pointerlockchange",this.onPointerLockChange)}stopInternal(){window.removeEventListener("keydown",this.handleKeys),window.removeEventListener("keyup",this.handleKeys),window.removeEventListener("blur",this.resetAllKeys),document.addEventListener("pointerlockchange",this.onPointerLockChange),this.resetAllKeys()}bind(t){this.bindings[t]||(this.bindings[t]=[]);const e=new Ct(!1);return this.bindings[t].push(e),e.pipe($c(),Xd(()=>{this.bindings[t].splice(this.bindings[t].indexOf(e),1),e.complete()}))}bindMany(...t){if(0==t.length)return console.warn("[KeyboardController] bindMany called without any key code"),bC;if(1==t.length)return this.bind(t[0]);const e=[];for(const n of t){this.bindings[n]||(this.bindings[n]=[]);const r=new Ct(!1);this.bindings[n].push(r),e.push(r)}return jd(e).pipe(Xd(()=>{for(let n=0;nn.includes(!0)),$c())}emulateKeyDown(t){if(this.running)for(const e of this.bindings[t]||[])e.next(!0)}emulateKeyUp(t){if(this.running)for(const e of this.bindings[t]||[])e.next(!1)}emulateKeyPress(t){this.emulateKeyDown(t),this.emulateKeyUp(t)}handleKeys(t){if("keydown"!=t.type&&"keyup"!=t.type)return;const e="keydown"==t.type;if(e&&this.skipKeyDownsOnExternalFocus&&document.activeElement)for(const n of this.externalFocusBlacklist)if(document.activeElement instanceof n)return;for(const n of this.bindings[t.code]||[])n.next(e)}onPointerLockChange(){document.pointerLockElement||this.resetAllKeys()}resetAllKeys(){for(const t in this.bindings)for(const e of this.bindings[t]||[])e.next(!1)}}class Ar{static get O(){return{x:0,y:0}}static get X(){return{x:1,y:0}}static get Y(){return{x:0,y:1}}static get nX(){return{x:-1,y:0}}static get nY(){return{x:0,y:-1}}static clone(t){return{x:t.x,y:t.y}}static spr(t){return[t.x,t.y]}static neg(t){return{x:-t.x,y:-t.y}}static add(t,e){return{x:t.x+e.x,y:t.y+e.y}}static sub(t,e){return{x:t.x-e.x,y:t.y-e.y}}static scale(t,e){return{x:t.x*e.x,y:t.y*e.y}}static avg(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}static round(t){return{x:Math.round(t.x),y:Math.round(t.y)}}static lenSq(t){return t.x*t.x+t.y*t.y}static len(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static dist(t,e){return Ar.len(Ar.sub(t,e))}static norm(t){const e=Ar.len(t);return{x:t.x/e,y:t.y/e}}static scalarMult(t,e){return{x:t.x*e,y:t.y*e}}static lerp(t,e,n){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}static angle(t,e){const n=t.x*e.x+t.y*e.y,r=Math.sqrt(t.x**2+t.y**2)*Math.sqrt(e.x**2+e.y**2);return Math.acos(n/r)}static rot(t,e){const n=Math.cos(e),r=Math.sin(e);return{x:t.x*n-t.y*r,y:t.x*r+t.y*n}}static rotAround(t,e,n){const r=Math.cos(n),s=Math.sin(n),o_x=t.x-e.x,o_y=t.y-e.y;return{x:o_x*r-o_y*s+e.x,y:o_x*s+o_y*r+e.y}}}const Ore={pointerLock:!1};var ws=(()=>{return(i=ws||(ws={}))[i.NONE=0]="NONE",i[i.DRAG=1]="DRAG",i[i.DRAG_MIDDLE_BUTTON=2]="DRAG_MIDDLE_BUTTON",i[i.DRAG_RIGHT_BUTTON=3]="DRAG_RIGHT_BUTTON",i[i.DRAG_TOUCH_TWO_FINGERS=4]="DRAG_TOUCH_TWO_FINGERS",ws;var i})();class jm extends LR{constructor(t={}){super(),this._wheel$=null,this._delta$=new Fe,this._position$=new Ct(Ar.O),this._multiTouchPositions$=new Ct([]),this.stopped$=new Fe,this._state$=new Ct(ws.NONE),this.options=Object.assign(Object.assign({},Ore),t),this.canvasClickListener=this.canvasClickListener.bind(this)}static isTouchDevice(){return"createTouch"in document||!!navigator.userAgent.match(/(iPhone|iPod|iPad)/)||!!navigator.userAgent.match(/Android/)}get delta$(){return this._delta$.asObservable()}get position(){return this._position$.getValue()}get position$(){return this._position$.asObservable()}get wheel$(){return this._wheel$||(this._wheel$=wa(this._element,"wheel",{passive:!1}).pipe(Ze(this.stopped$),Xd(()=>this._wheel$=null),Di(t=>t.preventDefault()),Qe(t=>t.deltaY),Pu())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(vs(t=>t==ws.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:bC),Qe(t=>t.map(e=>({x:e.x,y:e.y}))),function Pre(){return Vn((i,t)=>{let e,n=!1;i.subscribe(Fn(t,r=>{const s=e;e=r,n&&t.next([s,r]),n=!0}))})}(),Dn(([t,e])=>t.length>1&&e.length>1),Qe(([t,e])=>({centerPointDelta:Ar.sub(Ar.scalarMult(e.reduce((n,r)=>Ar.add(n,r),Ar.O),1/e.length),Ar.scalarMult(t.reduce((n,r)=>Ar.add(n,r),Ar.O),1/e.length)),angleDelta:Ar.angle(e[1],e[0])-Ar.angle(t[1],t[0]),distanceDelta:Ar.dist(e[1],e[0])-Ar.dist(t[1],t[0])})))}get _element(){return this.options.canvas||window}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(ws.NONE);const t=[ws.DRAG,ws.DRAG_MIDDLE_BUTTON,ws.DRAG_RIGHT_BUTTON],e=[ws.NONE,ws.DRAG,ws.DRAG_TOUCH_TWO_FINGERS],n=[],r={};wa(this._element,"mousemove").pipe(Ze(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),wa(this._element,"pointermove").pipe(Ze(this.stopped$)).subscribe(o=>{o instanceof PointerEvent?("touch"===o.pointerType&&(r[o.pointerId]={x:o.pageX,y:o.pageY}),this._position$.next({x:o.pageX,y:o.pageY}),this._multiTouchPositions$.next(Object.values(r))):this._position$.next({x:o.clientX,y:o.clientY}),this._delta$.next({x:o.movementX,y:o.movementY})}),!jm.isTouchDevice()&&this.options.pointerLock&&this.options.canvas&&this.options.canvas.addEventListener("click",this.canvasClickListener);const s=o=>{delete r[o.pointerId];for(let a=0;a{0===n.length&&(this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),this._element.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)),n.push(o),"touch"===o.pointerType?(r[o.pointerId]={x:o.pageX,y:o.pageY},this._state$.next(e[Math.min(n.length,2)])):this._state$.next(t[o.button]||ws.NONE)}),wa(this._element,"contextmenu").pipe(Ze(this.stopped$)).subscribe(o=>{o.preventDefault()})}stopInternal(t=!0){this.stopped$.next(),t&&this.options.canvas&&(this.options.canvas.removeEventListener("click",this.canvasClickListener),document.exitPointerLock())}canvasClickListener(){this.options.canvas.requestPointerLock()}}class Fre{static lookAt(t,e,n){let r=pt.sub(t,e);r=0===pt.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):pt.norm(r);let s=pt.cross(n,r);0===pt.lenSq(s)&&(r=1===Math.abs(n.z)?Object.assign(Object.assign({},r),{x:r.x+1e-4}):Object.assign(Object.assign({},r),{z:r.z+1e-4}),r=pt.norm(r),s=pt.cross(n,r)),s=pt.norm(s);let o=pt.cross(r,s);return[s.x,s.y,s.z,0,o.x,o.y,o.z,0,r.x,r.y,r.z,0]}}class Gr{static get O(){return{x:0,y:0,z:0,w:1}}static clone(t){return{x:t.x,y:t.y,z:t.z,w:t.w}}static spr(t){return[t.x,t.y,t.z,t.w]}static add(t,e){const n=t.w+e.w,r=t.x+e.x,s=t.y+e.y,o=t.z+e.z,a=Math.sqrt(n*n+r*r+s*s+o*o);return{w:n/a,x:r/a,y:s/a,z:o/a}}static mult(t,e){return{w:t.w*e.w-t.x*e.x-t.y*e.y-t.z*e.z,x:t.w*e.x+t.x*e.w+t.y*e.z-t.z*e.y,y:t.w*e.y-t.x*e.z+t.y*e.w+t.z*e.x,z:t.w*e.z+t.x*e.y-t.y*e.x+t.z*e.w}}static conjugate(t){return{x:-t.x,y:-t.y,z:-t.z,w:t.w}}static opposite(t){return{x:-t.x,y:-t.y,z:-t.z,w:-t.w}}static combineRotations(...t){let e={w:1,x:0,y:0,z:0};for(const n of t)e=this.mult(e,n);return e}static lerp(t,e,n){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y),z:t.z+n*(e.z-t.z),w:t.w+n*(e.w-t.w)}}static slerp(t,e,n){let s=Math.acos(t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w),o=Math.sin(s),a=t.x*Math.sin((1-n)*s)/o+e.x*Math.sin(n*s)/o,l=t.y*Math.sin((1-n)*s)/o+e.y*Math.sin(n*s)/o,c=t.z*Math.sin((1-n)*s)/o+e.z*Math.sin(n*s)/o,u=t.w*Math.sin((1-n)*s)/o+e.w*Math.sin(n*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(u)?Gr.clone(t):{x:a,y:l,z:c,w:u}}static fromAngle(t,e){const n=e/2,r=Math.sin(n);return Object.assign(Object.assign({},pt.scalarMult(t,r)),{w:Math.cos(n)})}static fromMatrix4(t){const e=t[0],n=t[4],r=t[8],s=t[1],o=t[5],a=t[9],l=t[2],c=t[6],u=t[10],h=e+o+u;if(h>0){const p=.5/Math.sqrt(h+1);return{x:(c-a)*p,y:(r-l)*p,z:(s-n)*p,w:.25/p}}if(e>o&&e>u){const p=2*Math.sqrt(1+e-o-u);return{x:.25*p,y:(n+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>u){const p=2*Math.sqrt(1+o-e-u);return{x:(n+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+u-e-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-n)/p}}}static fromEuler(t){const e=t.x,n=t.y,r=t.z,s=Math.cos(.5*r),o=Math.sin(.5*r),a=Math.cos(.5*n),l=Math.sin(.5*n),c=Math.cos(.5*e),u=Math.sin(.5*e);return{w:c*a*s+u*l*o,x:u*a*s-c*l*o,y:c*l*s+u*a*o,z:c*a*o-u*l*s}}static toEuler(t){const e=t.w,n=t.x,r=t.y,s=t.z,c=2*(e*r-s*n);return{x:Math.atan2(2*(e*n+r*s),1-2*(n*n+r*r)),y:Math.abs(c)>=1?Math.sign(c)*Math.PI/2:Math.asin(c),z:Math.atan2(2*(e*s+n*r),1-2*(r*r+s*s))}}static lookAt(t,e,n=pt.Z){return this.fromMatrix4(Fre.lookAt(t,e,n))}static rotAround(t,e,n){const r=Math.sin(n/2),s={w:Math.cos(n/2),x:e.x*r,y:e.y*r,z:e.z*r};return this.mult(s,t)}}class pt{static get O(){return{x:0,y:0,z:0}}static get X(){return{x:1,y:0,z:0}}static get Y(){return{x:0,y:1,z:0}}static get Z(){return{x:0,y:0,z:1}}static get nX(){return{x:-1,y:0,z:0}}static get nY(){return{x:0,y:-1,z:0}}static get nZ(){return{x:0,y:0,z:-1}}static clone(t){return{x:t.x,y:t.y,z:t.z}}static spr(t){return[t.x,t.y,t.z]}static neg(t){return{x:-t.x,y:-t.y,z:-t.z}}static add(t,e){return{x:t.x+e.x,y:t.y+e.y,z:t.z+e.z}}static sub(t,e){return{x:t.x-e.x,y:t.y-e.y,z:t.z-e.z}}static scale(t,e){return{x:t.x*e.x,y:t.y*e.y,z:t.z*e.z}}static avg(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2,z:(t.z+e.z)/2}}static round(t){return{x:Math.round(t.x),y:Math.round(t.y),z:Math.round(t.z)}}static lenSq(t){return t.x*t.x+t.y*t.y+t.z*t.z}static len(t){return Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z)}static dist(t,e){return pt.len(pt.sub(t,e))}static cross(t,e){const n=t.x,r=t.y,s=t.z,o=e.x,a=e.y,l=e.z;return{x:r*l-s*a,y:s*o-n*l,z:n*a-r*o}}static norm(t){const e=pt.len(t);return 0===e?t:{x:t.x/e,y:t.y/e,z:t.z/e}}static scalarMult(t,e){return{x:t.x*e,y:t.y*e,z:t.z*e}}static lerp(t,e,n){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y),z:t.z+n*(e.z-t.z)}}static angle(t,e){const n=t.x*e.x+t.y*e.y+t.z*e.z,r=Math.sqrt(t.x**2+t.y**2+t.z**2)*Math.sqrt(e.x**2+e.y**2+e.z**2);return Math.acos(n/r)}static rot(t,e){const{x:n,y:r,z:s}=t;return{x:e.w*e.w*n+2*e.y*e.w*s-2*e.z*e.w*r+e.x*e.x*n+2*e.y*e.x*r+2*e.z*e.x*s-e.y*e.y*n-e.z*e.z*n,y:2*e.x*e.y*n+e.y*e.y*r+2*e.z*e.y*s+2*e.w*e.z*n-e.z*e.z*r+e.w*e.w*r-2*e.x*e.w*s-e.x*e.x*r,z:2*e.x*e.z*n+2*e.y*e.z*r+e.z*e.z*s-2*e.w*e.y*n-e.y*e.y*s+2*e.w*e.x*r-e.x*e.x*s+e.w*e.w*s}}static rotAround(t,e,n){return this.rot(t,Gr.fromAngle(e,n))}static toSpherical(t){const e=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);return{radius:e,theta:0==e?0:Math.atan2(t.y,t.x),phi:0==e?0:Math.atan2(Math.sqrt(t.x*t.x+t.y*t.y),t.z)}}static fromSpherical(t){return{x:t.radius*Math.sin(t.phi)*Math.cos(t.theta),y:t.radius*Math.sin(t.phi)*Math.sin(t.theta),z:t.radius*Math.cos(t.phi)}}}var Jy=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};let xC=(()=>{class i{constructor(e,n){this.visualScene=e,this.physicsWorld=n,this.worldClock=Yh.instance.createChildClock(!1),this.keyboardInput=new kre,this.name="w0x"+(i.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],i._documentWorlds.push(this),this.keyboardInput.start(),window.ggstatic&&(window.ggstatic.registerConsoleCommand(this,"show_debugger",(...r)=>Jy(this,void 0,void 0,function*(){return window.ggstatic.showDebugControls=["1","true","+"].includes(r[0]),""+window.ggstatic.showDebugControls}),"args: [0 or 1]; turn on/off debug panel. Default value is 0"),window.ggstatic.registerConsoleCommand(this,"show_stats",(...r)=>Jy(this,void 0,void 0,function*(){return window.ggstatic.showStats=["1","true","+"].includes(r[0]),""+window.ggstatic.showStats}),"args: [0 or 1]; turn on/off stats. Default value is 0"),window.ggstatic.registerConsoleCommand(this,"ph_timescale",(...r)=>Jy(this,void 0,void 0,function*(){return this.physicsWorld.timeScale=+r[0],JSON.stringify(this.physicsWorld.timeScale)}),"args: [float]; change time scale of physics engine. Default value is 1.0"),window.ggstatic.registerConsoleCommand(this,"dr_drawphysics",(...r)=>Jy(this,void 0,void 0,function*(){return this.physicsDebugViewActive=["1","true","+"].includes(r[0]),""+this.physicsWorld.physicsDebugViewActive}),"args: [0 or 1]; turn on/off physics debug view. Default value is 0"))}static get documentWorlds(){return[...i._documentWorlds]}init(){return Jy(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]),this.worldClock.tick$.subscribe(([e,n])=>{let r=0;for(;r=Kl.PHYSICS_SIMULATION);r++)this.tickListeners[r].active&&this.tickListeners[r].tick$.next([e,n]);for(this.physicsWorld.simulate(n);rn.tickOrder-r.tickOrder),e.onSpawned(this))}removeEntity(e,n=!1){if(e.world){if(e.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(r=>r===e),1),this.tickListeners.splice(this.tickListeners.findIndex(r=>r===e),1),e.onRemoved()}n&&e.dispose()}get physicsDebugViewActive(){return this.physicsWorld.physicsDebugViewActive}set physicsDebugViewActive(e){if(this.physicsDebugViewActive!==e)if(e){const n=this.visualScene.debugPhysicsDrawerClass;if(!n)throw new Error("Debug drawer is not available");this.physicsWorld.startDebugger(this,new n)}else this.physicsWorld.stopDebugger(this)}}return i.default_name_counter=0,i._documentWorlds=[],i})();class Nre extends Are{}class jz extends Ire{}class lu extends jz{constructor(t,e=null){if(super(),this.object3D=t,this.objectBody=e,this.tickOrder=Kl.OBJECTS_BINDING,this._position=pt.O,this._rotation=Gr.O,e)this.tick$.subscribe(()=>{this.runTransformBinding(e,t)}),this.runTransformBinding(e,t),this.name=e.name;else{if(!t)throw new Error("Cannot create entity without a mesh and a body");this._position=t.position,this._rotation=t.rotation,this.name=t.name}e&&this.addComponents(e),t&&this.addComponents(t)}get position(){return this._position}set position(t){this.object3D&&(this.object3D.position=t),this.objectBody&&(this.objectBody.position=t),this._position=t}get rotation(){return this._rotation}set rotation(t){this.object3D&&(this.object3D.rotation=t),this.objectBody&&(this.objectBody.rotation=t),this._rotation=t}updateVisibility(){this.object3D&&(this.object3D.visible=this.worldVisible),super.updateVisibility()}runTransformBinding(t,e){const n=t.position,r=t.rotation;e&&(e.position=n,e.rotation=r),this._position=n,this._rotation=r}}function Xz(i,t=Dy,e){const n=DM(i,t);return function Bre(i,t){return Vn((e,n)=>{const{leading:r=!0,trailing:s=!1}=t??{};let o=!1,a=null,l=null,c=!1;const u=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&n.complete())},h=()=>{l=null,c&&n.complete()},p=g=>l=rr(i(g)).subscribe(Fn(n,u,h)),m=()=>{if(o){o=!1;const g=a;a=null,n.next(g),!c&&p(g)}};e.subscribe(Fn(n,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&n.complete()}))})}(()=>n,e)}class eb extends Zy{static fromMapArray(t,e=!1){const n=new eb(t[0]);let r=n;for(let s=1;sn.map(r=>new eb(r)));for(let n=0;n0&&e[n][r].addAdjacent(e[n][r-1]),n>0&&e[n][r].addAdjacent(e[n-1][r]);return e[0][0]}getNearestDummy(t,e){let n=1/0,r=this;return t.forEach(s=>{let o=Math.sqrt(Math.pow(e.x-s.data.position.x,2)+Math.pow(e.y-s.data.position.y,2)+Math.pow(e.z-s.data.position.z,2));oe?this.tick$.pipe(No(null),Ze(e.onRemoved$),Xz(1e3),Qe(()=>e.position)):bC),Qe(e=>this.mapGraph.getNearestDummy(this.mapGraphNodes,e)),Di(e=>this._nearestDummy$.next(e)),$c()).subscribe(e=>{let r,n=new Set;if(this.options.inertia>0){r=new Set;const s=e.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let o=0;or.add(a.data)),o<=this.options.loadDepth&&s[o].forEach(a=>n.add(a.data))}else e.walkRead(this.options.loadDepth).forEach(s=>n.add(s.data)),r=n;for(const s of this.loaded.keys())r.has(s)?n.delete(s):this.disposeChunk(s);Promise.all(Array.from(n.keys()).map(s=>this.loadChunk(s))).then(()=>this._initialLoadComplete$.next(!0))})}onRemoved(){super.onRemoved(),this.loaderCursorEntity$.next(null)}loadChunk(t){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){const e=yield this.world.loader.loadGgGlb(t.path,Object.assign({position:t.position,rotation:t.rotation||Gr.O},t.loadOptions)),n=[...e.entities,...(e.props||[]).map(r=>r.entities).reduce((r,s)=>(r.push(...s),r),[])];return this.loaded.set(t,n),this.addChildren(...n),this._chunkLoaded$.next([e,{position:t.position,rotation:t.rotation||Gr.O}]),[n,e]})}disposeChunk(t){this.loaded.has(t)&&(this.removeChildren(this.loaded.get(t),!0),this.loaded.delete(t))}}class Hre extends Tre{get position(){return this.renderer.camera.position}set position(t){this.renderer.camera.position=t}get rotation(){return this.renderer.camera.rotation}set rotation(t){this.renderer.camera.rotation=t}get camera(){return this.renderer.camera}}var Zz=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Qz={keymap:"wasd",movementOptions:{speed:.5},mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class $re extends Qy{constructor(t,e,n={}){super(),this.keyboard=t,this.camera=e,this.tickOrder=Kl.INPUT_CONTROLLERS,this.options=Object.assign(Object.assign({},Qz),n),n.mouseOptions&&(this.options.movementOptions=Object.assign(Object.assign({},Qz.movementOptions),n.mouseOptions)),this.mouseInput=new jm(n.mouseOptions),this.directionsInput=new Rre(t,this.options.keymap)}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return Zz(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t);let n={direction:{},rest:[]};const r=["KeyE","KeyQ"];this.camera.camera.supportsFov&&r.push("KeyZ","KeyC"),r.push("ShiftLeft"),this.directionsInput.output$.pipe(Ze(this._onRemoved$)).subscribe(a=>{n.direction=a}),jd(r.map(a=>this.keyboard.bind(a))).pipe(Ze(this._onRemoved$)).subscribe(a=>{n.rest=a});let s=Ar.O,o=jm.isTouchDevice();this.mouseInput.delta$.pipe(Ze(this._onRemoved$),Dn(()=>o||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)).subscribe(a=>{s=Ar.add(s,a)}),this.camera.tick$.pipe(Ze(this._onRemoved$)).subscribe(()=>{let a=n;this.options.ignoreKeyboardUnlessPointerLocked&&!this.mouseInput.isPointerLocked&&(a={direction:{},rest:[!1,!1,!1,!1,!1]});let l=Object.assign({},pt.O);const[c,u,h,p,m]=a.rest;void 0!==a.direction.upDown&&(l.z=a.direction.upDown?-1:1),void 0!==a.direction.leftRight&&(l.x=a.direction.leftRight?-1:1),c!=u&&(l.y=u?-1:1),h!=p&&(this.camera.camera.fov+=h?1:-1);let g=this.options.movementOptions.speed;if(m&&(g*=2.5),this.camera.position=pt.add(this.camera.position,pt.rot(pt.scalarMult(pt.norm(l),g),this.camera.rotation)),0!=s.x||0!=s.y){const b=pt.toSpherical(pt.rot({x:0,y:0,z:-1},this.camera.rotation));b.theta-=s.x/300,b.phi+=s.y/300,b.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,b.phi)),this.camera.rotation=Gr.lookAt(this.camera.position,pt.add(this.camera.position,pt.fromSpherical(b))),s=Ar.O}}),yield this.mouseInput.start(),yield this.directionsInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return Zz(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var Jz=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};const Wre={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class jre extends Qy{constructor(t,e={}){super(),this.camera=t,this.tickOrder=Kl.INPUT_CONTROLLERS,this.spherical={phi:0,radius:10,theta:0},this.target=pt.O,this.options=Object.assign(Object.assign({},Wre),e),this.mouseInput=new jm(this.options.mouseOptions)}get radius(){return this.spherical.radius}set radius(t){this.spherical.radius=t}get phi(){return this.spherical.phi}set phi(t){this.spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,t))}get theta(){return this.spherical.theta}set theta(t){this.spherical.theta=t}onSpawned(t){const e=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return Jz(this,void 0,void 0,function*(){yield e.onSpawned.call(this,t),this.spherical=pt.toSpherical(pt.sub(this.camera.position,this.target)),this.options.orbiting&&this.mouseInput.delta$.pipe(Ze(this._onRemoved$),Dn(()=>this.mouseInput.state==ws.DRAG)).subscribe(r=>{this.spherical.theta-=r.x*this.options.orbiting.sensitivityX*Math.PI/900,this.spherical.phi-=r.y*this.options.orbiting.sensitivityY*Math.PI/900,this.spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.spherical.phi))}),this.options.zooming&&this.mouseInput.wheel$.pipe(Ze(this._onRemoved$)).subscribe(r=>{0!=r&&(this.spherical.radius*=Math.pow(.95,this.options.zooming.sensitivity*(r>0?-1:1)))});const n=r=>{const s=pt.fromSpherical(this.spherical),o=pt.rotAround(s,{x:-Math.sin(this.spherical.theta),y:Math.cos(this.spherical.theta),z:0},Math.PI/2),a=pt.rotAround(s,pt.norm(o),Math.PI/2);this.target=pt.add(this.target,pt.add(pt.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),pt.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(Ze(this._onRemoved$),Dn(()=>this.mouseInput.state==ws.DRAG_RIGHT_BUTTON)).subscribe(r=>{n(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(Ze(this._onRemoved$),Dn(()=>this.mouseInput.state==ws.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this.spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),jm.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(Ze(this._onRemoved$)).subscribe(r=>{this.options.dollying&&(this.spherical.radius*=Math.pow(.95,this.options.dollying.sensitivity*r.distanceDelta/10)),this.options.panning&&n(r.centerPointDelta)}),this.camera.tick$.pipe(Ze(this._onRemoved$),Qe(()=>this.spherical)).subscribe(r=>{this.camera.position=pt.add(this.target,pt.fromSpherical(r)),this.camera.rotation=Gr.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const t=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return Jz(this,void 0,void 0,function*(){yield t.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class qre{randomColor(){return Math.floor(256*Math.random())<<16|Math.floor(256*Math.random())<<8|Math.floor(256*Math.random())}createPlane(t={}){return this.createPrimitive({shape:"PLANE"},t)}createBox(t,e={}){return this.createPrimitive({shape:"BOX",dimensions:t},e)}createCapsule(t,e,n={}){return this.createPrimitive({shape:"CAPSULE",radius:t,centersDistance:e},n)}createCylinder(t,e,n={}){return this.createPrimitive({shape:"CYLINDER",radius:t,height:e},n)}createCone(t,e,n={}){return this.createPrimitive({shape:"CONE",radius:t,height:e},n)}createSphere(t,e={}){return this.createPrimitive({shape:"SPHERE",radius:t},e)}}var UR=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})},cu=(()=>{return(i=cu||(cu={}))[i.Nothing=0]="Nothing",i[i.Files=1]="Files",i[i.Entities=2]="Entities",cu;var i})();const eH={cachingStrategy:cu.Nothing,position:pt.O,rotation:Gr.O,loadProps:!0},tH=i=>({meta:i.meta,resources:i.resources.map(({object3D:t,body:e})=>({object3D:t&&t.clone(),body:e&&e.clone()}))});class Xre{constructor(t){this.world=t,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(t,e=!1){return UR(this,void 0,void 0,function*(){if(e&&this.filesCache.has(t))return this.filesCache.get(t);const n=Promise.all([fetch(`${t}.glb`).then(s=>s.arrayBuffer()),fetch(`${t}.meta`).then(s=>s.text()).then(s=>JSON.parse(s))]);e&&this.filesCache.set(t,n);const r=yield n;return e&&this.filesCache.set(t,r),r})}loadGgGlbResources(t,e=cu.Nothing){return UR(this,void 0,void 0,function*(){if(e==cu.Entities&&this.loadResultCache.has(t)){const l=this.loadResultCache.get(t),c=l instanceof Promise?yield l:l;return tH(c)}const[n,r]=yield this.loadGgGlbFiles(t,e==cu.Files);if(!n)throw new Error("GLB not found");const[s,o]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(n,r),this.world.physicsWorld.loader.loadFromGgGlb(n,r)]),a={resources:[],meta:r};if(!s)return a;if(0==o.length)a.resources.push({object3D:s,body:null});else if(1==o.length)a.resources.push({object3D:s,body:o[0]});else{for(const l of o)a.resources.push({object3D:s.popChild(l.name),body:l});s.isEmpty()||a.resources.push({object3D:s,body:null})}return e==cu.Entities&&this.loadResultCache.set(t,tH(a)),a})}loadGgGlb(t,e=eH){return UR(this,void 0,void 0,function*(){const n=Object.assign(Object.assign({},eH),e),{resources:r,meta:s}=yield this.loadGgGlbResources(t,n.cachingStrategy),o={entities:r.map(({object3D:a,body:l})=>new lu(a,l)),meta:s};return n.loadProps&&(o.props=yield Promise.all(s.dummies.filter(a=>a.is_prop||a.is_scene).map(a=>this.loadGgGlb(a.is_prop?(n.propsPath||t.substring(0,t.lastIndexOf("/")+1))+a.prop_id:a.scene_id,{loadProps:!!a.is_scene,position:pt.add(pt.rot(a.position,n.rotation),n.position),rotation:Gr.combineRotations(a.rotation,n.rotation)})))),o.entities.forEach(a=>{a.position=pt.add(pt.rot(pt.clone(a.position),n.rotation),n.position),a.rotation=Gr.mult(Gr.clone(a.rotation),n.rotation)}),o})}}class nH extends xC{constructor(t,e){super(t,e),this.visualScene=t,this.physicsWorld=e,this.loader=new Xre(this),window.ggstatic&&window.ggstatic.registerConsoleCommand(this,"ph_gravity",(...n)=>function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){return 1==n.length&&(n=["0","0",""+-+n[0]]),n.length>0&&(this.physicsWorld.gravity={x:+n[0],y:+n[1],z:+n[2]}),JSON.stringify(this.physicsWorld.gravity)}),'args: [float] or [float float float]; change 3D world gravity vector. 1 argument means {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}addPrimitiveRigidBody(t,e=pt.O,n=Gr.O,r={}){const s=new lu(this.visualScene.factory.createPrimitive(t.shape,r),this.physicsWorld.factory.createRigidBody(t));return s.position=e,s.rotation=n,this.addEntity(s),s}addRenderer(t,e,n){const r=new Hre(this.visualScene.createRenderer(t,e,n));return this.addEntity(r),r}}class Qre{constructor(){this.output="\n \u2584\u2588\u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588 \u2588 \u2588\u2591\u2593\u2588\u2588\u2588\u2588\u2588 \u2584\u2584\u2584\u2584 \n \u2588\u2588\u2592 \u2580\u2588\u2592 \u2588\u2588\u2592 \u2580\u2588\u2592 \u2593\u2588\u2591 \u2588 \u2591\u2588\u2591\u2593\u2588 \u2580 \u2593\u2588\u2588\u2588\u2588\u2588\u2584 \n \u2592\u2588\u2588\u2591\u2584\u2584\u2584\u2591\u2592\u2588\u2588\u2591\u2584\u2584\u2584\u2591 \u2592\u2588\u2591 \u2588 \u2591\u2588 \u2592\u2588\u2588\u2588 \u2592\u2588\u2588\u2592 \u2584\u2588\u2588\n \u2591\u2593\u2588 \u2588\u2588\u2593\u2591\u2593\u2588 \u2588\u2588\u2593 \u2591\u2588\u2591 \u2588 \u2591\u2588 \u2592\u2593\u2588 \u2584 \u2592\u2588\u2588\u2591\u2588\u2580 \n \u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592\u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592 \u2591\u2591\u2588\u2588\u2592\u2588\u2588\u2593 \u2591\u2592\u2588\u2588\u2588\u2588\u2592\u2591\u2593\u2588 \u2580\u2588\u2593\n \u2591\u2592 \u2592 \u2591\u2592 \u2592 \u2591 \u2593\u2591\u2592 \u2592 \u2591\u2591 \u2592\u2591 \u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592\n \u2591 \u2591 \u2591 \u2591 \u2592 \u2591 \u2591 \u2591 \u2591 \u2591\u2592\u2591\u2592 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \n \u2591 \n >>> https://github.com/AndyGura/gg-web-engine <<<\nWelcome to GG web engine UI console. \nEnter command in input below.\n\nList of available commands: ".replace(/ /g," ")+'ls_commands',this.commandHistory=[],this.currentCommandIndex=0,this.elements=null}get isUIShown(){return!!this.elements}createUI(){if(this.elements)return;const t=document.createElement("div");t.innerHTML="\n
\n CONSOLE\n X\n
\n
\n ",t.style.position="absolute",t.style.zIndex="1000",t.style.backgroundColor="#343434",t.style.width="640px",t.style.height="480px",t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="stretch",t.style.padding="0.1rem",t.style.rowGap="3px",t.style.fontSize="14px",t.style.fontFamily="monospace",t.style.fontWeight="bold",t.style.color="white",t.style.textAlign="left",document.body.append(t),this.elements={main:t,input:document.getElementById("gg-console-input"),output:document.getElementById("gg-console-output")},document.getElementById("gg-console-close-icon").onmousedown=()=>this.destroyUI(),this.elements.input.onkeydown=e=>{13===e?.keyCode?(e.preventDefault(),this.onInput().then()):38===e?.keyCode?(e.preventDefault(),this.onUsePreviousCommand()):40===e?.keyCode&&(e.preventDefault(),this.onUseNextCommand())},this.elements.input.oninput=e=>{var n;let r=(null===(n=this.elements)||void 0===n?void 0:n.input.value)||"";if(r.length>0&&null===e.data&&(r=r.substring(0,r.length-1)),""===r.trim())return;let s=window.ggstatic.availableCommands.find(o=>o[0].startsWith(r));s&&(this.elements.input.value=s[0],this.elements.input.setSelectionRange(r.length,this.elements.input.value.length))},this.stdout(),this.setupDragging(),setTimeout(()=>this.elements.input.focus(),20)}destroyUI(){this.elements&&(document.body.removeChild(this.elements.main),this.elements=null)}onUsePreviousCommand(){0!==this.commandHistory.length&&(this.currentCommandIndex--,this.currentCommandIndex<0&&(this.currentCommandIndex+=this.commandHistory.length),this.elements.input.value=this.commandHistory[this.currentCommandIndex%this.commandHistory.length])}onUseNextCommand(){0!==this.commandHistory.length&&(this.currentCommandIndex++,this.elements.input.value=this.commandHistory[this.currentCommandIndex%this.commandHistory.length])}onInput(){return i=this,t=void 0,n=function*(){const t=this.elements.input.value;this.elements.input.value="",this.stdout("\n> "+t),this.stdout("\n"+(yield window.ggstatic.console(t))),this.commandHistory.push(t),this.currentCommandIndex=this.commandHistory.length},new((e=void 0)||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())});var i,t,e,n}stdout(t=""){this.output+=t,this.elements.output.innerHTML=this.output.replace(/\n/g,"
"),this.elements.output.scrollTop=this.elements.output.scrollHeight}setupDragging(){let t=0,e=0;const r=o=>{if(!this.elements)return void s();o.preventDefault();const a=t-o.clientX,l=e-o.clientY;t=o.clientX,e=o.clientY,this.elements.main.style.left=this.elements.main.offsetLeft-a+"px",this.elements.main.style.top=this.elements.main.offsetTop-l+"px"},s=()=>{document.onmouseup=null,document.onmousemove=null};document.getElementById("gg-console-header").onmousedown=o=>{(o=o||window.event).preventDefault(),t=o.clientX,e=o.clientY,document.onmouseup=s,document.onmousemove=r}}}var Jre=Kr(738),ese=Kr.n(Jre);class tse{constructor(){this.ui={stats:null,debugControlsContainer:null},this.statsRemoved$=new Fe,this.currentWorld=null,this.debugControlsRemoved$=new Fe}get showStats(){return!!this.ui.stats}setShowStats(t,e){if(e===this.showStats){if(!e||this.currentWorld===t)return;this.setShowStats(this.currentWorld,!1)}if(this.currentWorld=t,e){const n=new(ese());this.ui.stats=n,n.dom.style.left="unset",n.dom.style.right="0",n.showPanel(0),document.body.appendChild(n.dom),yC(t,-1).pipe(Ze(this.statsRemoved$)).subscribe(()=>{n?.begin()}),yC(t,1e4).pipe(Ze(this.statsRemoved$)).subscribe(()=>{n?.end()})}else this.statsRemoved$.next(),document.body.removeChild(this.ui.stats.dom),this.ui.stats.end(),this.ui.stats=null}get showDebugControls(){return!!this.ui.debugControlsContainer}setShowDebugControls(t,e){if(e===this.showDebugControls){if(!e||this.currentWorld===t)return;this.setShowDebugControls(this.currentWorld,!1)}if(this.currentWorld=t,e){const n=document.createElement("div");this.ui.debugControlsContainer=n;const r="style='display:flex;align-items:center;margin:0.25rem;'";n.style.cssText="position:fixed;top:48px;right:0;opacity:0.9;z-index:9999;background-color:#333;color:white;display:flex;flex-direction:column",n.innerHTML=`\n
\n \n \n
`,document.body.appendChild(n),wa(document.getElementById("physics_debugger_checkbox_id"),"change").pipe(Ze(this.debugControlsRemoved$)).subscribe(s=>{try{this.currentWorld.physicsDebugViewActive=s.target.checked}catch(o){console.error(o)}s.target.checked=this.currentWorld.physicsDebugViewActive})}else this.debugControlsRemoved$.next(),document.body.removeChild(this.ui.debugControlsContainer),this.ui.debugControlsContainer=null}}var tb=function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})};class Ym{constructor(){this.debuggerUI=new tse,this.consoleUI=new Qre,this._devConsoleEnabled=!1,this.consoleKeyPressEventListener=t=>{"Backquote"===t.code&&(t.preventDefault(),this.consoleUI.isUIShown?this.consoleUI.destroyUI():this.consoleUI.createUI())},this._selectedWorld=null,this.consoleCommands=new Map,this.registerConsoleCommand(null,"ls_commands",()=>tb(this,void 0,void 0,function*(){return this.availableCommands.map(([t,e])=>`${t}${e.doc?'\t// '+e.doc+"":""}`).sort().join("\n\n")}),"no args; print all available commands"),this.registerConsoleCommand(null,"ls_worlds",()=>tb(this,void 0,void 0,function*(){return xC.documentWorlds.map(t=>t===this.selectedWorld?`* ${t.name}`:` ${t.name}`).join("\n")}),"no args; print all available worlds"),this.registerConsoleCommand(null,"select_world",(...t)=>tb(this,void 0,void 0,function*(){var e;for(const n of xC.documentWorlds)if(n.name===t[0]){this._selectedWorld=n;break}return(null===(e=this.selectedWorld)||void 0===e?void 0:e.name)||"null"}),"args: [string]; select world by name")}static get instance(){return Ym._instance||(Ym._instance=new Ym),Ym._instance}get devConsoleEnabled(){return this._devConsoleEnabled}set devConsoleEnabled(t){this._devConsoleEnabled!==t&&(this._devConsoleEnabled=t,t?addEventListener("keypress",this.consoleKeyPressEventListener):(removeEventListener("keypress",this.consoleKeyPressEventListener),this.consoleUI.isUIShown&&this.consoleUI.destroyUI()))}get showStats(){return this.debuggerUI.showStats}set showStats(t){this.debuggerUI.setShowStats(this.selectedWorld,t)}get showDebugControls(){return this.debuggerUI.showDebugControls}set showDebugControls(t){this.debuggerUI.setShowDebugControls(this.selectedWorld,t)}get selectedWorld(){return this._selectedWorld||xC.documentWorlds[0]||null}get availableCommands(){let t=this.consoleCommands.get(null)||{};return this.selectedWorld&&(t=Object.assign(Object.assign({},this.consoleCommands.get(this.selectedWorld)||{}),t)),Object.entries(t)}registerConsoleCommand(t,e,n,r){let s={};this.consoleCommands.has(t)?s=this.consoleCommands.get(t):this.consoleCommands.set(t,s),s[e]={handler:n,doc:r}}deregisterWorldCommands(t){this.consoleCommands.delete(t)}console(t){return tb(this,void 0,void 0,function*(){const e=t.split("\n");let n=[];for(const r of e){const s=r.split(" ");n.push(yield this.runConsoleCommand(s.splice(0,1)[0],s))}return n.join("\n")})}runConsoleCommand(t,e){return tb(this,void 0,void 0,function*(){let n=(this.consoleCommands.get(null)||{})[t];if(!n&&(n=(this.consoleCommands.get(this.selectedWorld)||{})[t],!n))return`Unrecognized command: ${t}`;try{return yield n.handler(...e)}catch(r){return`${r}`}})}}window.ggstatic=Ym.instance;const nse=0,iH=1,ise=2,rH=1,sH=2,Kc=3,Zl=0,bo=1,Go=2,du=0,qm=1,oH=2,aH=3,lH=4,rse=5,qh=100,sse=101,ose=102,ase=103,lse=104,cse=200,dse=201,use=202,hse=203,zR=204,HR=205,fse=206,pse=207,mse=208,gse=209,_se=210,vse=211,yse=212,bse=213,xse=214,wse=0,Mse=1,Cse=2,wC=3,Sse=4,Ese=5,Ase=6,Dse=7,MC=0,Tse=1,Ise=2,uu=0,Rse=1,kse=2,Pse=3,Ose=4,Fse=5,Lse=6,Nse=7,cH="attached",Zc=301,Xh=302,CC=303,SC=304,nb=306,Ql=1e3,$r=1001,ib=1002,fr=1003,$R=1004,Xm=1005,er=1006,rb=1007,ol=1008,hu=1009,Use=1010,Vse=1011,dH=1012,uH=1013,Km=1014,al=1015,EC=1016,hH=1017,fH=1018,sb=1020,zse=35902,Hse=1021,Gse=1022,Sa=1023,$se=1024,Wse=1025,Zm=1026,ob=1027,pH=1028,mH=1029,jse=1030,gH=1031,_H=1033,WR=33776,jR=33777,YR=33778,qR=33779,vH=35840,yH=35841,bH=35842,xH=35843,wH=36196,MH=37492,CH=37496,SH=37808,EH=37809,AH=37810,DH=37811,TH=37812,IH=37813,RH=37814,kH=37815,PH=37816,OH=37817,FH=37818,LH=37819,NH=37820,BH=37821,XR=36492,UH=36494,VH=36495,Yse=36283,zH=36284,HH=36285,GH=36286,ab=2300,Qm=2301,Zse=0,WH=1,QR=2,Jse=3201,Kh=0,eoe=1,fu="",Wr="srgb",ls="srgb-linear",JR="display-p3",DC="display-p3-linear",TC="linear",wi="srgb",IC="rec709",RC="p3",tg=7680,toe=512,noe=513,ioe=514,YH=515,roe=516,soe=517,ooe=518,aoe=519,qH="300 es",Qc=2e3;class ng{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const r=this._listeners[t];if(void 0!==r){const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const n=this._listeners[t.type];if(void 0!==n){t.target=this;const r=n.slice(0);for(let s=0,o=r.length;s>8&255]+Ms[i>>16&255]+Ms[i>>24&255]+"-"+Ms[255&t]+Ms[t>>8&255]+"-"+Ms[t>>16&15|64]+Ms[t>>24&255]+"-"+Ms[63&e|128]+Ms[e>>8&255]+"-"+Ms[e>>16&255]+Ms[e>>24&255]+Ms[255&n]+Ms[n>>8&255]+Ms[n>>16&255]+Ms[n>>24&255]).toLowerCase()}function ji(i,t,e){return Math.max(t,Math.min(e,i))}function ek(i,t){return(i%t+t)%t}function lb(i,t,e){return(1-e)*i+e*t}function eo(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function un(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return Math.round(4294967295*i);case Uint16Array:return Math.round(65535*i);case Uint8Array:return Math.round(255*i);case Int32Array:return Math.round(2147483647*i);case Int16Array:return Math.round(32767*i);case Int8Array:return Math.round(127*i);default:throw new Error("Invalid component type.")}}const Coe_radToDeg=function yoe(i){return i*ig};class we{constructor(t=0,e=0){we.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(ji(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),r=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*r+t.x,this.y=s*r+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class _n{constructor(t,e,n,r,s,o,a,l,c){_n.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,n,r,s,o,a,l,c)}set(t,e,n,r,s,o,a,l,c){const u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=s,u[5]=l,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,r=e.elements,s=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],u=n[4],h=n[7],p=n[2],m=n[5],g=n[8],b=r[0],v=r[3],y=r[6],M=r[1],x=r[4],C=r[7],O=r[2],T=r[5],P=r[8];return s[0]=o*b+a*M+l*O,s[3]=o*v+a*x+l*T,s[6]=o*y+a*C+l*P,s[1]=c*b+u*M+h*O,s[4]=c*v+u*x+h*T,s[7]=c*y+u*C+h*P,s[2]=p*b+m*M+g*O,s[5]=p*v+m*x+g*T,s[8]=p*y+m*C+g*P,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*s*u+n*a*l+r*s*c-r*o*l}invert(){const t=this.elements,e=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*o-a*c,p=a*l-u*s,m=c*s-o*l,g=e*h+n*p+r*m;if(0===g)return this.set(0,0,0,0,0,0,0,0,0);const b=1/g;return t[0]=h*b,t[1]=(r*c-u*n)*b,t[2]=(a*n-r*o)*b,t[3]=p*b,t[4]=(u*e-r*l)*b,t[5]=(r*s-a*e)*b,t[6]=m*b,t[7]=(n*l-c*e)*b,t[8]=(o*e-n*s)*b,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*o+c*a)+o+t,-r*c,r*l,-r*(-c*o+l*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(tk.makeScale(t,e)),this}rotate(t){return this.premultiply(tk.makeRotation(-t)),this}translate(t,e){return this.premultiply(tk.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const tk=new _n;function KH(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function cb(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Eoe(){const i=cb("canvas");return i.style.display="block",i}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const ZH={};function QH(i){i in ZH||(ZH[i]=!0,console.warn(i))}const JH=(new _n).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),e4=(new _n).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),OC={[ls]:{transfer:TC,primaries:IC,toReference:i=>i,fromReference:i=>i},[Wr]:{transfer:wi,primaries:IC,toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[DC]:{transfer:TC,primaries:RC,toReference:i=>i.applyMatrix3(e4),fromReference:i=>i.applyMatrix3(JH)},[JR]:{transfer:wi,primaries:RC,toReference:i=>i.convertSRGBToLinear().applyMatrix3(e4),fromReference:i=>i.applyMatrix3(JH).convertLinearToSRGB()}},Aoe=new Set([ls,DC]),ti={enabled:!0,_workingColorSpace:ls,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!Aoe.has(i))throw new Error(`Unsupported working color space, "${i}".`);this._workingColorSpace=i},convert:function(i,t,e){return!1!==this.enabled&&t!==e&&t&&e?(0,OC[e].fromReference)((0,OC[t].toReference)(i)):i},fromWorkingColorSpace:function(i,t){return this.convert(i,this._workingColorSpace,t)},toWorkingColorSpace:function(i,t){return this.convert(i,t,this._workingColorSpace)},getPrimaries:function(i){return OC[i].primaries},getTransfer:function(i){return i===fu?TC:OC[i].transfer}};function sg(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function nk(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}let og;class Doe{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===og&&(og=cb("canvas")),og.width=t.width,og.height=t.height;const n=og.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=og}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=cb("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const r=n.getImageData(0,0,t.width,t.height),s=r.data;for(let o=0;o{class i extends ng{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=$r,s=$r,o=er,a=ol,l=Sa,c=hu,u=i.DEFAULT_ANISOTROPY,h=fu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Ioe++}),this.uuid=$o(),this.name="",this.source=new ag(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=u,this.format=l,this.internalFormat=null,this.type=c,this.offset=new we(0,0),this.repeat=new we(1,1),this.center=new we(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new _n,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const n=void 0===e||"string"==typeof e;if(!n&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ql:e.x=e.x-Math.floor(e.x);break;case $r:e.x=e.x<0?0:1;break;case ib:e.x=1===Math.abs(Math.floor(e.x)%2)?Math.ceil(e.x)-e.x:e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Ql:e.y=e.y-Math.floor(e.y);break;case $r:e.y=e.y<0?0:1;break;case ib:e.y=1===Math.abs(Math.floor(e.y)%2)?Math.ceil(e.y)-e.y:e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=300,i.DEFAULT_ANISOTROPY=1,i})();class oi{constructor(t=0,e=0,n=0,r=1){oi.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,r,s;const l=t.elements,c=l[0],u=l[4],h=l[8],p=l[1],m=l[5],g=l[9],b=l[2],v=l[6],y=l[10];if(Math.abs(u-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-v)<.01){if(Math.abs(u+p)<.1&&Math.abs(h+b)<.1&&Math.abs(g+v)<.1&&Math.abs(c+m+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const x=(c+1)/2,C=(m+1)/2,O=(y+1)/2,T=(u+p)/4,P=(h+b)/4,B=(g+v)/4;return x>C&&x>O?x<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(x),r=T/n,s=P/n):C>O?C<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(C),n=T/r,s=B/r):O<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(O),n=P/s,r=B/s),this.set(n,r,s,e),this}let M=Math.sqrt((v-g)*(v-g)+(h-b)*(h-b)+(p-u)*(p-u));return Math.abs(M)<.001&&(M=1),this.x=(v-g)/M,this.y=(h-b)/M,this.z=(p-u)/M,this.w=Math.acos((c+m+y-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Roe extends ng{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new oi(0,0,t,e),this.scissorTest=!1,this.viewport=new oi(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:er,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},n);const s=new Ea(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);s.flipY=!1,s.generateMipmaps=n.generateMipmaps,s.internalFormat=n.internalFormat,this.textures=[];const o=n.count;for(let a=0;a=0?1:-1,x=1-y*y;if(x>Number.EPSILON){const O=Math.sqrt(x),T=Math.atan2(O,y*M);v=Math.sin(v*T)/O,a=Math.sin(a*T)/O}const C=a*M;if(l=l*v+p*C,c=c*v+m*C,u=u*v+g*C,h=h*v+b*C,v===1-a){const O=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=O,c*=O,u*=O,h*=O}}t[e]=l,t[e+1]=c,t[e+2]=u,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],u=n[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return t[e]=a*g+u*h+l*m-c*p,t[e+1]=l*g+u*p+c*h-a*m,t[e+2]=c*g+u*m+a*p-l*h,t[e+3]=u*g-a*h-l*p-c*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,r=t._y,s=t._z,o=t._order,a=Math.cos,l=Math.sin,c=a(n/2),u=a(r/2),h=a(s/2),p=l(n/2),m=l(r/2),g=l(s/2);switch(o){case"XYZ":this._x=p*u*h+c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h-p*m*g;break;case"YXZ":this._x=p*u*h+c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h+p*m*g;break;case"ZXY":this._x=p*u*h-c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h-p*m*g;break;case"ZYX":this._x=p*u*h-c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h+p*m*g;break;case"YZX":this._x=p*u*h+c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h-p*m*g;break;case"XZY":this._x=p*u*h-c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h+p*m*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],r=e[4],s=e[8],o=e[1],a=e[5],l=e[9],c=e[2],u=e[6],h=e[10],p=n+a+h;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(n>a&&n>h){const m=2*Math.sqrt(1+n-a-h);this._w=(u-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>h){const m=2*Math.sqrt(1+a-n-h);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(ji(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const r=Math.min(1,e/n);return this.slerp(t,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,r=t._y,s=t._z,o=t._w,a=e._x,l=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-n*c,this._z=s*u+o*c+n*l-r*a,this._w=o*u-n*a-r*l-s*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,r=this._y,s=this._z,o=this._w;let a=o*t._w+n*t._x+r*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-e;return this._w=m*o+e*this._w,this._x=m*n+e*this._x,this._y=m*r+e*this._y,this._z=m*s+e*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-e)*u)/c,p=Math.sin(e*u)/c;return this._w=o*h+this._w*p,this._x=n*h+this._x*p,this._y=r*h+this._y*p,this._z=s*h+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(r*Math.sin(t),r*Math.cos(t),s*Math.sin(e),s*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class L{constructor(t=0,e=0,n=0){L.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(n4.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(n4.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,r=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*r,this.y=s[1]*e+s[4]*n+s[7]*r,this.z=s[2]*e+s[5]*n+s[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*r+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*r+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*r+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*r+s[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,r=this.z,s=t.x,o=t.y,a=t.z,l=t.w,c=2*(o*r-a*n),u=2*(a*e-s*r),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*u,this.y=n+l*u+a*c-s*h,this.z=r+l*h+s*u-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,r=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*r,this.y=s[1]*e+s[5]*n+s[9]*r,this.z=s[2]*e+s[6]*n+s[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,r=t.y,s=t.z,o=e.x,a=e.y,l=e.z;return this.x=r*l-s*a,this.y=s*o-n*l,this.z=n*a-r*o,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return sk.copy(this).projectOnVector(t),this.sub(sk)}reflect(t){return this.sub(sk.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(ji(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const r=Math.sin(e)*t;return this.x=r*Math.sin(n),this.y=Math.cos(e)*t,this.z=r*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=2*Math.random()-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const sk=new L,n4=new to;class Cs{constructor(t=new L(1/0,1/0,1/0),e=new L(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,ll),ll.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(db),LC.subVectors(this.max,db),lg.subVectors(t.a,db),cg.subVectors(t.b,db),dg.subVectors(t.c,db),pu.subVectors(cg,lg),mu.subVectors(dg,cg),Jh.subVectors(lg,dg);let e=[0,-pu.z,pu.y,0,-mu.z,mu.y,0,-Jh.z,Jh.y,pu.z,0,-pu.x,mu.z,0,-mu.x,Jh.z,0,-Jh.x,-pu.y,pu.x,0,-mu.y,mu.x,0,-Jh.y,Jh.x,0];return!(!ok(e,lg,cg,dg,LC)||(e=[1,0,0,0,1,0,0,0,1],!ok(e,lg,cg,dg,LC)))&&(NC.crossVectors(pu,mu),e=[NC.x,NC.y,NC.z],ok(e,lg,cg,dg,LC))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ll).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(ll).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Jc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Jc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Jc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Jc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Jc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Jc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Jc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Jc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Jc)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Jc=[new L,new L,new L,new L,new L,new L,new L,new L],ll=new L,FC=new Cs,lg=new L,cg=new L,dg=new L,pu=new L,mu=new L,Jh=new L,db=new L,LC=new L,NC=new L,ef=new L;function ok(i,t,e,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){ef.fromArray(i,s);const a=r.x*Math.abs(ef.x)+r.y*Math.abs(ef.y)+r.z*Math.abs(ef.z),l=t.dot(ef),c=e.dot(ef),u=n.dot(ef);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const koe=new Cs,ub=new L,ak=new L;class Ss{constructor(t=new L,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):koe.setFromPoints(t).getCenter(n);let r=0;for(let s=0,o=t.length;sthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ub.subVectors(t,this.center);const e=ub.lengthSq();if(e>this.radius*this.radius){const n=Math.sqrt(e),r=.5*(n-this.radius);this.center.addScaledVector(ub,r/n),this.radius+=r}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(ak.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ub.copy(t.center).add(ak)),this.expandByPoint(ub.copy(t.center).sub(ak))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ed=new L,lk=new L,BC=new L,gu=new L,ck=new L,UC=new L,dk=new L;class hb{constructor(t=new L,e=new L(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,ed)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=ed.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(ed.copy(this.origin).addScaledVector(this.direction,e),ed.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){lk.copy(t).add(e).multiplyScalar(.5),BC.copy(e).sub(t).normalize(),gu.copy(this.origin).sub(lk);const s=.5*t.distanceTo(e),o=-this.direction.dot(BC),a=gu.dot(this.direction),l=-gu.dot(BC),c=gu.lengthSq(),u=Math.abs(1-o*o);let h,p,m,g;if(u>0)if(h=o*l-a,p=o*a-l,g=s*u,h>=0)if(p>=-g)if(p<=g){const b=1/u;h*=b,p*=b,m=h*(h+o*p+2*a)+p*(o*h+p+2*l)+c}else p=s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;else p=-s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;else p<=-g?(h=Math.max(0,-(-o*s+a)),p=h>0?-s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+c):p<=g?(h=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(h=Math.max(0,-(o*s+a)),p=h>0?s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+c);else p=o>0?-s:s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(lk).addScaledVector(BC,p),m}intersectSphere(t,e){ed.subVectors(t.center,this.origin);const n=ed.dot(this.direction),r=ed.dot(ed)-n*n,s=t.radius*t.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=n-o,l=n+o;return l<0?null:this.at(a<0?l:a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,p=this.origin;return c>=0?(n=(t.min.x-p.x)*c,r=(t.max.x-p.x)*c):(n=(t.max.x-p.x)*c,r=(t.min.x-p.x)*c),u>=0?(s=(t.min.y-p.y)*u,o=(t.max.y-p.y)*u):(s=(t.max.y-p.y)*u,o=(t.min.y-p.y)*u),n>o||s>r||((s>n||isNaN(n))&&(n=s),(o=0?(a=(t.min.z-p.z)*h,l=(t.max.z-p.z)*h):(a=(t.max.z-p.z)*h,l=(t.min.z-p.z)*h),n>l||a>r)||((a>n||n!=n)&&(n=a),(l=0?n:r,e)}intersectsBox(t){return null!==this.intersectBox(t,ed)}intersectTriangle(t,e,n,r,s){ck.subVectors(e,t),UC.subVectors(n,t),dk.crossVectors(ck,UC);let a,o=this.direction.dot(dk);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}gu.subVectors(this.origin,t);const l=a*this.direction.dot(UC.crossVectors(gu,UC));if(l<0)return null;const c=a*this.direction.dot(ck.cross(gu));if(c<0||l+c>o)return null;const u=-a*gu.dot(dk);return u<0?null:this.at(u/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class It{constructor(t,e,n,r,s,o,a,l,c,u,h,p,m,g,b,v){It.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,n,r,s,o,a,l,c,u,h,p,m,g,b,v)}set(t,e,n,r,s,o,a,l,c,u,h,p,m,g,b,v){const y=this.elements;return y[0]=t,y[4]=e,y[8]=n,y[12]=r,y[1]=s,y[5]=o,y[9]=a,y[13]=l,y[2]=c,y[6]=u,y[10]=h,y[14]=p,y[3]=m,y[7]=g,y[11]=b,y[15]=v,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new It).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,r=1/ug.setFromMatrixColumn(t,0).length(),s=1/ug.setFromMatrixColumn(t,1).length(),o=1/ug.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,r=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),h=Math.sin(s);if("XYZ"===t.order){const p=o*u,m=o*h,g=a*u,b=a*h;e[0]=l*u,e[4]=-l*h,e[8]=c,e[1]=m+g*c,e[5]=p-b*c,e[9]=-a*l,e[2]=b-p*c,e[6]=g+m*c,e[10]=o*l}else if("YXZ"===t.order){const p=l*u,m=l*h,g=c*u,b=c*h;e[0]=p+b*a,e[4]=g*a-m,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=m*a-g,e[6]=b+p*a,e[10]=o*l}else if("ZXY"===t.order){const p=l*u,m=l*h,g=c*u,b=c*h;e[0]=p-b*a,e[4]=-o*h,e[8]=g+m*a,e[1]=m+g*a,e[5]=o*u,e[9]=b-p*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if("ZYX"===t.order){const p=o*u,m=o*h,g=a*u,b=a*h;e[0]=l*u,e[4]=g*c-m,e[8]=p*c+b,e[1]=l*h,e[5]=b*c+p,e[9]=m*c-g,e[2]=-c,e[6]=a*l,e[10]=o*l}else if("YZX"===t.order){const p=o*l,m=o*c,g=a*l,b=a*c;e[0]=l*u,e[4]=b-p*h,e[8]=g*h+m,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=m*h+g,e[10]=p-b*h}else if("XZY"===t.order){const p=o*l,m=o*c,g=a*l,b=a*c;e[0]=l*u,e[4]=-h,e[8]=c*u,e[1]=p*h+b,e[5]=o*u,e[9]=m*h-g,e[2]=g*h-m,e[6]=a*u,e[10]=b*h+p}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Poe,t,Ooe)}lookAt(t,e,n){const r=this.elements;return Wo.subVectors(t,e),0===Wo.lengthSq()&&(Wo.z=1),Wo.normalize(),_u.crossVectors(n,Wo),0===_u.lengthSq()&&(1===Math.abs(n.z)?Wo.x+=1e-4:Wo.z+=1e-4,Wo.normalize(),_u.crossVectors(n,Wo)),_u.normalize(),VC.crossVectors(Wo,_u),r[0]=_u.x,r[4]=VC.x,r[8]=Wo.x,r[1]=_u.y,r[5]=VC.y,r[9]=Wo.y,r[2]=_u.z,r[6]=VC.z,r[10]=Wo.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,r=e.elements,s=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],u=n[1],h=n[5],p=n[9],m=n[13],g=n[2],b=n[6],v=n[10],y=n[14],M=n[3],x=n[7],C=n[11],O=n[15],T=r[0],P=r[4],B=r[8],I=r[12],E=r[1],X=r[5],re=r[9],W=r[13],ie=r[2],pe=r[6],Q=r[10],ue=r[14],K=r[3],ge=r[7],Ce=r[11],Ge=r[15];return s[0]=o*T+a*E+l*ie+c*K,s[4]=o*P+a*X+l*pe+c*ge,s[8]=o*B+a*re+l*Q+c*Ce,s[12]=o*I+a*W+l*ue+c*Ge,s[1]=u*T+h*E+p*ie+m*K,s[5]=u*P+h*X+p*pe+m*ge,s[9]=u*B+h*re+p*Q+m*Ce,s[13]=u*I+h*W+p*ue+m*Ge,s[2]=g*T+b*E+v*ie+y*K,s[6]=g*P+b*X+v*pe+y*ge,s[10]=g*B+b*re+v*Q+y*Ce,s[14]=g*I+b*W+v*ue+y*Ge,s[3]=M*T+x*E+C*ie+O*K,s[7]=M*P+x*X+C*pe+O*ge,s[11]=M*B+x*re+C*Q+O*Ce,s[15]=M*I+x*W+C*ue+O*Ge,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],r=t[8],s=t[12],o=t[1],a=t[5],l=t[9],c=t[13],u=t[2],h=t[6],p=t[10],m=t[14];return t[3]*(+s*l*h-r*c*h-s*a*p+n*c*p+r*a*m-n*l*m)+t[7]*(+e*l*m-e*c*p+s*o*p-r*o*m+r*c*u-s*l*u)+t[11]*(+e*c*h-e*a*m-s*o*h+n*o*m+s*a*u-n*c*u)+t[15]*(-r*a*u-e*l*h+e*a*p+r*o*h-n*o*p+n*l*u)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],p=t[10],m=t[11],g=t[12],b=t[13],v=t[14],y=t[15],M=h*v*c-b*p*c+b*l*m-a*v*m-h*l*y+a*p*y,x=g*p*c-u*v*c-g*l*m+o*v*m+u*l*y-o*p*y,C=u*b*c-g*h*c+g*a*m-o*b*m-u*a*y+o*h*y,O=g*h*l-u*b*l-g*a*p+o*b*p+u*a*v-o*h*v,T=e*M+n*x+r*C+s*O;if(0===T)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/T;return t[0]=M*P,t[1]=(b*p*s-h*v*s-b*r*m+n*v*m+h*r*y-n*p*y)*P,t[2]=(a*v*s-b*l*s+b*r*c-n*v*c-a*r*y+n*l*y)*P,t[3]=(h*l*s-a*p*s-h*r*c+n*p*c+a*r*m-n*l*m)*P,t[4]=x*P,t[5]=(u*v*s-g*p*s+g*r*m-e*v*m-u*r*y+e*p*y)*P,t[6]=(g*l*s-o*v*s-g*r*c+e*v*c+o*r*y-e*l*y)*P,t[7]=(o*p*s-u*l*s+u*r*c-e*p*c-o*r*m+e*l*m)*P,t[8]=C*P,t[9]=(g*h*s-u*b*s-g*n*m+e*b*m+u*n*y-e*h*y)*P,t[10]=(o*b*s-g*a*s+g*n*c-e*b*c-o*n*y+e*a*y)*P,t[11]=(u*a*s-o*h*s-u*n*c+e*h*c+o*n*m-e*a*m)*P,t[12]=O*P,t[13]=(u*b*r-g*h*r+g*n*p-e*b*p-u*n*v+e*h*v)*P,t[14]=(g*a*r-o*b*r-g*n*l+e*b*l+o*n*v-e*a*v)*P,t[15]=(o*h*r-u*a*r+u*n*l-e*h*l-o*n*p+e*a*p)*P,this}scale(t){const e=this.elements,n=t.x,r=t.y,s=t.z;return e[0]*=n,e[4]*=r,e[8]*=s,e[1]*=n,e[5]*=r,e[9]*=s,e[2]*=n,e[6]*=r,e[10]*=s,e[3]*=n,e[7]*=r,e[11]*=s,this}getMaxScaleOnAxis(){const t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),r=Math.sin(e),s=1-n,o=t.x,a=t.y,l=t.z,c=s*o,u=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+n,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,r,s,o){return this.set(1,n,s,0,t,1,o,0,e,r,1,0,0,0,0,1),this}compose(t,e,n){const r=this.elements,s=e._x,o=e._y,a=e._z,l=e._w,c=s+s,u=o+o,h=a+a,p=s*c,m=s*u,g=s*h,b=o*u,v=o*h,y=a*h,M=l*c,x=l*u,C=l*h,O=n.x,T=n.y,P=n.z;return r[0]=(1-(b+y))*O,r[1]=(m+C)*O,r[2]=(g-x)*O,r[3]=0,r[4]=(m-C)*T,r[5]=(1-(p+y))*T,r[6]=(v+M)*T,r[7]=0,r[8]=(g+x)*P,r[9]=(v-M)*P,r[10]=(1-(p+b))*P,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,n){const r=this.elements;let s=ug.set(r[0],r[1],r[2]).length();const o=ug.set(r[4],r[5],r[6]).length(),a=ug.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),t.x=r[12],t.y=r[13],t.z=r[14],cl.copy(this);const c=1/s,u=1/o,h=1/a;return cl.elements[0]*=c,cl.elements[1]*=c,cl.elements[2]*=c,cl.elements[4]*=u,cl.elements[5]*=u,cl.elements[6]*=u,cl.elements[8]*=h,cl.elements[9]*=h,cl.elements[10]*=h,e.setFromRotationMatrix(cl),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,r,s,o,a=Qc){const l=this.elements,c=2*s/(e-t),u=2*s/(n-r),h=(e+t)/(e-t),p=(n+r)/(n-r);let m,g;if(a===Qc)m=-(o+s)/(o-s),g=-2*o*s/(o-s);else{if(2001!==a)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);m=-o/(o-s),g=-o*s/(o-s)}return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=p,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,r,s,o,a=Qc){const l=this.elements,c=1/(e-t),u=1/(n-r),h=1/(o-s),p=(e+t)*c,m=(n+r)*u;let g,b;if(a===Qc)g=(o+s)*h,b=-2*h;else{if(2001!==a)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);g=s*h,b=-1*h}return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=b,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const ug=new L,cl=new It,Poe=new L(0,0,0),Ooe=new L(1,1,1),_u=new L,VC=new L,Wo=new L,i4=new It,r4=new to;let td=(()=>{class i{constructor(e=0,n=0,r=0,s=i.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,s=this._order){return this._x=e,this._y=n,this._z=r,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const s=e.elements,o=s[0],a=s[4],l=s[8],c=s[1],u=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(n){case"XYZ":this._y=Math.asin(ji(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,u),this._z=0);break;case"YXZ":this._x=Math.asin(-ji(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(ji(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-ji(p,-1,1)),Math.abs(p)<.9999999?(this._x=Math.atan2(m,g),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(ji(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-ji(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,u),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-h,g),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,!0===r&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return i4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(i4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return r4.setFromEuler(this),this.setFromQuaternion(r4,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})();class uk{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<{class i extends ng{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Foe++}),this.uuid=$o(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();const e=new L,n=new td,r=new to,s=new L(1,1,1);n._onChange(function o(){r.setFromEuler(n,!1)}),r._onChange(function a(){n.setFromQuaternion(r,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new It},normalMatrix:{value:new _n}}),this.matrix=new It,this.matrixWorld=new It,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new uk,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return hg.setFromAxisAngle(e,n),this.quaternion.multiply(hg),this}rotateOnWorldAxis(e,n){return hg.setFromAxisAngle(e,n),this.quaternion.premultiply(hg),this}rotateX(e){return this.rotateOnAxis(o4,e)}rotateY(e){return this.rotateOnAxis(a4,e)}rotateZ(e){return this.rotateOnAxis(l4,e)}translateOnAxis(e,n){return s4.copy(e).applyQuaternion(this.quaternion),this.position.add(s4.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(o4,e)}translateY(e){return this.translateOnAxis(a4,e)}translateZ(e){return this.translateOnAxis(l4,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(nd.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?zC.copy(e):zC.set(e,n,r);const s=this.parent;this.updateWorldMatrix(!0,!1),fb.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?nd.lookAt(fb,zC,this.up):nd.lookAt(zC,fb,this.up),this.quaternion.setFromRotationMatrix(nd),s&&(nd.extractRotation(s.matrixWorld),hg.setFromRotationMatrix(nd),this.quaternion.premultiply(hg.invert()))}add(e){if(arguments.length>1){for(let n=0;n1){for(let r=0;r0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),null!==this.boundingSphere&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),null!==this.boundingBox&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=o(e.geometries,this.geometry);const l=this.geometry.parameters;if(void 0!==l&&void 0!==l.shapes){const c=l.shapes;if(Array.isArray(c))for(let u=0,h=c.length;u0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),u.length>0&&(r.textures=u),h.length>0&&(r.images=h),p.length>0&&(r.shapes=p),m.length>0&&(r.skeletons=m),g.length>0&&(r.animations=g),b.length>0&&(r.nodes=b)}return r.object=s,r;function a(l){const c=[];for(const u in l){const h=l[u];delete h.metadata,c.push(h)}return c}}clone(e){return(new this.constructor).copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===n)for(let r=0;r0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(t,e,n,r,s){dl.subVectors(r,e),id.subVectors(n,e),fk.subVectors(t,e);const o=dl.dot(dl),a=dl.dot(id),l=dl.dot(fk),c=id.dot(id),u=id.dot(fk),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*u)*p,g=(o*u-a*l)*p;return s.set(1-m-g,g,m)}static containsPoint(t,e,n,r){return null!==this.getBarycoord(t,e,n,r,rd)&&rd.x>=0&&rd.y>=0&&rd.x+rd.y<=1}static getInterpolation(t,e,n,r,s,o,a,l){return null===this.getBarycoord(t,e,n,r,rd)?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,rd.x),l.addScaledVector(o,rd.y),l.addScaledVector(a,rd.z),l)}static isFrontFacing(t,e,n,r){return dl.subVectors(n,e),id.subVectors(t,e),dl.cross(id).dot(r)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,e,n,r){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,r),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return dl.subVectors(this.c,this.b),id.subVectors(this.a,this.b),.5*dl.cross(id).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Aa.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Aa.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,s){return Aa.getInterpolation(t,this.a,this.b,this.c,e,n,r,s)}containsPoint(t){return Aa.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Aa.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,r=this.b,s=this.c;let o,a;pg.subVectors(r,n),mg.subVectors(s,n),pk.subVectors(t,n);const l=pg.dot(pk),c=mg.dot(pk);if(l<=0&&c<=0)return e.copy(n);mk.subVectors(t,r);const u=pg.dot(mk),h=mg.dot(mk);if(u>=0&&h<=u)return e.copy(r);const p=l*h-u*c;if(p<=0&&l>=0&&u<=0)return o=l/(l-u),e.copy(n).addScaledVector(pg,o);gk.subVectors(t,s);const m=pg.dot(gk),g=mg.dot(gk);if(g>=0&&m<=g)return e.copy(s);const b=m*c-l*g;if(b<=0&&c>=0&&g<=0)return a=c/(c-g),e.copy(n).addScaledVector(mg,a);const v=u*g-m*h;if(v<=0&&h-u>=0&&m-g>=0)return d4.subVectors(s,r),a=(h-u)/(h-u+(m-g)),e.copy(r).addScaledVector(d4,a);const y=1/(v+b+p);return o=b*y,a=p*y,e.copy(n).addScaledVector(pg,o).addScaledVector(mg,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const u4={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},vu={h:0,s:0,l:0},HC={h:0,s:0,l:0};function _k(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?i+6*(t-i)*e:e<.5?t:e<2/3?i+6*(t-i)*(2/3-e):i}class He{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(void 0===e&&void 0===n){const r=t;r&&r.isColor?this.copy(r):"number"==typeof r?this.setHex(r):"string"==typeof r&&this.setStyle(r)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Wr){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ti.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=ti.workingColorSpace){return this.r=t,this.g=e,this.b=n,ti.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=ti.workingColorSpace){if(t=ek(t,1),e=ji(e,0,1),n=ji(n,0,1),0===e)this.r=this.g=this.b=n;else{const s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=_k(o,s,t+1/3),this.g=_k(o,s,t),this.b=_k(o,s,t-1/3)}return ti.toWorkingColorSpace(this,r),this}setStyle(t,e=Wr){function n(s){void 0!==s&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(t)){let s;const a=r[2];switch(r[1]){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,e);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,e);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){const s=r[1],o=s.length;if(3===o)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(6===o)return this.setHex(parseInt(s,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Wr){const n=u4[t.toLowerCase()];return void 0!==n?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=sg(t.r),this.g=sg(t.g),this.b=sg(t.b),this}copyLinearToSRGB(t){return this.r=nk(t.r),this.g=nk(t.g),this.b=nk(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Wr){return ti.fromWorkingColorSpace(Es.copy(this),t),65536*Math.round(ji(255*Es.r,0,255))+256*Math.round(ji(255*Es.g,0,255))+Math.round(ji(255*Es.b,0,255))}getHexString(t=Wr){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ti.workingColorSpace){ti.fromWorkingColorSpace(Es.copy(this),e);const n=Es.r,r=Es.g,s=Es.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]=n:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==qm&&(n.blending=this.blending),this.side!==Zl&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==zR&&(n.blendSrc=this.blendSrc),this.blendDst!==HR&&(n.blendDst=this.blendDst),this.blendEquation!==qh&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==wC&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==tg&&(n.stencilFail=this.stencilFail),this.stencilZFail!==tg&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==tg&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),e){const s=r(t.textures),o=r(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const r=e.length;n=new Array(r);for(let s=0;s!==r;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class cs extends xo{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new He(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new td,this.combine=MC,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const pr=new L,GC=new we;class li{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=n,this.usage=35044,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=al,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return QH("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let r=0,s=this.itemSize;r0&&(t.userData=this.userData),void 0!==this.parameters){const l=this.parameters;for(const c in l)void 0!==l[c]&&(t[c]=l[c]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const l in n)t.data.attributes[l]=n[l].toJSON(t.data);const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,p=c.length;h0&&(r[l]=u,s=!0)}s&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const r=t.attributes;for(const c in r)this.setAttribute(c,r[c].clone(e));const s=t.morphAttributes;for(const c in s){const u=[],h=s[c];for(let p=0,m=h.length;p0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(t.far-t.near)**2))&&(p4.copy(s).invert(),tf.copy(t.ray).applyMatrix4(p4),(null===n.boundingBox||!1!==tf.intersectsBox(n.boundingBox))&&this._computeIntersections(t,e,tf)))}_computeIntersections(t,e,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,p=s.groups,m=s.drawRange;if(null!==a)if(Array.isArray(o))for(let g=0,b=p.length;ge.far?null:{distance:c,point:KC.clone(),object:i}}(i,t,e,n,_g,vg,yg,XC);if(u){r&&(jC.fromBufferAttribute(r,a),YC.fromBufferAttribute(r,l),qC.fromBufferAttribute(r,c),u.uv=Aa.getInterpolation(XC,_g,vg,yg,jC,YC,qC,new we)),s&&(jC.fromBufferAttribute(s,a),YC.fromBufferAttribute(s,l),qC.fromBufferAttribute(s,c),u.uv1=Aa.getInterpolation(XC,_g,vg,yg,jC,YC,qC,new we)),o&&(g4.fromBufferAttribute(o,a),_4.fromBufferAttribute(o,l),v4.fromBufferAttribute(o,c),u.normal=Aa.getInterpolation(XC,_g,vg,yg,g4,_4,v4,new L),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new L,materialIndex:0};Aa.getNormal(_g,vg,yg,h.normal),u.face=h}return u}class nf extends hn{constructor(t=1,e=1,n=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],h=[];let p=0,m=0;function g(b,v,y,M,x,C,O,T,P,B,I){const E=C/P,X=O/B,re=C/2,W=O/2,ie=T/2,pe=P+1,Q=B+1;let ue=0,K=0;const ge=new L;for(let Ce=0;Ce0?1:-1,u.push(ge.x,ge.y,ge.z),h.push(_t/P),h.push(1-Ce/B),ue+=1}for(let Ce=0;Ce0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class bk extends jr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new It,this.projectionMatrix=new It,this.projectionMatrixInverse=new It,this.coordinateSystem=Qc}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const yu=new L,b4=new we,x4=new we;class mr extends bk{constructor(t=50,e=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*ig*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Zh*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*ig*Math.atan(Math.tan(.5*Zh*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,n){yu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(yu.x,yu.y).multiplyScalar(-t/yu.z),yu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(yu.x,yu.y).multiplyScalar(-t/yu.z)}getViewSize(t,e){return this.getViewBounds(t,b4,x4),e.subVectors(x4,b4)}setViewOffset(t,e,n,r,s,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Zh*this.fov)/this.zoom,n=2*e,r=this.aspect*n,s=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,e-=o.offsetY*n/c,r*=o.width/l,n*=o.height/c}const a=this.filmOffset;0!==a&&(s+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,e,e-n,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class Yoe extends jr{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new mr(-90,1,t,e);r.layers=this.layers,this.add(r);const s=new mr(-90,1,t,e);s.layers=this.layers,this.add(s);const o=new mr(-90,1,t,e);o.layers=this.layers,this.add(o);const a=new mr(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new mr(-90,1,t,e);l.layers=this.layers,this.add(l);const c=new mr(-90,1,t,e);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[n,r,s,o,a,l]=e;for(const c of e)this.remove(c);if(t===Qc)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else{if(2001!==t)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1)}for(const c of e)this.add(c),c.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,h=t.getRenderTarget(),p=t.getActiveCubeFace(),m=t.getActiveMipmapLevel(),g=t.xr.enabled;t.xr.enabled=!1;const b=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0,r),t.render(e,s),t.setRenderTarget(n,1,r),t.render(e,o),t.setRenderTarget(n,2,r),t.render(e,a),t.setRenderTarget(n,3,r),t.render(e,l),t.setRenderTarget(n,4,r),t.render(e,c),n.texture.generateMipmaps=b,t.setRenderTarget(n,5,r),t.render(e,u),t.setRenderTarget(h,p,m),t.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class QC extends Ea{constructor(t,e,n,r,s,o,a,l,c,u){super(t=void 0!==t?t:[],e=void 0!==e?e:Zc,n,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class qoe extends Qh{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1};this.texture=new QC([n,n,n,n,n,n],e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:er}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n_uniforms={tEquirect:{value:null}},n_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",n_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",r=new nf(5,5,5),s=new od({name:"CubemapFromEquirect",uniforms:bg(n_uniforms),vertexShader:n_vertexShader,fragmentShader:n_fragmentShader,side:bo,blending:du});s.uniforms.tEquirect.value=e;const o=new qn(r,s),a=e.minFilter;return e.minFilter===ol&&(e.minFilter=er),new Yoe(1,10,this).update(t,o),e.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,r){const s=t.getRenderTarget();for(let o=0;o<6;o++)t.setRenderTarget(this,o),t.clear(e,n,r);t.setRenderTarget(s)}}const xk=new L,Xoe=new L,Koe=new _n;class rf{constructor(t=new L(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const r=xk.subVectors(n,e).cross(Xoe.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const n=t.delta(xk),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const s=-(t.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:e.copy(t.start).addScaledVector(n,s)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||Koe.getNormalMatrix(t),r=this.coplanarPoint(xk).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const sf=new Ss,JC=new L;class eS{constructor(t=new rf,e=new rf,n=new rf,r=new rf,s=new rf,o=new rf){this.planes=[t,e,n,r,s,o]}set(t,e,n,r,s,o){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=Qc){const n=this.planes,r=t.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],h=r[6],p=r[7],m=r[8],g=r[9],b=r[10],v=r[11],y=r[12],M=r[13],x=r[14],C=r[15];if(n[0].setComponents(l-s,p-c,v-m,C-y).normalize(),n[1].setComponents(l+s,p+c,v+m,C+y).normalize(),n[2].setComponents(l+o,p+u,v+g,C+M).normalize(),n[3].setComponents(l-o,p-u,v-g,C-M).normalize(),n[4].setComponents(l-a,p-h,v-b,C-x).normalize(),e===Qc)n[5].setComponents(l+a,p+h,v+b,C+x).normalize();else{if(2001!==e)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);n[5].setComponents(a,h,b,x).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),sf.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),sf.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(sf)}intersectsSprite(t){return sf.center.set(0,0,0),sf.radius=.7071067811865476,sf.applyMatrix4(t.matrixWorld),this.intersectsSphere(sf)}intersectsSphere(t){const e=this.planes,n=t.center,r=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)0?t.max.x:t.min.x,JC.y=r.normal.y>0?t.max.y:t.min.y,JC.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(JC)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function w4(){let i=null,t=!1,e=null,n=null;function r(s,o){e(s,o),n=i.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==e&&(n=i.requestAnimationFrame(r),t=!0)},stop:function(){i.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){i=s}}}function Zoe(i){const t=new WeakMap;return{get:function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),t.get(a)},remove:function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=t.get(a);l&&(i.deleteBuffer(l.buffer),t.delete(a))},update:function o(a,l){if(a.isGLBufferAttribute){const u=t.get(a);return void((!u||u.version 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tfloat startCompression = 0.8 - 0.04;\n\tfloat desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min(color.r, min(color.g, color.b));\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max(color.r, max(color.g, color.b));\n\tif (peak < startCompression) return color;\n\tfloat d = 1. - startCompression;\n\tfloat newPeak = 1. - d * d / (peak + d - startCompression);\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);\n\treturn mix(color, newPeak * vec3(1, 1, 1), g);\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},Ke={common:{diffuse:{value:new He(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new _n},alphaMap:{value:null},alphaMapTransform:{value:new _n},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new _n}},envmap:{envMap:{value:null},envMapRotation:{value:new _n},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new _n}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new _n}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new _n},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new _n},normalScale:{value:new we(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new _n},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new _n}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new _n}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new _n}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new He(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new He(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new _n},alphaTest:{value:0},uvTransform:{value:new _n}},sprite:{diffuse:{value:new He(16777215)},opacity:{value:1},center:{value:new we(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new _n},alphaMap:{value:null},alphaMapTransform:{value:new _n},alphaTest:{value:0}}},Jl={basic:{uniforms:no([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.fog]),vertexShader:wn.meshbasic_vert,fragmentShader:wn.meshbasic_frag},lambert:{uniforms:no([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new He(0)}}]),vertexShader:wn.meshlambert_vert,fragmentShader:wn.meshlambert_frag},phong:{uniforms:no([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new He(0)},specular:{value:new He(1118481)},shininess:{value:30}}]),vertexShader:wn.meshphong_vert,fragmentShader:wn.meshphong_frag},standard:{uniforms:no([Ke.common,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.roughnessmap,Ke.metalnessmap,Ke.fog,Ke.lights,{emissive:{value:new He(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:wn.meshphysical_vert,fragmentShader:wn.meshphysical_frag},toon:{uniforms:no([Ke.common,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.gradientmap,Ke.fog,Ke.lights,{emissive:{value:new He(0)}}]),vertexShader:wn.meshtoon_vert,fragmentShader:wn.meshtoon_frag},matcap:{uniforms:no([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,{matcap:{value:null}}]),vertexShader:wn.meshmatcap_vert,fragmentShader:wn.meshmatcap_frag},points:{uniforms:no([Ke.points,Ke.fog]),vertexShader:wn.points_vert,fragmentShader:wn.points_frag},dashed:{uniforms:no([Ke.common,Ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:wn.linedashed_vert,fragmentShader:wn.linedashed_frag},depth:{uniforms:no([Ke.common,Ke.displacementmap]),vertexShader:wn.depth_vert,fragmentShader:wn.depth_frag},normal:{uniforms:no([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,{opacity:{value:1}}]),vertexShader:wn.meshnormal_vert,fragmentShader:wn.meshnormal_frag},sprite:{uniforms:no([Ke.sprite,Ke.fog]),vertexShader:wn.sprite_vert,fragmentShader:wn.sprite_frag},background:{uniforms:{uvTransform:{value:new _n},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:wn.background_vert,fragmentShader:wn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new _n}},vertexShader:wn.backgroundCube_vert,fragmentShader:wn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:wn.cube_vert,fragmentShader:wn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:wn.equirect_vert,fragmentShader:wn.equirect_frag},distanceRGBA:{uniforms:no([Ke.common,Ke.displacementmap,{referencePosition:{value:new L},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:wn.distanceRGBA_vert,fragmentShader:wn.distanceRGBA_frag},shadow:{uniforms:no([Ke.lights,Ke.fog,{color:{value:new He(0)},opacity:{value:1}}]),vertexShader:wn.shadow_vert,fragmentShader:wn.shadow_frag}};Jl.physical={uniforms:no([Jl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new _n},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new _n},clearcoatNormalScale:{value:new we(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new _n},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new _n},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new _n},sheen:{value:0},sheenColor:{value:new He(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new _n},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new _n},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new _n},transmissionSamplerSize:{value:new we},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new _n},attenuationDistance:{value:0},attenuationColor:{value:new He(0)},specularColor:{value:new He(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new _n},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new _n},anisotropyVector:{value:new we},anisotropyMap:{value:null},anisotropyMapTransform:{value:new _n}}]),vertexShader:wn.meshphysical_vert,fragmentShader:wn.meshphysical_frag};const tS={r:0,b:0,g:0},lf=new td,Qle=new It;function Jle(i,t,e,n,r,s,o){const a=new He(0);let c,u,l=!0===s?0:1,h=null,p=0,m=null;function b(v,y){v.getRGB(tS,y4(i)),n.buffers.color.setClear(tS.r,tS.g,tS.b,y,o)}return{getClearColor:function(){return a},setClearColor:function(v,y=1){a.set(v),l=y,b(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(v){l=v,b(a,l)},render:function g(v,y){let M=!1,x=!0===y.isScene?y.background:null;x&&x.isTexture&&(x=(y.backgroundBlurriness>0?e:t).get(x)),null===x?b(a,l):x&&x.isColor&&(b(x,1),M=!0);const C=i.xr.getEnvironmentBlendMode();"additive"===C?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===C&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||M)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),x&&(x.isCubeTexture||x.mapping===nb)?(void 0===u&&(u=new qn(new nf(1,1,1),new od({name:"BackgroundCubeMaterial",uniforms:bg(Jl.backgroundCube.uniforms),vertexShader:Jl.backgroundCube.vertexShader,fragmentShader:Jl.backgroundCube.fragmentShader,side:bo,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(O,T,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),lf.copy(y.backgroundRotation),lf.x*=-1,lf.y*=-1,lf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(lf.y*=-1,lf.z*=-1),u.material.uniforms.envMap.value=x,u.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(Qle.makeRotationFromEuler(lf)),u.material.toneMapped=ti.getTransfer(x.colorSpace)!==wi,(h!==x||p!==x.version||m!==i.toneMapping)&&(u.material.needsUpdate=!0,h=x,p=x.version,m=i.toneMapping),u.layers.enableAll(),v.unshift(u,u.geometry,u.material,0,0,null)):x&&x.isTexture&&(void 0===c&&(c=new qn(new af(2,2),new od({name:"BackgroundMaterial",uniforms:bg(Jl.background.uniforms),vertexShader:Jl.background.vertexShader,fragmentShader:Jl.background.fragmentShader,side:Zl,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=x,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=ti.getTransfer(x.colorSpace)!==wi,!0===x.matrixAutoUpdate&&x.updateMatrix(),c.material.uniforms.uvTransform.value.copy(x.matrix),(h!==x||p!==x.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,h=x,p=x.version,m=i.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null))}}}function ece(i,t){const e=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function c(E){return i.bindVertexArray(E)}function u(E){return i.deleteVertexArray(E)}function p(E){const X=[],re=[],W=[];for(let ie=0;ie=0){const Ce=ie[K];let Ge=pe[K];if(void 0===Ge&&("instanceMatrix"===K&&E.instanceMatrix&&(Ge=E.instanceMatrix),"instanceColor"===K&&E.instanceColor&&(Ge=E.instanceColor)),void 0===Ce||Ce.attribute!==Ge||Ge&&Ce.data!==Ge.data)return!0;Q++}return s.attributesNum!==Q||s.index!==W}(E,W,re,ie),pe&&function g(E,X,re,W){const ie={},pe=X.attributes;let Q=0;const ue=re.getAttributes();for(const K in ue)if(ue[K].location>=0){let Ce=pe[K];void 0===Ce&&("instanceMatrix"===K&&E.instanceMatrix&&(Ce=E.instanceMatrix),"instanceColor"===K&&E.instanceColor&&(Ce=E.instanceColor));const Ge={};Ge.attribute=Ce,Ce&&Ce.data&&(Ge.data=Ce.data),ie[K]=Ge,Q++}s.attributes=ie,s.attributesNum=Q,s.index=W}(E,W,re,ie),null!==ie&&t.update(ie,i.ELEMENT_ARRAY_BUFFER),(pe||o)&&(o=!1,function C(E,X,re,W){b();const ie=W.attributes,pe=re.getAttributes(),Q=X.defaultAttributeValues;for(const ue in pe){const K=pe[ue];if(K.location>=0){let ge=ie[ue];if(void 0===ge&&("instanceMatrix"===ue&&E.instanceMatrix&&(ge=E.instanceMatrix),"instanceColor"===ue&&E.instanceColor&&(ge=E.instanceColor)),void 0!==ge){const Ce=ge.normalized,Ge=ge.itemSize,_t=t.get(ge);if(void 0===_t)continue;const Qt=_t.buffer,se=_t.type,Oe=_t.bytesPerElement,qe=se===i.INT||se===i.UNSIGNED_INT||ge.gpuType===uH;if(ge.isInterleavedBufferAttribute){const Re=ge.data,ht=Re.stride,yt=ge.offset;if(Re.isInstancedInterleavedBuffer){for(let mt=0;mt0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";x="mediump"}return"mediump"===x&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let o=void 0!==e.precision?e.precision:"highp";const a=s(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);const l=!0===e.logarithmicDepthBuffer,c=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),u=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function r(){if(void 0!==n)return n;if(!0===t.has("EXT_texture_filter_anisotropic")){const x=t.get("EXT_texture_filter_anisotropic");n=i.getParameter(x.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:s,precision:o,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:i.getParameter(i.MAX_TEXTURE_SIZE),maxCubemapSize:i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:i.getParameter(i.MAX_VERTEX_ATTRIBS),maxVertexUniforms:i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:i.getParameter(i.MAX_VARYING_VECTORS),maxFragmentUniforms:i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:u>0,maxSamples:i.getParameter(i.MAX_SAMPLES)}}function ice(i){const t=this;let e=null,n=0,r=!1,s=!1;const o=new rf,a=new _n,l={value:null,needsUpdate:!1};function u(h,p,m,g){const b=null!==h?h.length:0;let v=null;if(0!==b){if(v=l.value,!0!==g||null===v){const y=m+4*b,M=p.matrixWorldInverse;a.getNormalMatrix(M),(null===v||v.length0),t.numPlanes=n,t.numIntersection=0}();else{const M=s?0:n,x=4*M;let C=y.clippingState||null;l.value=C,C=u(g,p,x,m);for(let O=0;O!==x;++O)C[O]=e[O];y.clippingState=C,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function rce(i){let t=new WeakMap;function e(o,a){return a===CC?o.mapping=Zc:a===SC&&(o.mapping=Xh),o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=t.get(a);void 0!==l&&(t.delete(a),l.dispose())}return{get:function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===CC||a===SC){if(t.has(o))return e(t.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new qoe(l.height);return c.fromEquirectangularTexture(i,o),t.set(o,c),o.addEventListener("dispose",r),e(c.texture,o.mapping)}return null}}}return o},dispose:function s(){t=new WeakMap}}}class nS extends bk{constructor(t=-1,e=1,n=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,r,s,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=n-t,o=n+t,a=r+e,l=r-e;if(null!==this.view&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const M4=[.125,.215,.35,.446,.526,.582],wk=new nS,C4=new He;let Mk=null,Ck=0,Sk=0,Ek=!1;const df=(1+Math.sqrt(5))/2,Cg=1/df,S4=[new L(1,1,1),new L(-1,1,1),new L(1,1,-1),new L(-1,1,-1),new L(0,df,Cg),new L(0,df,-Cg),new L(Cg,0,df),new L(-Cg,0,df),new L(df,Cg,0),new L(-df,Cg,0)];class E4{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,r=100){Mk=this._renderer.getRenderTarget(),Ck=this._renderer.getActiveCubeFace(),Sk=this._renderer.getActiveMipmapLevel(),Ek=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,r,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=T4(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=D4(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;ti-4?l=M4[o-i+4-1]:0===o&&(l=0),n.push(l);const c=1/(a-2),u=-c,h=1+c,p=[u,u,h,u,h,h,u,u,h,h,u,h],m=6,g=6,b=3,v=2,y=1,M=new Float32Array(b*g*m),x=new Float32Array(v*g*m),C=new Float32Array(y*g*m);for(let T=0;T2?0:-1;M.set([P,B,0,P+2/3,B,0,P+2/3,B+1,0,P,B,0,P+2/3,B+1,0,P,B+1,0],b*g*T),x.set(p,v*g*T),C.set([T,T,T,T,T,T],y*g*T)}const O=new hn;O.setAttribute("position",new li(M,b)),O.setAttribute("uv",new li(x,v)),O.setAttribute("faceIndex",new li(C,y)),t.push(O),r>4&&r--}return{lodPlanes:t,sizeLods:e,sigmas:n}}(s)),this._blurMaterial=function oce(i,t,e){const n=new Float32Array(20),r=new L(0,1,0);return new od({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:du,depthTest:!1,depthWrite:!1})}(s,t,e)}return r}_compileMaterial(t){const e=new qn(this._lodPlanes[0],t);this._renderer.compile(e,wk)}_sceneToCubeUV(t,e,n,r){const a=new mr(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,p=u.toneMapping;u.getClearColor(C4),u.toneMapping=uu,u.autoClear=!1;const m=new cs({name:"PMREM.Background",side:bo,depthWrite:!1,depthTest:!1}),g=new qn(new nf,m);let b=!1;const v=t.background;v?v.isColor&&(m.color.copy(v),t.background=null,b=!0):(m.color.copy(C4),b=!0);for(let y=0;y<6;y++){const M=y%3;0===M?(a.up.set(0,l[y],0),a.lookAt(c[y],0,0)):1===M?(a.up.set(0,0,l[y]),a.lookAt(0,c[y],0)):(a.up.set(0,l[y],0),a.lookAt(0,0,c[y]));const x=this._cubeSize;iS(r,M*x,y>2?x:0,x,x),u.setRenderTarget(r),b&&u.render(g,a),u.render(t,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=p,u.autoClear=h,t.background=v}_textureToCubeUV(t,e){const n=this._renderer,r=t.mapping===Zc||t.mapping===Xh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=T4()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=D4());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new qn(this._lodPlanes[0],s);s.uniforms.envMap.value=t;const l=this._cubeSize;iS(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,wk)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let r=1;r20&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${v} samples when the maximum is set to 20`);const y=[];let M=0;for(let P=0;P<20;++P){const B=P/b,I=Math.exp(-B*B/2);y.push(I),0===P?M+=I:Px-4?r-x+4:0),4*(this._cubeSize-C),3*C,2*C),l.setRenderTarget(e),l.render(h,wk)}}function A4(i,t,e){const n=new Qh(i,t,e);return n.texture.mapping=nb,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function iS(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function D4(){return new od({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:du,depthTest:!1,depthWrite:!1})}function T4(){return new od({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:du,depthTest:!1,depthWrite:!1})}function ace(i){let t=new WeakMap,e=null;function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=t.get(l);void 0!==c&&(t.delete(l),c.dispose())}return{get:function n(a){if(a&&a.isTexture){const l=a.mapping,c=l===CC||l===SC,u=l===Zc||l===Xh;if(c||u){let h=t.get(a);if(a.isRenderTargetTexture&&a.pmremVersion!==(void 0!==h?h.texture.pmremVersion:0))return null===e&&(e=new E4(i)),h=c?e.fromEquirectangular(a,h):e.fromCubemap(a,h),h.texture.pmremVersion=a.pmremVersion,t.set(a,h),h.texture;if(void 0!==h)return h.texture;{const m=a.image;return c&&m&&m.height>0||u&&m&&function r(a){let l=0;for(let u=0;u<6;u++)void 0!==a[u]&&l++;return 6===l}(m)?(null===e&&(e=new E4(i)),h=c?e.fromEquirectangular(a):e.fromCubemap(a),h.texture.pmremVersion=a.pmremVersion,t.set(a,h),a.addEventListener("dispose",s),h.texture):null}}}return a},dispose:function o(){t=new WeakMap,null!==e&&(e.dispose(),e=null)}}}function lce(i){const t={};function e(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=i.getExtension("WEBGL_depth_texture")||i.getExtension("MOZ_WEBGL_depth_texture")||i.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=i.getExtension("WEBGL_compressed_texture_s3tc")||i.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=i.getExtension("WEBGL_compressed_texture_pvrtc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=i.getExtension(n)}return t[n]=r,r}return{has:function(n){return null!==e(n)},init:function(){e("EXT_color_buffer_float"),e("WEBGL_clip_cull_distance"),e("OES_texture_float_linear"),e("EXT_color_buffer_half_float"),e("WEBGL_multisampled_render_to_texture"),e("WEBGL_render_shared_exponent")},get:function(n){const r=e(n);return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function cce(i,t,e,n){const r={},s=new WeakMap;function o(h){const p=h.target;null!==p.index&&t.remove(p.index);for(const g in p.attributes)t.remove(p.attributes[g]);for(const g in p.morphAttributes){const b=p.morphAttributes[g];for(let v=0,y=b.length;vt.maxTextureSize&&(O=Math.ceil(C/t.maxTextureSize),C=t.maxTextureSize);const T=new Float32Array(C*O*4*h),P=new rk(T,C,O,h);P.type=al,P.needsUpdate=!0;const B=4*x;for(let E=0;E0)return i;const r=t*e;let s=L4[r];if(void 0===s&&(s=new Float32Array(r),L4[r]=s),0!==t){n.toArray(s,0);for(let o=1,a=0;o!==t;++o)a+=e,i[o].toArray(s,a)}return s}function Dr(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e":" "} ${a}: ${e[o]}`)}return n.join("\n")}(i.getShaderSource(t),o)}return r}function lde(i,t){const e=function ade(i){const t=ti.getPrimaries(ti.workingColorSpace),e=ti.getPrimaries(i);let n;switch(t===e?n="":t===RC&&e===IC?n="LinearDisplayP3ToLinearSRGB":t===IC&&e===RC&&(n="LinearSRGBToLinearDisplayP3"),i){case ls:case DC:return[n,"LinearTransferOETF"];case Wr:case JR:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",i),[n,"LinearTransferOETF"]}}(t);return`vec4 ${i}( vec4 value ) { return ${e[0]}( ${e[1]}( value ) ); }`}function cde(i,t){let e;switch(t){case Rse:e="Linear";break;case kse:e="Reinhard";break;case Pse:e="OptimizedCineon";break;case Ose:e="ACESFilmic";break;case Lse:e="AgX";break;case Nse:e="Neutral";break;case Fse:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+i+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function gb(i){return""!==i}function $4(i,t){const e=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return i.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,e).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function W4(i,t){return i.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const fde=/^[ \t]*#include +<([\w\d./]+)>/gm;function Tk(i){return i.replace(fde,mde)}const pde=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function mde(i,t){let e=wn[t];if(void 0===e){const n=pde.get(t);if(void 0===n)throw new Error("Can not resolve #include <"+t+">");e=wn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,n)}return Tk(e)}const gde=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function j4(i){return i.replace(gde,_de)}function _de(i,t,e,n){let r="";for(let s=parseInt(t);s0&&(v+="\n"),y=["#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g].filter(gb).join("\n"),y.length>0&&(y+="\n")):(v=[Y4(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",e.batching?"#define USE_BATCHING":"",e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.instancingMorph?"#define USE_INSTANCING_MORPH":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+u:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",e.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",e.displacementMap?"#define USE_DISPLACEMENTMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.anisotropy?"#define USE_ANISOTROPY":"",e.anisotropyMap?"#define USE_ANISOTROPYMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",e.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaHash?"#define USE_ALPHAHASH":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",e.mapUv?"#define MAP_UV "+e.mapUv:"",e.alphaMapUv?"#define ALPHAMAP_UV "+e.alphaMapUv:"",e.lightMapUv?"#define LIGHTMAP_UV "+e.lightMapUv:"",e.aoMapUv?"#define AOMAP_UV "+e.aoMapUv:"",e.emissiveMapUv?"#define EMISSIVEMAP_UV "+e.emissiveMapUv:"",e.bumpMapUv?"#define BUMPMAP_UV "+e.bumpMapUv:"",e.normalMapUv?"#define NORMALMAP_UV "+e.normalMapUv:"",e.displacementMapUv?"#define DISPLACEMENTMAP_UV "+e.displacementMapUv:"",e.metalnessMapUv?"#define METALNESSMAP_UV "+e.metalnessMapUv:"",e.roughnessMapUv?"#define ROUGHNESSMAP_UV "+e.roughnessMapUv:"",e.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+e.anisotropyMapUv:"",e.clearcoatMapUv?"#define CLEARCOATMAP_UV "+e.clearcoatMapUv:"",e.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+e.clearcoatNormalMapUv:"",e.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+e.clearcoatRoughnessMapUv:"",e.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+e.iridescenceMapUv:"",e.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+e.iridescenceThicknessMapUv:"",e.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+e.sheenColorMapUv:"",e.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+e.sheenRoughnessMapUv:"",e.specularMapUv?"#define SPECULARMAP_UV "+e.specularMapUv:"",e.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+e.specularColorMapUv:"",e.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+e.specularIntensityMapUv:"",e.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+e.transmissionMapUv:"",e.thicknessMapUv?"#define THICKNESSMAP_UV "+e.thicknessMapUv:"",e.vertexTangents&&!1===e.flatShading?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUv1s?"#define USE_UV1":"",e.vertexUv2s?"#define USE_UV2":"",e.vertexUv3s?"#define USE_UV3":"",e.pointsUvs?"#define USE_POINTS_UV":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&!1===e.flatShading?"#define USE_MORPHNORMALS":"",e.morphColors?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",e.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.numLightProbes>0?"#define USE_LIGHT_PROBES":"",e.useLegacyLights?"#define LEGACY_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(gb).join("\n"),y=[Y4(e),"#define SHADER_TYPE "+e.shaderType,"#define SHADER_NAME "+e.shaderName,g,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+c:"",e.envMap?"#define "+u:"",e.envMap?"#define "+h:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",e.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.anisotropy?"#define USE_ANISOTROPY":"",e.anisotropyMap?"#define USE_ANISOTROPYMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",e.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.alphaHash?"#define USE_ALPHAHASH":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.vertexTangents&&!1===e.flatShading?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUv1s?"#define USE_UV1":"",e.vertexUv2s?"#define USE_UV2":"",e.vertexUv3s?"#define USE_UV3":"",e.pointsUvs?"#define USE_POINTS_UV":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.numLightProbes>0?"#define USE_LIGHT_PROBES":"",e.useLegacyLights?"#define LEGACY_LIGHTS":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==uu?"#define TONE_MAPPING":"",e.toneMapping!==uu?wn.tonemapping_pars_fragment:"",e.toneMapping!==uu?cde("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",wn.colorspace_pars_fragment,lde("linearToOutputTexel",e.outputColorSpace),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(gb).join("\n")),o=Tk(o),o=$4(o,e),o=W4(o,e),a=Tk(a),a=$4(a,e),a=W4(a,e),o=j4(o),a=j4(a),!0!==e.isRawShaderMaterial&&(M="#version 300 es\n",v=[m,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+v,y=["#define varying in",e.glslVersion===qH?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===qH?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+y);const C=M+y+a,O=H4(r,r.VERTEX_SHADER,M+v+o),T=H4(r,r.FRAGMENT_SHADER,C);function P(X){if(i.debug.checkShaderErrors){const re=r.getProgramInfoLog(b).trim(),W=r.getShaderInfoLog(O).trim(),ie=r.getShaderInfoLog(T).trim();let pe=!0,Q=!0;if(!1===r.getProgramParameter(b,r.LINK_STATUS))if(pe=!1,"function"==typeof i.debug.onShaderError)i.debug.onShaderError(r,b,O,T);else{const ue=G4(r,O,"vertex"),K=G4(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(b,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+X.name+"\nMaterial Type: "+X.type+"\n\nProgram Info Log: "+re+"\n"+ue+"\n"+K)}else""!==re?console.warn("THREE.WebGLProgram: Program Info Log:",re):(""===W||""===ie)&&(Q=!1);Q&&(X.diagnostics={runnable:pe,programLog:re,vertexShader:{log:W,prefix:v},fragmentShader:{log:ie,prefix:y}})}r.deleteShader(O),r.deleteShader(T),B=new sS(r,b),I=function hde(i,t){const e={},n=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES);for(let r=0;r0,Te=I.clearcoat>0,Ft=I.iridescence>0,Pe=I.sheen>0,bt=I.transmission>0,zt=Me&&!!I.anisotropyMap,$e=Te&&!!I.clearcoatMap,at=Te&&!!I.clearcoatNormalMap,nn=Te&&!!I.clearcoatRoughnessMap,ut=Ft&&!!I.iridescenceMap,ft=Ft&&!!I.iridescenceThicknessMap,Un=Pe&&!!I.sheenColorMap,$n=Pe&&!!I.sheenRoughnessMap,si=!!I.specularMap,ni=!!I.specularColorMap,Ii=!!I.specularIntensityMap,St=bt&&!!I.transmissionMap,H=bt&&!!I.thicknessMap,We=!!I.alphaMap,vi=!!I.extensions;let Ri=uu;I.toneMapped&&(null===Re||!0===Re.isXRRenderTarget)&&(Ri=i.toneMapping);const Ui={shaderID:ge,shaderType:I.type,shaderName:I.name,vertexShader:Qt,fragmentShader:se,defines:I.defines,customVertexShaderID:Oe,customFragmentShaderID:qe,isRawShaderMaterial:!0===I.isRawShaderMaterial,glslVersion:I.glslVersion,precision:m,batching:!0===W.isBatchedMesh,instancing:ht,instancingColor:ht&&null!==W.instanceColor,instancingMorph:ht&&null!==W.morphTexture,supportsVertexTextures:p,outputColorSpace:null===Re?i.outputColorSpace:!0===Re.isXRRenderTarget?Re.texture.colorSpace:ls,alphaToCoverage:!!I.alphaToCoverage,map:mt,matcap:!!I.matcap,envMap:Ae,envMapMode:Ae&&ue.mapping,envMapCubeUVHeight:K,aoMap:Se,lightMap:Ue,bumpMap:Le,normalMap:Be,displacementMap:p&&N,emissiveMap:D,normalMapObjectSpace:Be&&I.normalMapType===eoe,normalMapTangentSpace:Be&&I.normalMapType===Kh,metalnessMap:ne,roughnessMap:ve,anisotropy:Me,anisotropyMap:zt,clearcoat:Te,clearcoatMap:$e,clearcoatNormalMap:at,clearcoatRoughnessMap:nn,iridescence:Ft,iridescenceMap:ut,iridescenceThicknessMap:ft,sheen:Pe,sheenColorMap:Un,sheenRoughnessMap:$n,specularMap:si,specularColorMap:ni,specularIntensityMap:Ii,transmission:bt,transmissionMap:St,thicknessMap:H,gradientMap:!!I.gradientMap,opaque:!1===I.transparent&&I.blending===qm&&!1===I.alphaToCoverage,alphaMap:We,alphaTest:I.alphaTest>0,alphaHash:!!I.alphaHash,combine:I.combine,mapUv:mt&&b(I.map.channel),aoMapUv:Se&&b(I.aoMap.channel),lightMapUv:Ue&&b(I.lightMap.channel),bumpMapUv:Le&&b(I.bumpMap.channel),normalMapUv:Be&&b(I.normalMap.channel),displacementMapUv:N&&b(I.displacementMap.channel),emissiveMapUv:D&&b(I.emissiveMap.channel),metalnessMapUv:ne&&b(I.metalnessMap.channel),roughnessMapUv:ve&&b(I.roughnessMap.channel),anisotropyMapUv:zt&&b(I.anisotropyMap.channel),clearcoatMapUv:$e&&b(I.clearcoatMap.channel),clearcoatNormalMapUv:at&&b(I.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nn&&b(I.clearcoatRoughnessMap.channel),iridescenceMapUv:ut&&b(I.iridescenceMap.channel),iridescenceThicknessMapUv:ft&&b(I.iridescenceThicknessMap.channel),sheenColorMapUv:Un&&b(I.sheenColorMap.channel),sheenRoughnessMapUv:$n&&b(I.sheenRoughnessMap.channel),specularMapUv:si&&b(I.specularMap.channel),specularColorMapUv:ni&&b(I.specularColorMap.channel),specularIntensityMapUv:Ii&&b(I.specularIntensityMap.channel),transmissionMapUv:St&&b(I.transmissionMap.channel),thicknessMapUv:H&&b(I.thicknessMap.channel),alphaMapUv:We&&b(I.alphaMap.channel),vertexTangents:!!pe.attributes.tangent&&(Be||Me),vertexColors:I.vertexColors,vertexAlphas:!0===I.vertexColors&&!!pe.attributes.color&&4===pe.attributes.color.itemSize,pointsUvs:!0===W.isPoints&&!!pe.attributes.uv&&(mt||We),fog:!!ie,useFog:!0===I.fog,fogExp2:!!ie&&ie.isFogExp2,flatShading:!0===I.flatShading,sizeAttenuation:!0===I.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===W.isSkinnedMesh,morphTargets:void 0!==pe.morphAttributes.position,morphNormals:void 0!==pe.morphAttributes.normal,morphColors:void 0!==pe.morphAttributes.color,morphTargetsCount:Ge,morphTextureStride:_t,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:I.dithering,shadowMapEnabled:i.shadowMap.enabled&&X.length>0,shadowMapType:i.shadowMap.type,toneMapping:Ri,useLegacyLights:i._useLegacyLights,decodeVideoTexture:mt&&!0===I.map.isVideoTexture&&ti.getTransfer(I.map.colorSpace)===wi,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===Go,flipSided:I.side===bo,useDepthPacking:I.depthPacking>=0,depthPacking:I.depthPacking||0,index0AttributeName:I.index0AttributeName,extensionClipCullDistance:vi&&!0===I.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:vi&&!0===I.extensions.multiDraw&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:I.customProgramCacheKey()};return Ui.vertexUv1s=c.has(1),Ui.vertexUv2s=c.has(2),Ui.vertexUv3s=c.has(3),c.clear(),Ui},getProgramCacheKey:function y(I){const E=[];if(I.shaderID?E.push(I.shaderID):(E.push(I.customVertexShaderID),E.push(I.customFragmentShaderID)),void 0!==I.defines)for(const X in I.defines)E.push(X),E.push(I.defines[X]);return!1===I.isRawShaderMaterial&&(function M(I,E){I.push(E.precision),I.push(E.outputColorSpace),I.push(E.envMapMode),I.push(E.envMapCubeUVHeight),I.push(E.mapUv),I.push(E.alphaMapUv),I.push(E.lightMapUv),I.push(E.aoMapUv),I.push(E.bumpMapUv),I.push(E.normalMapUv),I.push(E.displacementMapUv),I.push(E.emissiveMapUv),I.push(E.metalnessMapUv),I.push(E.roughnessMapUv),I.push(E.anisotropyMapUv),I.push(E.clearcoatMapUv),I.push(E.clearcoatNormalMapUv),I.push(E.clearcoatRoughnessMapUv),I.push(E.iridescenceMapUv),I.push(E.iridescenceThicknessMapUv),I.push(E.sheenColorMapUv),I.push(E.sheenRoughnessMapUv),I.push(E.specularMapUv),I.push(E.specularColorMapUv),I.push(E.specularIntensityMapUv),I.push(E.transmissionMapUv),I.push(E.thicknessMapUv),I.push(E.combine),I.push(E.fogExp2),I.push(E.sizeAttenuation),I.push(E.morphTargetsCount),I.push(E.morphAttributeCount),I.push(E.numDirLights),I.push(E.numPointLights),I.push(E.numSpotLights),I.push(E.numSpotLightMaps),I.push(E.numHemiLights),I.push(E.numRectAreaLights),I.push(E.numDirLightShadows),I.push(E.numPointLightShadows),I.push(E.numSpotLightShadows),I.push(E.numSpotLightShadowsWithMaps),I.push(E.numLightProbes),I.push(E.shadowMapType),I.push(E.toneMapping),I.push(E.numClippingPlanes),I.push(E.numClipIntersection),I.push(E.depthPacking)}(E,I),function x(I,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),I.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.skinning&&a.enable(4),E.morphTargets&&a.enable(5),E.morphNormals&&a.enable(6),E.morphColors&&a.enable(7),E.premultipliedAlpha&&a.enable(8),E.shadowMapEnabled&&a.enable(9),E.useLegacyLights&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.alphaToCoverage&&a.enable(20),I.push(a.mask)}(E,I),E.push(i.outputColorSpace)),E.push(I.customProgramCacheKey),E.join()},getUniforms:function C(I){const E=g[I.type];let X;return X=E?$oe.clone(Jl[E].uniforms):I.uniforms,X},acquireProgram:function O(I,E){let X;for(let re=0,W=u.length;re0?n.push(y):!0===m.transparent?r.push(y):e.push(y)},unshift:function l(h,p,m,g,b,v){const y=o(h,p,m,g,b,v);m.transmission>0?n.unshift(y):!0===m.transparent?r.unshift(y):e.unshift(y)},finish:function u(){for(let h=t,p=i.length;h1&&e.sort(h||Tde),n.length>1&&n.sort(p||q4),r.length>1&&r.sort(p||q4)}}}function Ide(){let i=new WeakMap;return{get:function t(n,r){const s=i.get(n);let o;return void 0===s?(o=new X4,i.set(n,[o])):r>=s.length?(o=new X4,s.push(o)):o=s[r],o},dispose:function e(){i=new WeakMap}}}function Rde(){const i={};return{get:function(t){if(void 0!==i[t.id])return i[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new L,color:new He};break;case"SpotLight":e={position:new L,direction:new L,color:new He,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new L,color:new He,distance:0,decay:0};break;case"HemisphereLight":e={direction:new L,skyColor:new He,groundColor:new He};break;case"RectAreaLight":e={color:new He,position:new L,halfWidth:new L,halfHeight:new L}}return i[t.id]=e,e}}}let Pde=0;function Ode(i,t){return(t.castShadow?2:0)-(i.castShadow?2:0)+(t.map?1:0)-(i.map?1:0)}function Fde(i){const t=new Rde,e=function kde(){const i={};return{get:function(t){if(void 0!==i[t.id])return i[t.id];let e;switch(t.type){case"DirectionalLight":case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new we};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new we,shadowCameraNear:1,shadowCameraFar:1e3}}return i[t.id]=e,e}}}(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new L);const r=new L,s=new It,o=new It;return{setup:function a(c,u){let h=0,p=0,m=0;for(let X=0;X<9;X++)n.probe[X].set(0,0,0);let g=0,b=0,v=0,y=0,M=0,x=0,C=0,O=0,T=0,P=0,B=0;c.sort(Ode);const I=!0===u?Math.PI:1;for(let X=0,re=c.length;X0&&(!0===i.has("OES_texture_float_linear")?(n.rectAreaLTC1=Ke.LTC_FLOAT_1,n.rectAreaLTC2=Ke.LTC_FLOAT_2):(n.rectAreaLTC1=Ke.LTC_HALF_1,n.rectAreaLTC2=Ke.LTC_HALF_2)),n.ambient[0]=h,n.ambient[1]=p,n.ambient[2]=m;const E=n.hash;(E.directionalLength!==g||E.pointLength!==b||E.spotLength!==v||E.rectAreaLength!==y||E.hemiLength!==M||E.numDirectionalShadows!==x||E.numPointShadows!==C||E.numSpotShadows!==O||E.numSpotMaps!==T||E.numLightProbes!==B)&&(n.directional.length=g,n.spot.length=v,n.rectArea.length=y,n.point.length=b,n.hemi.length=M,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=C,n.pointShadowMap.length=C,n.spotShadow.length=O,n.spotShadowMap.length=O,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=C,n.spotLightMatrix.length=O+T-P,n.spotLightMap.length=T,n.numSpotLightShadowsWithMaps=P,n.numLightProbes=B,E.directionalLength=g,E.pointLength=b,E.spotLength=v,E.rectAreaLength=y,E.hemiLength=M,E.numDirectionalShadows=x,E.numPointShadows=C,E.numSpotShadows=O,E.numSpotMaps=T,E.numLightProbes=B,n.version=Pde++)},setupView:function l(c,u){let h=0,p=0,m=0,g=0,b=0;const v=u.matrixWorldInverse;for(let y=0,M=c.length;y=o.length?(a=new K4(i),o.push(a)):a=o[s],a},dispose:function n(){t=new WeakMap}}}class Z4 extends xo{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class Q4 extends xo{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}const Nde="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",Bde="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function Ude(i,t,e){let n=new eS;const r=new we,s=new we,o=new oi,a=new Z4({depthPacking:Jse}),l=new Q4,c={},u=e.maxTextureSize,h={[Zl]:bo,[bo]:Zl,[Go]:Go},p=new od({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new we},radius:{value:4}},vertexShader:Nde,fragmentShader:Bde}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new li(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new qn(g,p),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=rH;let y=this.type;function M(T,P){const B=t.update(b);p.defines.VSM_SAMPLES!==T.blurSamples&&(p.defines.VSM_SAMPLES=T.blurSamples,m.defines.VSM_SAMPLES=T.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===T.mapPass&&(T.mapPass=new Qh(r.x,r.y)),p.uniforms.shadow_pass.value=T.map.texture,p.uniforms.resolution.value=T.mapSize,p.uniforms.radius.value=T.radius,i.setRenderTarget(T.mapPass),i.clear(),i.renderBufferDirect(P,null,B,p,b,null),m.uniforms.shadow_pass.value=T.mapPass.texture,m.uniforms.resolution.value=T.mapSize,m.uniforms.radius.value=T.radius,i.setRenderTarget(T.map),i.clear(),i.renderBufferDirect(P,null,B,m,b,null)}function x(T,P,B,I){let E=null;const X=!0===B.isPointLight?T.customDistanceMaterial:T.customDepthMaterial;if(void 0!==X)E=X;else if(E=!0===B.isPointLight?l:a,i.localClippingEnabled&&!0===P.clipShadows&&Array.isArray(P.clippingPlanes)&&0!==P.clippingPlanes.length||P.displacementMap&&0!==P.displacementScale||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0){const re=E.uuid,W=P.uuid;let ie=c[re];void 0===ie&&(ie={},c[re]=ie);let pe=ie[W];void 0===pe&&(pe=E.clone(),ie[W]=pe,P.addEventListener("dispose",O)),E=pe}return E.visible=P.visible,E.wireframe=P.wireframe,E.side=I===Kc?null!==P.shadowSide?P.shadowSide:P.side:null!==P.shadowSide?P.shadowSide:h[P.side],E.alphaMap=P.alphaMap,E.alphaTest=P.alphaTest,E.map=P.map,E.clipShadows=P.clipShadows,E.clippingPlanes=P.clippingPlanes,E.clipIntersection=P.clipIntersection,E.displacementMap=P.displacementMap,E.displacementScale=P.displacementScale,E.displacementBias=P.displacementBias,E.wireframeLinewidth=P.wireframeLinewidth,E.linewidth=P.linewidth,!0===B.isPointLight&&!0===E.isMeshDistanceMaterial&&(i.properties.get(E).light=B),E}function C(T,P,B,I,E){if(!1===T.visible)return;if(T.layers.test(P.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&E===Kc)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,T.matrixWorld);const W=t.update(T),ie=T.material;if(Array.isArray(ie)){const pe=W.groups;for(let Q=0,ue=pe.length;Qu||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/ge.x),r.x=s.x*ge.x,K.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/ge.y),r.y=s.y*ge.y,K.mapSize.y=s.y)),null===K.map||!0===W||!0===ie){const Ge=this.type!==Kc?{minFilter:fr,magFilter:fr}:{};null!==K.map&&K.map.dispose(),K.map=new Qh(r.x,r.y,Ge),K.map.texture.name=ue.name+".shadowMap",K.camera.updateProjectionMatrix()}i.setRenderTarget(K.map),i.clear();const Ce=K.getViewportCount();for(let Ge=0;Ge=1):-1!==ue.indexOf("OpenGL ES")&&(Q=parseFloat(/^OpenGL ES (\d)/.exec(ue)[1]),pe=Q>=2);let K=null,ge={};const Ce=i.getParameter(i.SCISSOR_BOX),Ge=i.getParameter(i.VIEWPORT),_t=(new oi).fromArray(Ce),Qt=(new oi).fromArray(Ge);function se(H,Xe,We,Rt){const Lt=new Uint8Array(4),vi=i.createTexture();i.bindTexture(H,vi),i.texParameteri(H,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(H,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Ri=0;Ri"u")&&/OculusBrowser/g.test(navigator.userAgent),c=new we,u=new WeakMap;let h;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function g(N,D){return m?new OffscreenCanvas(N,D):cb("canvas")}function b(N,D,ne){let ve=1;const Me=Be(N);if((Me.width>ne||Me.height>ne)&&(ve=ne/Math.max(Me.width,Me.height)),ve<1){if(typeof HTMLImageElement<"u"&&N instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&N instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&N instanceof ImageBitmap||typeof VideoFrame<"u"&&N instanceof VideoFrame){const Te=Math.floor(ve*Me.width),Ft=Math.floor(ve*Me.height);void 0===h&&(h=g(Te,Ft));const Pe=D?g(Te,Ft):h;return Pe.width=Te,Pe.height=Ft,Pe.getContext("2d").drawImage(N,0,0,Te,Ft),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Me.width+"x"+Me.height+") to ("+Te+"x"+Ft+")."),Pe}return"data"in N&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Me.width+"x"+Me.height+")."),N}return N}function v(N){return N.generateMipmaps&&N.minFilter!==fr&&N.minFilter!==er}function y(N){i.generateMipmap(N)}function M(N,D,ne,ve,Me=!1){if(null!==N){if(void 0!==i[N])return i[N];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+N+"'")}let Te=D;if(D===i.RED&&(ne===i.FLOAT&&(Te=i.R32F),ne===i.HALF_FLOAT&&(Te=i.R16F),ne===i.UNSIGNED_BYTE&&(Te=i.R8)),D===i.RED_INTEGER&&(ne===i.UNSIGNED_BYTE&&(Te=i.R8UI),ne===i.UNSIGNED_SHORT&&(Te=i.R16UI),ne===i.UNSIGNED_INT&&(Te=i.R32UI),ne===i.BYTE&&(Te=i.R8I),ne===i.SHORT&&(Te=i.R16I),ne===i.INT&&(Te=i.R32I)),D===i.RG&&(ne===i.FLOAT&&(Te=i.RG32F),ne===i.HALF_FLOAT&&(Te=i.RG16F),ne===i.UNSIGNED_BYTE&&(Te=i.RG8)),D===i.RG_INTEGER&&(ne===i.UNSIGNED_BYTE&&(Te=i.RG8UI),ne===i.UNSIGNED_SHORT&&(Te=i.RG16UI),ne===i.UNSIGNED_INT&&(Te=i.RG32UI),ne===i.BYTE&&(Te=i.RG8I),ne===i.SHORT&&(Te=i.RG16I),ne===i.INT&&(Te=i.RG32I)),D===i.RGB&&ne===i.UNSIGNED_INT_5_9_9_9_REV&&(Te=i.RGB9_E5),D===i.RGBA){const Ft=Me?TC:ti.getTransfer(ve);ne===i.FLOAT&&(Te=i.RGBA32F),ne===i.HALF_FLOAT&&(Te=i.RGBA16F),ne===i.UNSIGNED_BYTE&&(Te=Ft===wi?i.SRGB8_ALPHA8:i.RGBA8),ne===i.UNSIGNED_SHORT_4_4_4_4&&(Te=i.RGBA4),ne===i.UNSIGNED_SHORT_5_5_5_1&&(Te=i.RGB5_A1)}return(Te===i.R16F||Te===i.R32F||Te===i.RG16F||Te===i.RG32F||Te===i.RGBA16F||Te===i.RGBA32F)&&t.get("EXT_color_buffer_float"),Te}function x(N,D){return!0===v(N)||N.isFramebufferTexture&&N.minFilter!==fr&&N.minFilter!==er?Math.log2(Math.max(D.width,D.height))+1:void 0!==N.mipmaps&&N.mipmaps.length>0?N.mipmaps.length:N.isCompressedTexture&&Array.isArray(N.image)?D.mipmaps.length:1}function C(N){const D=N.target;D.removeEventListener("dispose",C),function T(N){const D=n.get(N);if(void 0===D.__webglInit)return;const ne=N.source,ve=p.get(ne);if(ve){const Me=ve[D.__cacheKey];Me.usedTimes--,0===Me.usedTimes&&P(N),0===Object.keys(ve).length&&p.delete(ne)}n.remove(N)}(D),D.isVideoTexture&&u.delete(D)}function O(N){const D=N.target;D.removeEventListener("dispose",O),function B(N){const D=n.get(N);if(N.depthTexture&&N.depthTexture.dispose(),N.isWebGLCubeRenderTarget)for(let ve=0;ve<6;ve++){if(Array.isArray(D.__webglFramebuffer[ve]))for(let Me=0;Me0&&ne.__version!==N.version){const ve=N.image;if(null===ve)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==ve.complete)return void _t(ne,N,D);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.bindTexture(i.TEXTURE_2D,ne.__webglTexture,i.TEXTURE0+D)}const ue={[Ql]:i.REPEAT,[$r]:i.CLAMP_TO_EDGE,[ib]:i.MIRRORED_REPEAT},K={[fr]:i.NEAREST,[$R]:i.NEAREST_MIPMAP_NEAREST,[Xm]:i.NEAREST_MIPMAP_LINEAR,[er]:i.LINEAR,[rb]:i.LINEAR_MIPMAP_NEAREST,[ol]:i.LINEAR_MIPMAP_LINEAR},ge={[toe]:i.NEVER,[aoe]:i.ALWAYS,[noe]:i.LESS,[YH]:i.LEQUAL,[ioe]:i.EQUAL,[ooe]:i.GEQUAL,[roe]:i.GREATER,[soe]:i.NOTEQUAL};function Ce(N,D){if(D.type===al&&!1===t.has("OES_texture_float_linear")&&(D.magFilter===er||D.magFilter===rb||D.magFilter===Xm||D.magFilter===ol||D.minFilter===er||D.minFilter===rb||D.minFilter===Xm||D.minFilter===ol)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(N,i.TEXTURE_WRAP_S,ue[D.wrapS]),i.texParameteri(N,i.TEXTURE_WRAP_T,ue[D.wrapT]),(N===i.TEXTURE_3D||N===i.TEXTURE_2D_ARRAY)&&i.texParameteri(N,i.TEXTURE_WRAP_R,ue[D.wrapR]),i.texParameteri(N,i.TEXTURE_MAG_FILTER,K[D.magFilter]),i.texParameteri(N,i.TEXTURE_MIN_FILTER,K[D.minFilter]),D.compareFunction&&(i.texParameteri(N,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(N,i.TEXTURE_COMPARE_FUNC,ge[D.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(D.magFilter===fr||D.minFilter!==Xm&&D.minFilter!==ol||D.type===al&&!1===t.has("OES_texture_float_linear"))return;if(D.anisotropy>1||n.get(D).__currentAnisotropy){const ne=t.get("EXT_texture_filter_anisotropic");i.texParameterf(N,ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,r.getMaxAnisotropy())),n.get(D).__currentAnisotropy=D.anisotropy}}}function Ge(N,D){let ne=!1;void 0===N.__webglInit&&(N.__webglInit=!0,D.addEventListener("dispose",C));const ve=D.source;let Me=p.get(ve);void 0===Me&&(Me={},p.set(ve,Me));const Te=function re(N){const D=[];return D.push(N.wrapS),D.push(N.wrapT),D.push(N.wrapR||0),D.push(N.magFilter),D.push(N.minFilter),D.push(N.anisotropy),D.push(N.internalFormat),D.push(N.format),D.push(N.type),D.push(N.generateMipmaps),D.push(N.premultiplyAlpha),D.push(N.flipY),D.push(N.unpackAlignment),D.push(N.colorSpace),D.join()}(D);if(Te!==N.__cacheKey){void 0===Me[Te]&&(Me[Te]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),Me[Te].usedTimes++;const Ft=Me[N.__cacheKey];void 0!==Ft&&(Me[N.__cacheKey].usedTimes--,0===Ft.usedTimes&&P(D)),N.__cacheKey=Te,N.__webglTexture=Me[Te].texture}return ne}function _t(N,D,ne){let ve=i.TEXTURE_2D;(D.isDataArrayTexture||D.isCompressedArrayTexture)&&(ve=i.TEXTURE_2D_ARRAY),D.isData3DTexture&&(ve=i.TEXTURE_3D);const Me=Ge(N,D),Te=D.source;e.bindTexture(ve,N.__webglTexture,i.TEXTURE0+ne);const Ft=n.get(Te);if(Te.version!==Ft.__version||!0===Me){e.activeTexture(i.TEXTURE0+ne);const Pe=ti.getPrimaries(ti.workingColorSpace),bt=D.colorSpace===fu?null:ti.getPrimaries(D.colorSpace),zt=D.colorSpace===fu||Pe===bt?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,D.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,D.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,zt);let $e=b(D.image,!1,r.maxTextureSize);$e=Le(D,$e);const at=s.convert(D.format,D.colorSpace),nn=s.convert(D.type);let ft,ut=M(D.internalFormat,at,nn,D.colorSpace,D.isVideoTexture);Ce(ve,D);const Un=D.mipmaps,$n=!0!==D.isVideoTexture&&ut!==wH,si=void 0===Ft.__version||!0===Me,ni=Te.dataReady,Ii=x(D,$e);if(D.isDepthTexture)ut=i.DEPTH_COMPONENT16,D.type===al?ut=i.DEPTH_COMPONENT32F:D.type===Km?ut=i.DEPTH_COMPONENT24:D.type===sb&&(ut=i.DEPTH24_STENCIL8),si&&($n?e.texStorage2D(i.TEXTURE_2D,1,ut,$e.width,$e.height):e.texImage2D(i.TEXTURE_2D,0,ut,$e.width,$e.height,0,at,nn,null));else if(D.isDataTexture)if(Un.length>0){$n&&si&&e.texStorage2D(i.TEXTURE_2D,Ii,ut,Un[0].width,Un[0].height);for(let St=0,H=Un.length;St>=1,H>>=1}}else if(Un.length>0){if($n&&si){const St=Be(Un[0]);e.texStorage2D(i.TEXTURE_2D,Ii,ut,St.width,St.height)}for(let St=0,H=Un.length;St>Te),at=Math.max(1,D.height>>Te);Me===i.TEXTURE_3D||Me===i.TEXTURE_2D_ARRAY?e.texImage3D(Me,Te,bt,$e,at,D.depth,0,Ft,Pe,null):e.texImage2D(Me,Te,bt,$e,at,0,Ft,Pe,null)}e.bindFramebuffer(i.FRAMEBUFFER,N),Se(D)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,ve,Me,n.get(ne).__webglTexture,0,Ae(D)):(Me===i.TEXTURE_2D||Me>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Me<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,ve,Me,n.get(ne).__webglTexture,Te),e.bindFramebuffer(i.FRAMEBUFFER,null)}function Oe(N,D,ne){if(i.bindRenderbuffer(i.RENDERBUFFER,N),D.depthBuffer&&!D.stencilBuffer){let ve=i.DEPTH_COMPONENT24;if(ne||Se(D)){const Me=D.depthTexture;Me&&Me.isDepthTexture&&(Me.type===al?ve=i.DEPTH_COMPONENT32F:Me.type===Km&&(ve=i.DEPTH_COMPONENT24));const Te=Ae(D);Se(D)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Te,ve,D.width,D.height):i.renderbufferStorageMultisample(i.RENDERBUFFER,Te,ve,D.width,D.height)}else i.renderbufferStorage(i.RENDERBUFFER,ve,D.width,D.height);i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,N)}else if(D.depthBuffer&&D.stencilBuffer){const ve=Ae(D);ne&&!1===Se(D)?i.renderbufferStorageMultisample(i.RENDERBUFFER,ve,i.DEPTH24_STENCIL8,D.width,D.height):Se(D)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,ve,i.DEPTH24_STENCIL8,D.width,D.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,D.width,D.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,N)}else{const ve=D.textures;for(let Me=0;Me0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==D.__useRenderToTexture}function Le(N,D){const ne=N.colorSpace,ve=N.format,Me=N.type;return!0===N.isCompressedTexture||!0===N.isVideoTexture||ne!==ls&&ne!==fu&&(ti.getTransfer(ne)===wi?(ve!==Sa||Me!==hu)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),D}function Be(N){return typeof HTMLImageElement<"u"&&N instanceof HTMLImageElement?(c.width=N.naturalWidth||N.width,c.height=N.naturalHeight||N.height):typeof VideoFrame<"u"&&N instanceof VideoFrame?(c.width=N.displayWidth,c.height=N.displayHeight):(c.width=N.width,c.height=N.height),c}this.allocateTextureUnit=function X(){const N=I;return N>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+N+" texture units while this GPU supports only "+r.maxTextures),I+=1,N},this.resetTextureUnits=function E(){I=0},this.setTexture2D=W,this.setTexture2DArray=function ie(N,D){const ne=n.get(N);N.version>0&&ne.__version!==N.version?_t(ne,N,D):e.bindTexture(i.TEXTURE_2D_ARRAY,ne.__webglTexture,i.TEXTURE0+D)},this.setTexture3D=function pe(N,D){const ne=n.get(N);N.version>0&&ne.__version!==N.version?_t(ne,N,D):e.bindTexture(i.TEXTURE_3D,ne.__webglTexture,i.TEXTURE0+D)},this.setTextureCube=function Q(N,D){const ne=n.get(N);N.version>0&&ne.__version!==N.version?function Qt(N,D,ne){if(6!==D.image.length)return;const ve=Ge(N,D),Me=D.source;e.bindTexture(i.TEXTURE_CUBE_MAP,N.__webglTexture,i.TEXTURE0+ne);const Te=n.get(Me);if(Me.version!==Te.__version||!0===ve){e.activeTexture(i.TEXTURE0+ne);const Ft=ti.getPrimaries(ti.workingColorSpace),Pe=D.colorSpace===fu?null:ti.getPrimaries(D.colorSpace),bt=D.colorSpace===fu||Ft===Pe?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,D.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,D.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,bt);const zt=D.isCompressedTexture||D.image[0].isCompressedTexture,$e=D.image[0]&&D.image[0].isDataTexture,at=[];for(let H=0;H<6;H++)at[H]=zt||$e?$e?D.image[H].image:D.image[H]:b(D.image[H],!0,r.maxCubemapSize),at[H]=Le(D,at[H]);const nn=at[0],ut=s.convert(D.format,D.colorSpace),ft=s.convert(D.type),Un=M(D.internalFormat,ut,ft,D.colorSpace),$n=!0!==D.isVideoTexture,si=void 0===Te.__version||!0===ve,ni=Me.dataReady;let St,Ii=x(D,nn);if(Ce(i.TEXTURE_CUBE_MAP,D),zt){$n&&si&&e.texStorage2D(i.TEXTURE_CUBE_MAP,Ii,Un,nn.width,nn.height);for(let H=0;H<6;H++){St=at[H].mipmaps;for(let Xe=0;Xe0&&Ii++;const H=Be(at[0]);e.texStorage2D(i.TEXTURE_CUBE_MAP,Ii,Un,H.width,H.height)}for(let H=0;H<6;H++)if($e){$n?ni&&e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,0,0,0,at[H].width,at[H].height,ut,ft,at[H].data):e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+H,0,Un,at[H].width,at[H].height,0,ut,ft,at[H].data);for(let Xe=0;Xe1;if(Ft||(void 0===ve.__webglTexture&&(ve.__webglTexture=i.createTexture()),ve.__version=D.version,o.memory.textures++),Te){ne.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(D.mipmaps&&D.mipmaps.length>0){ne.__webglFramebuffer[Pe]=[];for(let bt=0;bt0){ne.__webglFramebuffer=[];for(let Pe=0;Pe0&&!1===Se(N)){ne.__webglMultisampledFramebuffer=i.createFramebuffer(),ne.__webglColorRenderbuffer=[],e.bindFramebuffer(i.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Pe=0;Pe0)for(let bt=0;bt0)for(let bt=0;bt0&&!1===Se(N)){const D=N.textures,ne=N.width,ve=N.height;let Me=i.COLOR_BUFFER_BIT;const Te=[],Ft=N.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Pe=n.get(N),bt=D.length>1;if(bt)for(let zt=0;ztm+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&p<=m-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==l&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),null!==s&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));null!==a&&(r=e.getPose(t.targetRaySpace,n),null===r&&null!==s&&(r=s),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent($de)))}return null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),null!==c&&(c.visible=null!==o),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const n=new Yo;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Yde{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new Ea;t.properties.get(r).__webglTexture=e.texture,(e.depthNear!=n.depthNear||e.depthFar!=n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=r}}render(t,e){if(null!==this.texture){if(null===this.mesh){const n=e.cameras[0].viewport,r=new od({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new qn(new af(20,20),r)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}}class qde extends ng{constructor(t,e){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,p=null,m=null,g=null;const b=new Yde,v=e.getContextAttributes();let y=null,M=null;const x=[],C=[],O=new we;let T=null;const P=new mr;P.layers.enable(1),P.viewport=new oi;const B=new mr;B.layers.enable(2),B.viewport=new oi;const I=[P,B],E=new Gde;E.layers.enable(1),E.layers.enable(2);let X=null,re=null;function W(se){const Oe=C.indexOf(se.inputSource);if(-1===Oe)return;const qe=x[Oe];void 0!==qe&&(qe.update(se.inputSource,se.frame,c||o),qe.dispatchEvent({type:se.type,data:se.inputSource}))}function ie(){r.removeEventListener("select",W),r.removeEventListener("selectstart",W),r.removeEventListener("selectend",W),r.removeEventListener("squeeze",W),r.removeEventListener("squeezestart",W),r.removeEventListener("squeezeend",W),r.removeEventListener("end",ie),r.removeEventListener("inputsourceschange",pe);for(let se=0;se=0&&(C[Re]=null,x[Re].disconnect(qe))}for(let Oe=0;Oe=C.length){C.push(qe),Re=yt;break}if(null===C[yt]){C[yt]=qe,Re=yt;break}}if(-1===Re)break}const ht=x[Re];ht&&ht.connect(qe)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(se){let Oe=x[se];return void 0===Oe&&(Oe=new Ik,x[se]=Oe),Oe.getTargetRaySpace()},this.getControllerGrip=function(se){let Oe=x[se];return void 0===Oe&&(Oe=new Ik,x[se]=Oe),Oe.getGripSpace()},this.getHand=function(se){let Oe=x[se];return void 0===Oe&&(Oe=new Ik,x[se]=Oe),Oe.getHandSpace()},this.setFramebufferScaleFactor=function(se){s=se,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(se){a=se,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(se){c=se},this.getBaseLayer=function(){return null!==p?p:m},this.getBinding=function(){return h},this.getFrame=function(){return g},this.getSession=function(){return r},this.setSession=function(){var se=vt(function*(Oe){if(r=Oe,null!==r){if(y=t.getRenderTarget(),r.addEventListener("select",W),r.addEventListener("selectstart",W),r.addEventListener("selectend",W),r.addEventListener("squeeze",W),r.addEventListener("squeezestart",W),r.addEventListener("squeezeend",W),r.addEventListener("end",ie),r.addEventListener("inputsourceschange",pe),!0!==v.xrCompatible&&(yield e.makeXRCompatible()),T=t.getPixelRatio(),t.getSize(O),void 0===r.renderState.layers)m=new XRWebGLLayer(r,e,{antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:s}),r.updateRenderState({baseLayer:m}),t.setPixelRatio(1),t.setSize(m.framebufferWidth,m.framebufferHeight,!1),M=new Qh(m.framebufferWidth,m.framebufferHeight,{format:Sa,type:hu,colorSpace:t.outputColorSpace,stencilBuffer:v.stencil});else{let qe=null,Re=null,ht=null;v.depth&&(ht=v.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,qe=v.stencil?ob:Zm,Re=v.stencil?sb:Km);const yt={colorFormat:e.RGBA8,depthFormat:ht,scaleFactor:s};h=new XRWebGLBinding(r,e),p=h.createProjectionLayer(yt),r.updateRenderState({layers:[p]}),t.setPixelRatio(1),t.setSize(p.textureWidth,p.textureHeight,!1),M=new Qh(p.textureWidth,p.textureHeight,{format:Sa,type:hu,depthTexture:new I4(p.textureWidth,p.textureHeight,Re,void 0,void 0,void 0,void 0,void 0,void 0,qe),stencilBuffer:v.stencil,colorSpace:t.outputColorSpace,samples:v.antialias?4:0}),t.properties.get(M).__ignoreDepthValues=p.ignoreDepthValues}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),Qt.setContext(r),Qt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}});return function(Oe){return se.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const Q=new L,ue=new L;function ge(se,Oe){null===Oe?se.matrixWorld.copy(se.matrix):se.matrixWorld.multiplyMatrices(Oe.matrixWorld,se.matrix),se.matrixWorldInverse.copy(se.matrixWorld).invert()}this.updateCamera=function(se){if(null===r)return;null!==b.texture&&(se.near=b.depthNear,se.far=b.depthFar),E.near=B.near=P.near=se.near,E.far=B.far=P.far=se.far,(X!==E.near||re!==E.far)&&(r.updateRenderState({depthNear:E.near,depthFar:E.far}),X=E.near,re=E.far,P.near=X,P.far=re,B.near=X,B.far=re,P.updateProjectionMatrix(),B.updateProjectionMatrix(),se.updateProjectionMatrix());const Oe=se.parent,qe=E.cameras;ge(E,Oe);for(let Re=0;Re0&&(v.alphaTest.value=y.alphaTest);const M=t.get(y),x=M.envMap,C=M.envMapRotation;if(x&&(v.envMap.value=x,uf.copy(C),uf.x*=-1,uf.y*=-1,uf.z*=-1,x.isCubeTexture&&!1===x.isRenderTargetTexture&&(uf.y*=-1,uf.z*=-1),v.envMapRotation.value.setFromMatrix4(Xde.makeRotationFromEuler(uf)),v.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,v.reflectivity.value=y.reflectivity,v.ior.value=y.ior,v.refractionRatio.value=y.refractionRatio),y.lightMap){v.lightMap.value=y.lightMap;const O=!0===i._useLegacyLights?Math.PI:1;v.lightMapIntensity.value=y.lightMapIntensity*O,e(y.lightMap,v.lightMapTransform)}y.aoMap&&(v.aoMap.value=y.aoMap,v.aoMapIntensity.value=y.aoMapIntensity,e(y.aoMap,v.aoMapTransform))}return{refreshFogUniforms:function n(v,y){y.color.getRGB(v.fogColor.value,y4(i)),y.isFog?(v.fogNear.value=y.near,v.fogFar.value=y.far):y.isFogExp2&&(v.fogDensity.value=y.density)},refreshMaterialUniforms:function r(v,y,M,x,C){y.isMeshBasicMaterial||y.isMeshLambertMaterial?s(v,y):y.isMeshToonMaterial?(s(v,y),function h(v,y){y.gradientMap&&(v.gradientMap.value=y.gradientMap)}(v,y)):y.isMeshPhongMaterial?(s(v,y),function u(v,y){v.specular.value.copy(y.specular),v.shininess.value=Math.max(y.shininess,1e-4)}(v,y)):y.isMeshStandardMaterial?(s(v,y),function p(v,y){v.metalness.value=y.metalness,y.metalnessMap&&(v.metalnessMap.value=y.metalnessMap,e(y.metalnessMap,v.metalnessMapTransform)),v.roughness.value=y.roughness,y.roughnessMap&&(v.roughnessMap.value=y.roughnessMap,e(y.roughnessMap,v.roughnessMapTransform)),y.envMap&&(v.envMapIntensity.value=y.envMapIntensity)}(v,y),y.isMeshPhysicalMaterial&&function m(v,y,M){v.ior.value=y.ior,y.sheen>0&&(v.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),v.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(v.sheenColorMap.value=y.sheenColorMap,e(y.sheenColorMap,v.sheenColorMapTransform)),y.sheenRoughnessMap&&(v.sheenRoughnessMap.value=y.sheenRoughnessMap,e(y.sheenRoughnessMap,v.sheenRoughnessMapTransform))),y.clearcoat>0&&(v.clearcoat.value=y.clearcoat,v.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(v.clearcoatMap.value=y.clearcoatMap,e(y.clearcoatMap,v.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,e(y.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(v.clearcoatNormalMap.value=y.clearcoatNormalMap,e(y.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===bo&&v.clearcoatNormalScale.value.negate())),y.iridescence>0&&(v.iridescence.value=y.iridescence,v.iridescenceIOR.value=y.iridescenceIOR,v.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(v.iridescenceMap.value=y.iridescenceMap,e(y.iridescenceMap,v.iridescenceMapTransform)),y.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=y.iridescenceThicknessMap,e(y.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),y.transmission>0&&(v.transmission.value=y.transmission,v.transmissionSamplerMap.value=M.texture,v.transmissionSamplerSize.value.set(M.width,M.height),y.transmissionMap&&(v.transmissionMap.value=y.transmissionMap,e(y.transmissionMap,v.transmissionMapTransform)),v.thickness.value=y.thickness,y.thicknessMap&&(v.thicknessMap.value=y.thicknessMap,e(y.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=y.attenuationDistance,v.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(v.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(v.anisotropyMap.value=y.anisotropyMap,e(y.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=y.specularIntensity,v.specularColor.value.copy(y.specularColor),y.specularColorMap&&(v.specularColorMap.value=y.specularColorMap,e(y.specularColorMap,v.specularColorMapTransform)),y.specularIntensityMap&&(v.specularIntensityMap.value=y.specularIntensityMap,e(y.specularIntensityMap,v.specularIntensityMapTransform))}(v,y,C)):y.isMeshMatcapMaterial?(s(v,y),function g(v,y){y.matcap&&(v.matcap.value=y.matcap)}(v,y)):y.isMeshDepthMaterial?s(v,y):y.isMeshDistanceMaterial?(s(v,y),function b(v,y){const M=t.get(y).light;v.referencePosition.value.setFromMatrixPosition(M.matrixWorld),v.nearDistance.value=M.shadow.camera.near,v.farDistance.value=M.shadow.camera.far}(v,y)):y.isMeshNormalMaterial?s(v,y):y.isLineBasicMaterial?(function o(v,y){v.diffuse.value.copy(y.color),v.opacity.value=y.opacity,y.map&&(v.map.value=y.map,e(y.map,v.mapTransform))}(v,y),y.isLineDashedMaterial&&function a(v,y){v.dashSize.value=y.dashSize,v.totalSize.value=y.dashSize+y.gapSize,v.scale.value=y.scale}(v,y)):y.isPointsMaterial?function l(v,y,M,x){v.diffuse.value.copy(y.color),v.opacity.value=y.opacity,v.size.value=y.size*M,v.scale.value=.5*x,y.map&&(v.map.value=y.map,e(y.map,v.uvTransform)),y.alphaMap&&(v.alphaMap.value=y.alphaMap,e(y.alphaMap,v.alphaMapTransform)),y.alphaTest>0&&(v.alphaTest.value=y.alphaTest)}(v,y,M,x):y.isSpriteMaterial?function c(v,y){v.diffuse.value.copy(y.color),v.opacity.value=y.opacity,v.rotation.value=y.rotation,y.map&&(v.map.value=y.map,e(y.map,v.mapTransform)),y.alphaMap&&(v.alphaMap.value=y.alphaMap,e(y.alphaMap,v.alphaMapTransform)),y.alphaTest>0&&(v.alphaTest.value=y.alphaTest)}(v,y):y.isShadowMaterial?(v.color.value.copy(y.color),v.opacity.value=y.opacity):y.isShaderMaterial&&(y.uniformsNeedUpdate=!1)}}}function Zde(i,t,e,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function m(M,x,C,O){const T=M.value,P=x+"_"+C;if(void 0===O[P])return O[P]="number"==typeof T||"boolean"==typeof T?T:T.clone(),!0;{const B=O[P];if("number"==typeof T||"boolean"==typeof T){if(B!==T)return O[P]=T,!0}else if(!1===B.equals(T))return B.copy(T),!0}return!1}function b(M){const x={boundary:0,storage:0};return"number"==typeof M||"boolean"==typeof M?(x.boundary=4,x.storage=4):M.isVector2?(x.boundary=8,x.storage=8):M.isVector3||M.isColor?(x.boundary=16,x.storage=12):M.isVector4?(x.boundary=16,x.storage=16):M.isMatrix3?(x.boundary=48,x.storage=48):M.isMatrix4?(x.boundary=64,x.storage=64):M.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",M),x}function v(M){const x=M.target;x.removeEventListener("dispose",v);const C=o.indexOf(x.__bindingPointIndex);o.splice(C,1),i.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}return{bind:function l(M,x){n.uniformBlockBinding(M,x.program)},update:function c(M,x){let C=r[M.id];void 0===C&&(function g(M){const x=M.uniforms;let C=0;for(let P=0,B=x.length;P0&&(C+=16-T),M.__size=C,M.__cache={}}(M),C=function u(M){const x=function h(){for(let M=0;M0),yn=!!ce.morphAttributes.position,nr=!!ce.morphAttributes.normal,Ko=!!ce.morphAttributes.color;let Xr=uu;de.toneMapped&&(null===P||!0===P.isXRRenderTarget)&&(Xr=x.toneMapping);const dd=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,Vi=void 0!==dd?dd.length:0,Mn=N.get(de),QP=v.state.lights;!0!==se||!0!==Oe&&F===I||at.setState(de,F,F===I&&de.id===B);let ki=!1;de.version===Mn.__version?(Mn.needsLights&&Mn.lightsStateVersion!==QP.state.version||Mn.outputColorSpace!==Gt||le.isBatchedMesh&&!1===Mn.batching||!le.isBatchedMesh&&!0===Mn.batching||le.isInstancedMesh&&!1===Mn.instancing||!le.isInstancedMesh&&!0===Mn.instancing||le.isSkinnedMesh&&!1===Mn.skinning||!le.isSkinnedMesh&&!0===Mn.skinning||le.isInstancedMesh&&!0===Mn.instancingColor&&null===le.instanceColor||le.isInstancedMesh&&!1===Mn.instancingColor&&null!==le.instanceColor||le.isInstancedMesh&&!0===Mn.instancingMorph&&null===le.morphTexture||le.isInstancedMesh&&!1===Mn.instancingMorph&&null!==le.morphTexture||Mn.envMap!==Jt||!0===de.fog&&Mn.fog!==tt||void 0!==Mn.numClippingPlanes&&(Mn.numClippingPlanes!==at.numPlanes||Mn.numIntersection!==at.numIntersection)||Mn.vertexAlphas!==vn||Mn.vertexTangents!==fn||Mn.morphTargets!==yn||Mn.morphNormals!==nr||Mn.morphColors!==Ko||Mn.toneMapping!==Xr||Mn.morphTargetsCount!==Vi)&&(ki=!0):(ki=!0,Mn.__version=de.version);let Pf=Mn.currentProgram;!0===ki&&(Pf=hE(de,te,le));let O8=!1,Hb=!1,JP=!1;const Ts=Pf.getUniforms(),Du=Mn.uniforms;if(Le.useProgram(Pf.program)&&(O8=!0,Hb=!0,JP=!0),de.id!==B&&(B=de.id,Hb=!0),O8||I!==F){Ts.setValue(ee,"projectionMatrix",F.projectionMatrix),Ts.setValue(ee,"viewMatrix",F.matrixWorldInverse);const Oa=Ts.map.cameraPosition;void 0!==Oa&&Oa.setValue(ee,ht.setFromMatrixPosition(F.matrixWorld)),Ue.logarithmicDepthBuffer&&Ts.setValue(ee,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(de.isMeshPhongMaterial||de.isMeshToonMaterial||de.isMeshLambertMaterial||de.isMeshBasicMaterial||de.isMeshStandardMaterial||de.isShaderMaterial)&&Ts.setValue(ee,"isOrthographic",!0===F.isOrthographicCamera),I!==F&&(I=F,Hb=!0,JP=!0)}if(le.isSkinnedMesh){Ts.setOptional(ee,le,"bindMatrix"),Ts.setOptional(ee,le,"bindMatrixInverse");const Oa=le.skeleton;Oa&&(null===Oa.boneTexture&&Oa.computeBoneTexture(),Ts.setValue(ee,"boneTexture",Oa.boneTexture,D))}le.isBatchedMesh&&(Ts.setOptional(ee,le,"batchingTexture"),Ts.setValue(ee,"batchingTexture",le._matricesTexture,D));const eO=ce.morphAttributes;if((void 0!==eO.position||void 0!==eO.normal||void 0!==eO.color)&&ft.update(le,ce,Pf),(Hb||Mn.receiveShadow!==le.receiveShadow)&&(Mn.receiveShadow=le.receiveShadow,Ts.setValue(ee,"receiveShadow",le.receiveShadow)),de.isMeshGouraudMaterial&&null!==de.envMap&&(Du.envMap.value=Jt,Du.flipEnvMap.value=Jt.isCubeTexture&&!1===Jt.isRenderTargetTexture?-1:1),de.isMeshStandardMaterial&&null===de.envMap&&null!==te.environment&&(Du.envMapIntensity.value=te.environmentIntensity),Hb&&(Ts.setValue(ee,"toneMappingExposure",x.toneMappingExposure),Mn.needsLights&&function k_e(F,te){F.ambientLightColor.needsUpdate=te,F.lightProbe.needsUpdate=te,F.directionalLights.needsUpdate=te,F.directionalLightShadows.needsUpdate=te,F.pointLights.needsUpdate=te,F.pointLightShadows.needsUpdate=te,F.spotLights.needsUpdate=te,F.spotLightShadows.needsUpdate=te,F.rectAreaLights.needsUpdate=te,F.hemisphereLights.needsUpdate=te}(Du,JP),tt&&!0===de.fog&&bt.refreshFogUniforms(Du,tt),bt.refreshMaterialUniforms(Du,de,ue,Q,v.state.transmissionRenderTarget),sS.upload(ee,k8(Mn),Du,D)),de.isShaderMaterial&&!0===de.uniformsNeedUpdate&&(sS.upload(ee,k8(Mn),Du,D),de.uniformsNeedUpdate=!1),de.isSpriteMaterial&&Ts.setValue(ee,"center",le.center),Ts.setValue(ee,"modelViewMatrix",le.modelViewMatrix),Ts.setValue(ee,"normalMatrix",le.normalMatrix),Ts.setValue(ee,"modelMatrix",le.matrixWorld),de.isShaderMaterial||de.isRawShaderMaterial){const Oa=de.uniformsGroups;for(let tO=0,O_e=Oa.length;tO{function tt(){de.forEach(function(xt){N.get(xt).currentProgram.isReady()&&de.delete(xt)}),0!==de.size?setTimeout(tt,10):le(F)}null!==Se.get("KHR_parallel_shader_compile")?tt():setTimeout(tt,10)})};let Ds=null;function rc(){kf.stop()}function sc(){kf.start()}const kf=new w4;function T8(F,te,ce,de){if(!1===F.visible)return;if(F.layers.test(te.layers))if(F.isGroup)ce=F.renderOrder;else if(F.isLOD)!0===F.autoUpdate&&F.update(te);else if(F.isLight)v.pushLight(F),F.castShadow&&v.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||Qt.intersectsSprite(F)){de&&ht.setFromMatrixPosition(F.matrixWorld).applyMatrix4(qe);const xt=Ft.update(F),Gt=F.material;Gt.visible&&b.push(F,xt,Gt,ce,ht.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||Qt.intersectsObject(F))){const xt=Ft.update(F),Gt=F.material;if(de&&(void 0!==F.boundingSphere?(null===F.boundingSphere&&F.computeBoundingSphere(),ht.copy(F.boundingSphere.center)):(null===xt.boundingSphere&&xt.computeBoundingSphere(),ht.copy(xt.boundingSphere.center)),ht.applyMatrix4(F.matrixWorld).applyMatrix4(qe)),Array.isArray(Gt)){const Jt=xt.groups;for(let vn=0,fn=Jt.length;vn0&&function I_e(F,te,ce,de){if(null!==(!0===ce.isScene?ce.overrideMaterial:null))return;null===v.state.transmissionRenderTarget&&(v.state.transmissionRenderTarget=new Qh(1,1,{generateMipmaps:!0,type:Se.has("EXT_color_buffer_half_float")||Se.has("EXT_color_buffer_float")?EC:hu,minFilter:ol,samples:4,stencilBuffer:s}),N.get(v.state.transmissionRenderTarget).__isTransmissionRenderTarget=!0);const tt=v.state.transmissionRenderTarget;x.getDrawingBufferSize(Re),tt.setSize(Re.x,Re.y);const xt=x.getRenderTarget();x.setRenderTarget(tt),x.getClearColor(W),ie=x.getClearAlpha(),ie<1&&x.setClearColor(16777215,.5),x.clear();const Gt=x.toneMapping;x.toneMapping=uu,uE(F,ce,de),D.updateMultisampleRenderTarget(tt),D.updateRenderTargetMipmap(tt);let Jt=!1;for(let vn=0,fn=te.length;vn0&&uE(le,te,ce),tt.length>0&&uE(tt,te,ce),xt.length>0&&uE(xt,te,ce),Le.buffers.depth.setTest(!0),Le.buffers.depth.setMask(!0),Le.buffers.color.setMask(!0),Le.setPolygonOffset(!1)}function uE(F,te,ce){const de=!0===te.isScene?te.overrideMaterial:null;for(let le=0,tt=F.length;le0?M[M.length-1]:null,y.pop(),b=y.length>0?y[y.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return O},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(F,te,ce){N.get(F.texture).__webglTexture=te,N.get(F.depthTexture).__webglTexture=ce;const de=N.get(F);de.__hasExternalTextures=!0,de.__autoAllocateDepthBuffer=void 0===ce,de.__autoAllocateDepthBuffer||!0===Se.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),de.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,te){const ce=N.get(F);ce.__webglFramebuffer=te,ce.__useDefaultFramebuffer=void 0===te},this.setRenderTarget=function(F,te=0,ce=0){P=F,O=te,T=ce;let de=!0,le=null,tt=!1,xt=!1;if(F){const Jt=N.get(F);void 0!==Jt.__useDefaultFramebuffer?(Le.bindFramebuffer(ee.FRAMEBUFFER,null),de=!1):void 0===Jt.__webglFramebuffer?D.setupRenderTarget(F):Jt.__hasExternalTextures&&D.rebindTextures(F,N.get(F.texture).__webglTexture,N.get(F.depthTexture).__webglTexture);const vn=F.texture;(vn.isData3DTexture||vn.isDataArrayTexture||vn.isCompressedArrayTexture)&&(xt=!0);const fn=N.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(le=Array.isArray(fn[te])?fn[te][ce]:fn[te],tt=!0):le=F.samples>0&&!1===D.useMultisampledRTT(F)?N.get(F).__webglMultisampledFramebuffer:Array.isArray(fn)?fn[ce]:fn,E.copy(F.viewport),X.copy(F.scissor),re=F.scissorTest}else E.copy(Ce).multiplyScalar(ue).floor(),X.copy(Ge).multiplyScalar(ue).floor(),re=_t;if(Le.bindFramebuffer(ee.FRAMEBUFFER,le)&&de&&Le.drawBuffers(F,le),Le.viewport(E),Le.scissor(X),Le.setScissorTest(re),tt){const Jt=N.get(F.texture);ee.framebufferTexture2D(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0,ee.TEXTURE_CUBE_MAP_POSITIVE_X+te,Jt.__webglTexture,ce)}else if(xt){const Jt=N.get(F.texture);ee.framebufferTextureLayer(ee.FRAMEBUFFER,ee.COLOR_ATTACHMENT0,Jt.__webglTexture,ce||0,te||0)}B=-1},this.readRenderTargetPixels=function(F,te,ce,de,le,tt,xt){if(!F||!F.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Gt=N.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&void 0!==xt&&(Gt=Gt[xt]),Gt){Le.bindFramebuffer(ee.FRAMEBUFFER,Gt);try{const Jt=F.texture,vn=Jt.format,fn=Jt.type;if(vn!==Sa&&si.convert(vn)!==ee.getParameter(ee.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const yn=fn===EC&&(Se.has("EXT_color_buffer_half_float")||Se.has("EXT_color_buffer_float"));if(fn!==hu&&si.convert(fn)!==ee.getParameter(ee.IMPLEMENTATION_COLOR_READ_TYPE)&&fn!==al&&!yn)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");te>=0&&te<=F.width-de&&ce>=0&&ce<=F.height-le&&ee.readPixels(te,ce,de,le,si.convert(vn),si.convert(fn),tt)}finally{const Jt=null!==P?N.get(P).__webglFramebuffer:null;Le.bindFramebuffer(ee.FRAMEBUFFER,Jt)}}},this.copyFramebufferToTexture=function(F,te,ce=0){const de=Math.pow(2,-ce),le=Math.floor(te.image.width*de),tt=Math.floor(te.image.height*de);D.setTexture2D(te,0),ee.copyTexSubImage2D(ee.TEXTURE_2D,ce,0,0,F.x,F.y,le,tt),Le.unbindTexture()},this.copyTextureToTexture=function(F,te,ce,de=0){const le=te.image.width,tt=te.image.height,xt=si.convert(ce.format),Gt=si.convert(ce.type);D.setTexture2D(ce,0),ee.pixelStorei(ee.UNPACK_FLIP_Y_WEBGL,ce.flipY),ee.pixelStorei(ee.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),ee.pixelStorei(ee.UNPACK_ALIGNMENT,ce.unpackAlignment),te.isDataTexture?ee.texSubImage2D(ee.TEXTURE_2D,de,F.x,F.y,le,tt,xt,Gt,te.image.data):te.isCompressedTexture?ee.compressedTexSubImage2D(ee.TEXTURE_2D,de,F.x,F.y,te.mipmaps[0].width,te.mipmaps[0].height,xt,te.mipmaps[0].data):ee.texSubImage2D(ee.TEXTURE_2D,de,F.x,F.y,xt,Gt,te.image),0===de&&ce.generateMipmaps&&ee.generateMipmap(ee.TEXTURE_2D),Le.unbindTexture()},this.copyTextureToTexture3D=function(F,te,ce,de,le=0){const tt=Math.round(F.max.x-F.min.x),xt=Math.round(F.max.y-F.min.y),Gt=F.max.z-F.min.z+1,Jt=si.convert(de.format),vn=si.convert(de.type);let fn;if(de.isData3DTexture)D.setTexture3D(de,0),fn=ee.TEXTURE_3D;else{if(!de.isDataArrayTexture&&!de.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");D.setTexture2DArray(de,0),fn=ee.TEXTURE_2D_ARRAY}ee.pixelStorei(ee.UNPACK_FLIP_Y_WEBGL,de.flipY),ee.pixelStorei(ee.UNPACK_PREMULTIPLY_ALPHA_WEBGL,de.premultiplyAlpha),ee.pixelStorei(ee.UNPACK_ALIGNMENT,de.unpackAlignment);const yn=ee.getParameter(ee.UNPACK_ROW_LENGTH),nr=ee.getParameter(ee.UNPACK_IMAGE_HEIGHT),Ko=ee.getParameter(ee.UNPACK_SKIP_PIXELS),Xr=ee.getParameter(ee.UNPACK_SKIP_ROWS),dd=ee.getParameter(ee.UNPACK_SKIP_IMAGES),Vi=ce.isCompressedTexture?ce.mipmaps[le]:ce.image;ee.pixelStorei(ee.UNPACK_ROW_LENGTH,Vi.width),ee.pixelStorei(ee.UNPACK_IMAGE_HEIGHT,Vi.height),ee.pixelStorei(ee.UNPACK_SKIP_PIXELS,F.min.x),ee.pixelStorei(ee.UNPACK_SKIP_ROWS,F.min.y),ee.pixelStorei(ee.UNPACK_SKIP_IMAGES,F.min.z),ce.isDataTexture||ce.isData3DTexture?ee.texSubImage3D(fn,le,te.x,te.y,te.z,tt,xt,Gt,Jt,vn,Vi.data):de.isCompressedArrayTexture?ee.compressedTexSubImage3D(fn,le,te.x,te.y,te.z,tt,xt,Gt,Jt,Vi.data):ee.texSubImage3D(fn,le,te.x,te.y,te.z,tt,xt,Gt,Jt,vn,Vi),ee.pixelStorei(ee.UNPACK_ROW_LENGTH,yn),ee.pixelStorei(ee.UNPACK_IMAGE_HEIGHT,nr),ee.pixelStorei(ee.UNPACK_SKIP_PIXELS,Ko),ee.pixelStorei(ee.UNPACK_SKIP_ROWS,Xr),ee.pixelStorei(ee.UNPACK_SKIP_IMAGES,dd),0===le&&de.generateMipmaps&&ee.generateMipmap(fn),Le.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?D.setTextureCube(F,0):F.isData3DTexture?D.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?D.setTexture2DArray(F,0):D.setTexture2D(F,0),Le.unbindTexture()},this.resetState=function(){O=0,T=0,P=null,Le.reset(),ni.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Qc}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===JR?"display-p3":"srgb",e.unpackColorSpace=ti.workingColorSpace===DC?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class oS extends jr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new td,this.environmentIntensity=1,this.environmentRotation=new td,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class Pk{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=35044,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=$o()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return QH("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let r=0,s=this.stride;rl)continue;p.applyMatrix4(this.matrixWorld);const B=t.ray.origin.distanceTo(p);Bt.far||e.push({distance:B,point:h.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}else for(let x=Math.max(0,o.start),C=Math.min(v.count,o.start+o.count)-1;xl)continue;p.applyMatrix4(this.matrixWorld);const T=t.ray.origin.distanceTo(p);Tt.far||e.push({distance:T,point:h.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=e[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:o})}}class ec{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,r=this.getPoint(0),s=0;e.push(0);for(let o=1;o<=t;o++)n=this.getPoint(o/t),s+=n.distanceTo(r),e.push(s),r=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const n=this.getLengths();let r=0;const s=n.length;let o;o=e||t*n[s-1];let c,a=0,l=s-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=n[r]-o,c<0)a=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(s-1);const u=n[r];return(r+(o-u)/(n[r+1]-u))/(s-1)}getTangent(t,e){let r=t-1e-4,s=t+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=e||(o.isVector2?new we:new L);return l.copy(a).sub(o).normalize(),l}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new L,r=[],s=[],o=[],a=new L,l=new It;for(let m=0;m<=t;m++)r[m]=this.getTangentAt(m/t,new L);s[0]=new L,o[0]=new L;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);u<=c&&(c=u,n.set(1,0,0)),h<=c&&(c=h,n.set(0,1,0)),p<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=t;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(ji(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,g))}o[m].crossVectors(r[m],s[m])}if(!0===e){let m=Math.acos(ji(s[0].dot(s[t]),-1,1));m/=t,r[0].dot(a.crossVectors(s[0],s[t]))>0&&(m=-m);for(let g=1;g<=t;g++)s[g].applyMatrix4(l.makeRotationAxis(r[g],m*g)),o[g].crossVectors(r[g],s[g])}return{tangents:r,normals:s,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Hk extends ec{constructor(t=0,e=0,n=1,r=1,s=0,o=2*Math.PI,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(t,e=new we){const n=e,r=2*Math.PI;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;sr.length-2?r.length-1:o+1],h=r[o>r.length-3?r.length-1:o+2];return n.set(S5(a,l.x,c.x,u.x,h.x),S5(a,l.y,c.y,u.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e0?0:(Math.floor(Math.abs(a)/s)+1)*s:0===l&&a===s-1&&(a=s-2,l=1),this.closed||a>0?c=r[(a-1)%s]:(yS.subVectors(r[0],r[1]).add(r[0]),c=yS);const h=r[a%s],p=r[(a+1)%s];if(this.closed||a+2=n){const o=r[s]-n,a=this.curves[s],l=a.getLength();return a.getPointAt(0===l?0:1-o/l,e)}s++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,r=this.curves.length;n1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e0){const h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class wS extends hn{constructor(t=[new we(0,-.5),new we(.5,0),new we(0,.5)],e=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e),r=ji(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],u=1/e,h=new L,p=new we,m=new L,g=new L,b=new L;let v=0,y=0;for(let M=0;M<=t.length-1;M++)switch(M){case 0:v=t[M+1].x-t[M].x,y=t[M+1].y-t[M].y,m.x=1*y,m.y=-v,m.z=0*y,b.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case t.length-1:l.push(b.x,b.y,b.z);break;default:v=t[M+1].x-t[M].x,y=t[M+1].y-t[M].y,m.x=1*y,m.y=-v,m.z=0*y,g.copy(m),m.x+=b.x,m.y+=b.y,m.z+=b.z,m.normalize(),l.push(m.x,m.y,m.z),b.copy(g)}for(let M=0;M<=e;M++){const x=n+M*u*r,C=Math.sin(x),O=Math.cos(x);for(let T=0;T<=t.length-1;T++)h.x=t[T].x*C,h.y=t[T].y,h.z=t[T].x*O,o.push(h.x,h.y,h.z),p.x=M/e,p.y=T/(t.length-1),a.push(p.x,p.y),c.push(l[3*T+0]*C,l[3*T+1],l[3*T+0]*O)}for(let M=0;M0&&x(!0),e>0&&x(!1)),this.setIndex(u),this.setAttribute("position",new st(h,3)),this.setAttribute("normal",new st(p,3)),this.setAttribute("uv",new st(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Og(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class CS extends Og{constructor(t=1,e=1,n=32,r=1,s=!1,o=0,a=2*Math.PI){super(0,t,e,n,r,s,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(t){return new CS(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Tb extends hn{constructor(t=1,e=32,n=16,r=0,s=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},e=Math.max(3,Math.floor(e)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let c=0;const u=[],h=new L,p=new L,m=[],g=[],b=[],v=[];for(let y=0;y<=n;y++){const M=[],x=y/n;let C=0;0===y&&0===o?C=.5/e:y===n&&l===Math.PI&&(C=-.5/e);for(let O=0;O<=e;O++){const T=O/e;h.x=-t*Math.cos(r+T*s)*Math.sin(o+x*a),h.y=t*Math.cos(o+x*a),h.z=t*Math.sin(r+T*s)*Math.sin(o+x*a),g.push(h.x,h.y,h.z),p.copy(h).normalize(),b.push(p.x,p.y,p.z),v.push(T+C,1-x),M.push(c++)}u.push(M)}for(let y=0;y0)&&m.push(u[y][M+1],C,T),(y!==n-1||l0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class kS extends xo{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new He(16777215),this.specular=new He(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kh,this.normalScale=new we(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new td,this.combine=MC,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}function yf(i,t,e){return!i||!e&&i.constructor===t?i:"number"==typeof t.BYTES_PER_ELEMENT?new t(i):Array.prototype.slice.call(i)}function V5(i){const e=i.length,n=new Array(e);for(let r=0;r!==e;++r)n[r]=r;return n.sort(function t(r,s){return i[r]-i[s]}),n}function oP(i,t,e){const n=i.length,r=new i.constructor(n);for(let s=0,o=0;o!==n;++s){const a=e[s]*t;for(let l=0;l!==t;++l)r[o++]=i[a+l]}return r}function aP(i,t,e,n){let r=1,s=i[0];for(;void 0!==s&&void 0===s[n];)s=i[r++];if(void 0===s)return;let o=s[n];if(void 0!==o)if(Array.isArray(o))do{o=s[n],void 0!==o&&(t.push(s.time),e.push.apply(e,o)),s=i[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[n],void 0!==o&&(t.push(s.time),o.toArray(e,e.length)),s=i[r++]}while(void 0!==s);else do{o=s[n],void 0!==o&&(t.push(s.time),e.push(o)),s=i[r++]}while(void 0!==s)}class Rb{constructor(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let n=this._cachedIndex,r=e[n],s=e[n-1];e:{t:{let o;n:{i:if(!(t=s)break e;{const a=e[1];t=s)break t}o=n,n=0}}for(;n>>1;te;)--o;if(++o,0!==s||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,r=this.values,s=n.length;0===s&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){const l=n[a];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(null!==o&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),t=!1;break}o=l}if(void 0!==r&&function U5(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),r=2302===this.getInterpolation(),s=t.length-1;let o=1;for(let a=1;a0){t[o]=t[s];for(let a=s*n,l=o*n,c=0;c!==n;++c)e[l+c]=e[a+c];++o}return o!==t.length?(this.times=t.slice(0,o),this.values=e.slice(0,o*n)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),r=new(0,this.constructor)(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}}nc.prototype.TimeBufferType=Float32Array,nc.prototype.ValueBufferType=Float32Array,nc.prototype.DefaultInterpolation=Qm;class Ng extends nc{}Ng.prototype.ValueTypeName="bool",Ng.prototype.ValueBufferType=Array,Ng.prototype.DefaultInterpolation=ab,Ng.prototype.InterpolantFactoryMethodLinear=void 0,Ng.prototype.InterpolantFactoryMethodSmooth=void 0;class H5 extends nc{}H5.prototype.ValueTypeName="color";class Bg extends nc{}Bg.prototype.ValueTypeName="number";class nhe extends Rb{constructor(t,e,n,r){super(t,e,n,r)}interpolate_(t,e,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-e)/(r-e);let c=t*a;for(let u=c+a;c!==u;c+=4)to.slerpFlat(s,0,o,c-a,o,c,l);return s}}class bf extends nc{InterpolantFactoryMethodLinear(t){return new nhe(this.times,this.values,this.getValueSize(),t)}}bf.prototype.ValueTypeName="quaternion",bf.prototype.DefaultInterpolation=Qm,bf.prototype.InterpolantFactoryMethodSmooth=void 0;class Ug extends nc{}Ug.prototype.ValueTypeName="string",Ug.prototype.ValueBufferType=Array,Ug.prototype.DefaultInterpolation=ab,Ug.prototype.InterpolantFactoryMethodLinear=void 0,Ug.prototype.InterpolantFactoryMethodSmooth=void 0;class Vg extends nc{}Vg.prototype.ValueTypeName="vector";class kb{constructor(t="",e=-1,n=[],r=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=$o(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,r=1/(t.fps||1);for(let o=0,a=n.length;o!==a;++o)e.push(rhe(n[o]).scale(r));const s=new this(t.name,t.duration,e,t.blendMode);return s.uuid=t.uuid,s}static toJSON(t){const e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let s=0,o=n.length;s!==o;++s)e.push(nc.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const s=e.length,o=[];for(let a=0;a1){const h=u[1];let p=r[h];p||(r[h]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],e,n));return o}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(h,p,m,g,b){if(0!==m.length){const v=[],y=[];aP(m,v,y,g),0!==v.length&&b.push(new h(p,v,y))}},r=[],s=t.name||"default",o=t.fps||30,a=t.blendMode;let l=t.length||-1;const c=t.hierarchy||[];for(let h=0;h{class i{constructor(e){this.manager=void 0!==e?e:$5,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const r=this;return new Promise(function(s,o){r.load(e,s,n,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}return i.DEFAULT_MATERIAL_NAME="__DEFAULT",i})();const ld={};class she extends Error{constructor(t,e){super(t),this.response=e}}class Ta extends xf{constructor(t){super(t)}load(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const s=xu.get(t);if(void 0!==s)return this.manager.itemStart(t),setTimeout(()=>{e&&e(s),this.manager.itemEnd(t)},0),s;if(void 0!==ld[t])return void ld[t].push({onLoad:e,onProgress:n,onError:r});ld[t]=[],ld[t].push({onLoad:e,onProgress:n,onError:r});const o=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(200===c.status||0===c.status){if(0===c.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===c.body||void 0===c.body.getReader)return c;const u=ld[t],h=c.body.getReader(),p=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),m=p?parseInt(p):0,g=0!==m;let b=0;const v=new ReadableStream({start(y){!function M(){h.read().then(({done:x,value:C})=>{if(x)y.close();else{b+=C.byteLength;const O=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let T=0,P=u.length;T{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>(new DOMParser).parseFromString(u,a));case"json":return c.json();default:if(void 0===a)return c.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),p=h&&h[1]?h[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(g=>m.decode(g))}}}).then(c=>{xu.add(t,c);const u=ld[t];delete ld[t];for(let h=0,p=u.length;h{const u=ld[t];if(void 0===u)throw this.manager.itemError(t),c;delete ld[t];for(let h=0,p=u.length;h{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class PS extends xf{constructor(t){super(t)}load(t,e,n,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const s=this,o=xu.get(t);if(void 0!==o)return s.manager.itemStart(t),setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o;const a=cb("img");function l(){u(),xu.add(t,this),e&&e(this),s.manager.itemEnd(t)}function c(h){u(),r&&r(h),s.manager.itemError(t),s.manager.itemEnd(t)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(t),a.src=t,a}}class OS extends xf{constructor(t){super(t)}load(t,e,n,r){const s=new Ea,o=new PS(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(a){s.image=a,s.needsUpdate=!0,void 0!==e&&e(s)},n,r),s}}class FS extends jr{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new He(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}const lP=new It,W5=new L,j5=new L;class cP{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new we(512,512),this.map=null,this.mapPass=null,this.matrix=new It,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new eS,this._frameExtents=new we(1,1),this._viewportCount=1,this._viewports=[new oi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;W5.setFromMatrixPosition(t.matrixWorld),e.position.copy(W5),j5.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(j5),e.updateMatrixWorld(),lP.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(lP),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(lP)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class ahe extends cP{constructor(){super(new mr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*ig*t.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=t.distance||e.far;(n!==e.fov||r!==e.aspect||s!==e.far)&&(e.fov=n,e.aspect=r,e.far=s,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class Y5 extends FS{constructor(t,e,n=0,r=Math.PI/3,s=0,o=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(jr.DEFAULT_UP),this.updateMatrix(),this.target=new jr,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new ahe}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const q5=new It,Pb=new L,dP=new L;class lhe extends cP{constructor(){super(new mr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new we(4,2),this._viewportCount=6,this._viewports=[new oi(2,1,1,1),new oi(0,1,1,1),new oi(3,1,1,1),new oi(1,1,1,1),new oi(3,0,1,1),new oi(1,0,1,1)],this._cubeDirections=[new L(1,0,0),new L(-1,0,0),new L(0,0,1),new L(0,0,-1),new L(0,1,0),new L(0,-1,0)],this._cubeUps=[new L(0,1,0),new L(0,1,0),new L(0,1,0),new L(0,1,0),new L(0,0,1),new L(0,0,-1)]}updateMatrices(t,e=0){const n=this.camera,r=this.matrix,s=t.distance||n.far;s!==n.far&&(n.far=s,n.updateProjectionMatrix()),Pb.setFromMatrixPosition(t.matrixWorld),n.position.copy(Pb),dP.copy(n.position),dP.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(dP),n.updateMatrixWorld(),r.makeTranslation(-Pb.x,-Pb.y,-Pb.z),q5.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(q5)}}class X5 extends FS{constructor(t,e,n=0,r=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new lhe}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class che extends cP{constructor(){super(new nS(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class K5 extends FS{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(jr.DEFAULT_UP),this.updateMatrix(),this.target=new jr,this.shadow=new che}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class uP extends FS{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class wu{static decodeText(t){if(typeof TextDecoder<"u")return(new TextDecoder).decode(t);let e="";for(let n=0,r=t.length;n"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const s=this,o=xu.get(t);if(void 0!==o)return s.manager.itemStart(t),o.then?void o.then(c=>{e&&e(c),s.manager.itemEnd(t)}).catch(c=>{r&&r(c)}):(setTimeout(function(){e&&e(o),s.manager.itemEnd(t)},0),o);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(t,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return xu.add(t,c),e&&e(c),s.manager.itemEnd(t),c}).catch(function(c){r&&r(c),xu.remove(t),s.manager.itemError(t),s.manager.itemEnd(t)});xu.add(t,l),s.manager.itemStart(t)}}const fP="\\[\\]\\.:\\/",xhe=new RegExp("["+fP+"]","g"),pP="[^"+fP+"]",whe="[^"+fP.replace("\\.","")+"]",Ahe=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",pP)+/(WCOD+)?/.source.replace("WCOD",whe)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",pP)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",pP)+"$"),Dhe=["material","materials","bones","map"];class The{constructor(t,e,n){const r=n||_i.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}getValue(t,e){this.bind();const r=this._bindings[this._targetGroup.nCachedObjects_];void 0!==r&&r.getValue(t,e)}setValue(t,e){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=n.length;r!==s;++r)n[r].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}let _i=(()=>{class i{constructor(e,n,r){this.path=n,this.parsedPath=r||i.parseTrackName(n),this.node=i.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new i.Composite(e,n,r):new i(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(xhe,"")}static parseTrackName(e){const n=Ahe.exec(e);if(null===n)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},s=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==s&&-1!==s){const o=r.nodeName.substring(s+1);-1!==Dhe.indexOf(o)&&(r.nodeName=r.nodeName.substring(0,s),r.objectName=o)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(void 0===n||""===n||"."===n||-1===n||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(void 0!==r)return r}if(e.children){const r=function(o){for(let a=0;a=2.0 are supported.")));const c=new hfe(s,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&void 0===a[h]&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}c.setExtensions(o),c.setPlugins(a),c.parse(n,r)}parseAsync(t,e){const n=this;return new Promise(function(r,s){n.parse(t,e,r,s)})}}function Fhe(){let i={};return{get:function(t){return i[t]},add:function(t,e){i[t]=e},remove:function(t){delete i[t]},removeAll:function(){i={}}}}const On={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Lhe{constructor(t){this.parser=t,this.name=On.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let n=0,r=e.length;n=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,s.source,o)}}class Xhe{constructor(t){this.parser=t,this.name=On.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,r=n.json,s=r.textures[t];if(!s.extensions||!s.extensions[e])return null;const o=s.extensions[e],a=r.images[o.source];let l=n.textureLoader;if(a.uri){const c=n.options.manager.getHandler(a.uri);null!==c&&(l=c)}return this.detectSupport().then(function(c){if(c)return n.loadTextureImage(t,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(1===e.height)}})),this.isSupported}}class Khe{constructor(t){this.parser=t,this.name=On.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,r=n.json,s=r.textures[t];if(!s.extensions||!s.extensions[e])return null;const o=s.extensions[e],a=r.images[o.source];let l=n.textureLoader;if(a.uri){const c=n.options.manager.getHandler(a.uri);null!==c&&(l=c)}return this.detectSupport().then(function(c){if(c)return n.loadTextureImage(t,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(1===e.height)}})),this.isSupported}}class Zhe{constructor(t){this.name=On.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,n=e.bufferViews[t];if(n.extensions&&n.extensions[this.name]){const r=n.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const u=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*h);return o.decodeGltfBuffer(new Uint8Array(m),u,h,p,r.mode,r.filter),m})})}return null}}class Qhe{constructor(t){this.name=On.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,n=e.nodes[t];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const r=e.meshes[n.mesh];for(const c of r.primitives)if(c.mode!==Ia.TRIANGLES&&c.mode!==Ia.TRIANGLE_STRIP&&c.mode!==Ia.TRIANGLE_FAN&&void 0!==c.mode)return null;const o=n.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const u=c.pop(),h=u.isGroup?u.children:[u],p=c[0].count,m=[];for(const g of h){const b=new It,v=new L,y=new to,M=new L(1,1,1),x=new p5(g.geometry,g.material,p);for(let C=0;C-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),this.textureLoader=typeof createImageBitmap>"u"||n||r&&s<98?new OS(this.options.manager):new ghe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ta(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const n=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:n,userData:{}};return Af(s,a,r),Su(a,r),Promise.all(n._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[];for(let r=0,s=e.length;r{const l=this.associations.get(o);null!=l&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(n,r),r.name+="_instance_"+t.uses[e]++,r}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let n=0;n=2&&v.setY(I,T[P*l+1]),l>=3&&v.setZ(I,T[P*l+2]),l>=4&&v.setW(I,T[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return v})}loadTexture(t){const e=this.json,s=e.textures[t].source,o=e.images[s];let a=this.textureLoader;if(o.uri){const l=this.options.manager.getHandler(o.uri);null!==l&&(a=l)}return this.loadTextureImage(t,s,a)}loadTextureImage(t,e,n){const r=this,s=this.json,o=s.textures[t],a=s.images[e],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(e,n).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",""===u.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(u.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return u.magFilter=wG[p.magFilter]||er,u.minFilter=wG[p.minFilter]||ol,u.wrapS=MG[p.wrapS]||Ql,u.wrapT=MG[p.wrapT]||Ql,r.associations.set(u,{textures:t}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(t,e){const r=this.json,s=this.options;if(void 0!==this.sourceCache[t])return this.sourceCache[t].then(h=>h.clone());const o=r.images[t],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(void 0!==o.bufferView)l=this.getDependency("bufferView",o.bufferView).then(function(h){c=!0;const p=new Blob([h],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===e.isImageBitmapLoader&&(g=function(b){const v=new Ea(b);v.needsUpdate=!0,p(v)}),e.load(wu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),h.userData.mimeType=o.mimeType||function dfe(i){return i.search(/\.jpe?g($|\?)/i)>0||0===i.search(/^data\:image\/jpeg/)?"image/jpeg":i.search(/\.webp($|\?)/i)>0||0===i.search(/^data\:image\/webp/)?"image/webp":"image/png"}(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[t]=u,u}assignTexture(t,e,n,r){const s=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((o=o.clone()).channel=n.texCoord),s.extensions[On.KHR_TEXTURE_TRANSFORM]){const a=void 0!==n.extensions?n.extensions[On.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[On.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return void 0!==r&&(o.colorSpace=r),t[e]=o,o})}assignFinalMaterial(t){const e=t.geometry;let n=t.material;const r=void 0===e.attributes.tangent,s=void 0!==e.attributes.color,o=void 0===e.attributes.normal;if(t.isPoints){const a="PointsMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new gf,xo.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,l.sizeAttenuation=!1,this.cache.add(a,l)),n=l}else if(t.isLine){const a="LineBasicMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new qr,xo.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,this.cache.add(a,l)),n=l}if(r||s||o){let a="ClonedMaterial:"+n.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=n.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(n))),n=l}t.material=n}getMaterialType(){return Ib}loadMaterial(t){const e=this,r=this.extensions,s=this.json.materials[t];let o;const a={},c=[];if((s.extensions||{})[On.KHR_MATERIALS_UNLIT]){const h=r[On.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,e))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new He(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ls),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(e.assignTexture(a,"map",h.baseColorTexture,Wr)),a.metalness=void 0!==h.metallicFactor?h.metallicFactor:1,a.roughness=void 0!==h.roughnessFactor?h.roughnessFactor:1,void 0!==h.metallicRoughnessTexture&&(c.push(e.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(t)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(t,a)})))}!0===s.doubleSided&&(a.side=Go);const u=s.alphaMode||"OPAQUE";if("BLEND"===u?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===u&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==cs&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new we(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==cs&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==cs){const h=s.emissiveFactor;a.emissive=(new He).setRGB(h[0],h[1],h[2],ls)}return void 0!==s.emissiveTexture&&o!==cs&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,Wr)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),Su(h,s),e.associations.set(h,{materials:t}),s.extensions&&Af(r,h,s),h})}createUniqueName(t){const e=_i.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,n=this.extensions,r=this.primitiveCache;function s(a){return n[On.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(l){return CG(l,a,e)})}const o=[];for(let a=0,l=t.length;a0&&lfe(y,s),y.name=e.createUniqueName(s.name||"mesh_"+t),Su(y,s),v.extensions&&Af(r,y,v),e.assignFinalMaterial(y),h.push(y)}for(let m=0,g=h.length;m1?new Yo:1===c.length?c[0]:new jr,u!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof xo||p instanceof Ea)&&h.set(p,m);return u.traverse(p=>{const m=r.associations.get(p);null!=m&&h.set(p,m)}),h})(s),s})}_createAnimationTracks(t,e,n,r,s){const o=[],a=t.name?t.name:t.uuid,l=[];let c;switch(Cu[s.path]===Cu.weights?t.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),Cu[s.path]){case Cu.weights:c=Bg;break;case Cu.rotation:c=bf;break;case Cu.position:case Cu.scale:c=Vg;break;default:c=1===n.itemSize?Bg:Vg}const u=void 0!==r.interpolation?sfe[r.interpolation]:Qm,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;pn.name===t||n.userData.name===t);return e?(e.removeFromParent(),new ul(e)):null}getBoundings(){return(new Cs).setFromObject(this.nativeMesh)}clone(){return new ul(this.nativeMesh.clone())}addToWorld(t){var e;null===(e=t.visualScene.nativeScene)||void 0===e||e.add(this.nativeMesh)}removeFromWorld(t){var e;null===(e=t.visualScene.nativeScene)||void 0===e||e.remove(this.nativeMesh)}dispose(){this.nativeMesh.traverse(t=>{t instanceof qn&&this.disposeMesh(t)}),this.nativeMesh instanceof qn&&this.disposeMesh(this.nativeMesh)}disposeMesh(t){t.geometry.dispose();const e=t.material instanceof Array?t.material:[t.material];for(const n of e)n.dispose()}}class pfe extends ul{constructor(t){super(t),this.nativeCamera=t}get supportsFov(){return this.nativeCamera instanceof mr||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(t){this.supportsFov&&(this.nativeCamera.fov=t,this.nativeCamera.updateProjectionMatrix())}}class mfe extends qre{createMaterial(t){let e=t.color||super.randomColor(),n=t.shading||"unlit";switch(n){case"unlit":return new cs({color:e,map:t.diffuse||null});case"standart":return new Ib({color:e,map:t.diffuse||null});case"phong":return new kS({color:e,map:t.diffuse||null});default:throw new Error(`"${n}" shading not implemented for three.js`)}}transformPrimitiveZUp(t){t.rotateX(Math.PI/2);const e=new Yo;return e.add(t),e}createPrimitive(t,e={}){let n=null,r=this.createMaterial(e);switch(t.shape){case"PLANE":n=new qn(new af(1e4,1e4),r);break;case"BOX":n=new qn(new nf(t.dimensions.x,t.dimensions.y,t.dimensions.z),r);break;case"CAPSULE":n=this.transformPrimitiveZUp(new qn(new MS(t.radius,t.centersDistance),r));break;case"CYLINDER":n=this.transformPrimitiveZUp(new qn(new Og(t.radius,t.radius,t.height),r));break;case"CONE":n=this.transformPrimitiveZUp(new qn(new CS(t.radius,t.height),r));break;case"SPHERE":n=new qn(new Tb(t.radius),r)}if(!n)throw new Error(`Primitive with shape "${t.shape}" not implemented`);return void 0!==e.castShadow&&(n.castShadow=e.castShadow),void 0!==e.receiveShadow&&(n.receiveShadow=e.receiveShadow),new ul(n)}createPerspectiveCamera(t={}){return new pfe(new mr(t.fov||75,t.aspectRatio||1,t.frustrum?t.frustrum.near:1,t.frustrum?t.frustrum.far:1e4))}}class _fe{constructor(){this.gltfLoader=new Ohe}loadFromGgGlb(t,e){return function(i,t,e,n){return new(e||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}(this,void 0,void 0,function*(){const n=yield this.gltfLoader.parseAsync(t,"");return n.scene.traverse(r=>{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new ul(n.scene)})}}class vfe extends ul{constructor(){super(new Pg(new hn,new qr({color:16711680,linewidth:.5}))),this.entity=null,this.debugBufferSize=3e6,this.index=0,this.lastMaxIndex=0,this.debugVertices=new Float32Array(this.debugBufferSize),this.debugColors=new Float32Array(this.debugBufferSize),this.nativeMesh.geometry.setAttribute("position",new li(this.debugVertices,3)),this.nativeMesh.geometry.setAttribute("color",new li(this.debugColors,3)),this.nativeMesh.frustumCulled=!1}drawContactPoint(t,e,n){this.setXYZ(this.debugVertices,this.index,t.x,t.y,t.z),this.setXYZ(this.debugColors,this.index++,n?.x||0,n?.y||0,n?.z||0),this.setXYZ(this.debugVertices,this.index,t.x+e.x,t.y+e.y,t.z+e.z),this.setXYZ(this.debugColors,this.index++,n?.x||0,n?.y||0,n?.z||0)}drawLine(t,e,n){this.setXYZ(this.debugVertices,this.index,t.x,t.y,t.z),this.setXYZ(this.debugColors,this.index++,n?.x||0,n?.y||0,n?.z||0),this.setXYZ(this.debugVertices,this.index,e.x,e.y,e.z),this.setXYZ(this.debugColors,this.index++,n?.x||0,n?.y||0,n?.z||0)}update(){this.index.01&&(this.camera.nativeCamera.aspect=t.x/t.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}class SG{constructor(){this._nativeScene=null,this.factory=new mfe,this.loader=new _fe,this.debugPhysicsDrawerClass=vfe}get nativeScene(){return this._nativeScene}init(){return i=this,t=void 0,n=function*(){this._nativeScene=new oS},new((e=void 0)||(e=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof e?s:new e(function(o){o(s)})}(u.value).then(a,l)}c((n=n.apply(i,t||[])).next())});var i,t,e,n}createRenderer(t,e,n){return new yfe(this,t,e,n)}dispose(){this._nativeScene=new oS}}const xfe=/^[og]\s*(.+)?/,wfe=/^mtllib /,Mfe=/^usemtl /,Cfe=/^usemap /,EG=/\s+/,AG=new L,CP=new L,DG=new L,TG=new L,Ra=new L,GS=new He;function Sfe(){const i={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);const n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(r,s){const o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);const a={index:this.materials.length,name:r||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:void 0!==o?o.smooth:this.smooth,groupStart:void 0!==o?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:"number"==typeof l?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(r){const s=this.currentMaterial();if(s&&-1===s.groupEnd&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),r&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return r&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),s}},n&&n.name&&"function"==typeof n.clone){const r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){const n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){const n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){const n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){const r=this.vertices,s=this.object.geometry.vertices;s.push(r[t+0],r[t+1],r[t+2]),s.push(r[e+0],r[e+1],r[e+2]),s.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){const e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){const e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){const r=this.normals,s=this.object.geometry.normals;s.push(r[t+0],r[t+1],r[t+2]),s.push(r[e+0],r[e+1],r[e+2]),s.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(t,e,n){const r=this.vertices,s=this.object.geometry.normals;AG.fromArray(r,t),CP.fromArray(r,e),DG.fromArray(r,n),Ra.subVectors(DG,CP),TG.subVectors(AG,CP),Ra.cross(TG),Ra.normalize(),s.push(Ra.x,Ra.y,Ra.z),s.push(Ra.x,Ra.y,Ra.z),s.push(Ra.x,Ra.y,Ra.z)},addColor:function(t,e,n){const r=this.colors,s=this.object.geometry.colors;void 0!==r[t]&&s.push(r[t+0],r[t+1],r[t+2]),void 0!==r[e]&&s.push(r[e+0],r[e+1],r[e+2]),void 0!==r[n]&&s.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){const r=this.uvs,s=this.object.geometry.uvs;s.push(r[t+0],r[t+1]),s.push(r[e+0],r[e+1]),s.push(r[n+0],r[n+1])},addDefaultUV:function(){const t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){const e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,s,o,a,l,c){const u=this.vertices.length;let h=this.parseVertexIndex(t,u),p=this.parseVertexIndex(e,u),m=this.parseVertexIndex(n,u);if(this.addVertex(h,p,m),this.addColor(h,p,m),void 0!==a&&""!==a){const g=this.normals.length;h=this.parseNormalIndex(a,g),p=this.parseNormalIndex(l,g),m=this.parseNormalIndex(c,g),this.addNormal(h,p,m)}else this.addFaceNormal(h,p,m);if(void 0!==r&&""!==r){const g=this.uvs.length;h=this.parseUVIndex(r,g),p=this.parseUVIndex(s,g),m=this.parseUVIndex(o,g),this.addUV(h,p,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";const e=this.vertices.length;for(let n=0,r=t.length;n=7?(GS.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(GS.r,GS.g,GS.b)):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));break;case"vt":e.uvs.push(parseFloat(h[1]),parseFloat(h[2]))}}else if("f"===u){const p=c.slice(1).trim().split(EG),m=[];for(let b=0,v=p.length;b0){const M=y.split("/");m.push(M)}}const g=m[0];for(let b=1,v=m.length-1;b1){const p=r[1].trim().toLowerCase();e.object.smooth="0"!==p&&"off"!==p}else e.object.smooth=!0;const h=e.object.currentMaterial();h&&(h.smooth=e.object.smooth)}else{if("\0"===c)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}e.finalize();const s=new Yo;if(s.materialLibraries=[].concat(e.materialLibraries),1==!(1===e.objects.length&&0===e.objects[0].geometry.vertices.length))for(let a=0,l=e.objects.length;a0&&b.setAttribute("normal",new st(u.normals,3)),u.colors.length>0&&(g=!0,b.setAttribute("color",new st(u.colors,3))),!0===u.hasUVIndices&&b.setAttribute("uv",new st(u.uvs,2));const v=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new gf({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new st(e.vertices,3)),e.colors.length>0&&void 0!==e.colors[0]&&(l.setAttribute("color",new st(e.colors,3)),a.vertexColors=!0);const c=new Mb(l,a);s.add(c)}return s}}class IG extends xf{constructor(t){super(t)}load(t,e,n,r){const s=this,o=""===this.path?wu.extractUrlBase(t):this.path,a=new Ta(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(l){try{e(s.parse(l,o))}catch(c){r?r(c):console.error(c),s.manager.itemError(t)}},n,r)}setMaterialOptions(t){return this.materialOptions=t,this}parse(t,e){const n=t.split("\n");let r={};const s=/\s+/,o={};for(let l=0;l=0?c.substring(0,u):c;h=h.toLowerCase();let p=u>=0?c.substring(u+1):"";if(p=p.trim(),"newmtl"===h)r={name:p},o[p]=r;else if("ka"===h||"kd"===h||"ks"===h||"ke"===h){const m=p.split(s,3);r[h]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else r[h]=p}const a=new Efe(this.resourcePath||e,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class Efe{constructor(t="",e={}){this.baseUrl=t,this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:Zl,this.wrap=void 0!==this.options.wrap?this.options.wrap:Ql}setCrossOrigin(t){return this.crossOrigin=t,this}setManager(t){this.manager=t}setMaterials(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(t){if(!this.options)return t;const e={};for(const n in t){const r=t[n],s={};e[n]=s;for(const o in r){let a=!0,l=r[o];const c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===l[0]&&0===l[1]&&0===l[2]&&(a=!1)}a&&(s[c]=l)}}return e}preload(){for(const t in this.materialsInfo)this.create(t)}getIndex(t){return this.nameLookup[t]}getAsArray(){let t=0;for(const e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray}create(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]}createMaterial_(t){const e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function o(a,l){if(r[a])return;const c=e.getTextureParams(l,r),u=e.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(e.baseUrl,c.url));u.repeat.copy(c.scale),u.offset.copy(c.offset),u.wrapS=e.wrap,u.wrapT=e.wrap,("map"===a||"emissiveMap"===a)&&(u.colorSpace=Wr),r[a]=u}for(const a in n){const l=n[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new He).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new He).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new He).fromArray(l).convertSRGBToLinear();break;case"map_kd":o("map",l);break;case"map_ks":o("specularMap",l);break;case"map_ke":o("emissiveMap",l);break;case"norm":o("normalMap",l);break;case"map_bump":case"bump":o("bumpMap",l);break;case"map_d":o("alphaMap",l),r.transparent=!0;break;case"ns":r.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(r.opacity=c,r.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(r.opacity=1-c,r.transparent=!0)}}return this.materials[t]=new kS(r),this.materials[t]}getTextureParams(t,e){const n={scale:new we(1,1),offset:new we(0,0)},r=t.split(/\s+/);let s;return s=r.indexOf("-bm"),s>=0&&(e.bumpScale=parseFloat(r[s+1]),r.splice(s,2)),s=r.indexOf("-s"),s>=0&&(n.scale.set(parseFloat(r[s+1]),parseFloat(r[s+2])),r.splice(s,4)),s=r.indexOf("-o"),s>=0&&(n.offset.set(parseFloat(r[s+1]),parseFloat(r[s+2])),r.splice(s,4)),n.url=r.join(" ").trim(),n}loadTexture(t,e,n,r,s){const o=void 0!==this.manager?this.manager:$5;let a=o.getHandler(t);null===a&&(a=new OS(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(t,n,r,s);return void 0!==e&&(l.mapping=e),l}}const Afe=["determinateSpinner"];function Dfe(i,t){if(1&i&&(Fr(),j(0,"svg",11),ke(1,"circle",12),q()),2&i){const e=ye();At("viewBox",e._viewBox()),$(1),va("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),At("r",e._circleRadius())}}const Tfe=Ly(class{constructor(i){this._elementRef=i}},"primary"),Ife=new fe("mat-progress-spinner-default-options",{providedIn:"root",factory:function Rfe(){return{diameter:RG}}}),RG=100;let $S=(()=>{class i extends Tfe{constructor(e,n,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=RG,this._noopAnimations="NoopAnimations"===n&&!!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,ys(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=ys(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=ys(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 i.\u0275fac=function(e){return new(e||i)(A(lt),A(Cr,8),A(Ife))},i.\u0275cmp=it({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,n){if(1&e&&Xn(Afe,5),2&e){let r;Dt(r=Tt())&&(n._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(e,n){2&e&&(At("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===n.mode?n.value:null)("mode",n.mode),va("width",n.diameter,"px")("height",n.diameter,"px"),an("_mat-animation-noopable",n._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===n.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[rt],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,n){if(1&e&&(_e(0,Dfe,2,8,"ng-template",null,0,Fc),j(2,"div",1,2),Fr(),j(4,"svg",3),ke(5,"circle",4),q()(),ns(),j(6,"div",5)(7,"div",6)(8,"div",7),Hv(9,8),q(),j(10,"div",9),Hv(11,8),q(),j(12,"div",10),Hv(13,8),q()()()),2&e){const r=cr(1);$(4),At("viewBox",n._viewBox()),$(1),va("stroke-dasharray",n._strokeCircumference(),"px")("stroke-dashoffset",n._strokeDashOffset(),"px")("stroke-width",n._circleStrokeWidth(),"%"),At("r",n._circleRadius()),$(4),z("ngTemplateOutlet",r),$(2),z("ngTemplateOutlet",r),$(2),z("ngTemplateOutlet",r)}},dependencies:[ry],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}),i})(),Pfe=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[vo,Gn]}),i})();const Ofe=["previewCanvasContainer"],Ffe=["previewCanvas"];function Lfe(i,t){if(1&i){const e=xi();j(0,"div")(1,"label",8),Ye(2),q(),j(3,"input",9),ze("change",function(r){return xn(bn(e).$implicit.visible=r.currentTarget.checked)}),q()()}if(2&i){const e=t.$implicit;$(1),z("for","visibility_"+e.name),$(1),$i(e.name),$(1),z("id","visibility_"+e.name)("checked",e.visible)}}function Nfe(i,t){if(1&i&&(fo(0),j(1,"h4"),Ye(2,"Objects visibility"),q(),_e(3,Lfe,4,4,"div",7),po()),2&i){const e=ye();$(3),z("ngForOf",e.meshes)}}function Bfe(i,t){1&i&&ke(0,"mat-spinner",10)}const Fb=i=>{i.colorSpace="srgb",i.anisotropy=8,i.magFilter=fr,i.minFilter=fr};let kG=(()=>{class i{constructor(e){this.cdr=e,this.visibilityControls=!0,this.groupFunction=null,this._paths$=new Ct(null),this.destroyed$=new Fe,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(e){this._paths$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){var s;e.world=new nH(new SG,{init:(s=vt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield e.world.init(),e.world.visualScene.nativeScene.add(new uP(16777215,2));let n=new Ct({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera(),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.controller=new jre(e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement}}),e.world.addEntity(e.controller);const r=()=>{n.next({x:e.previewCanvasContainer.nativeElement.clientWidth,y:e.previewCanvasContainer.nativeElement.clientHeight})};new ResizeObserver(r).observe(e.previewCanvasContainer.nativeElement),r(),e.world.start(),e._paths$.pipe(Ze(e.destroyed$)).subscribe(function(){var s=vt(function*(o){if(e.entity&&(e.world.removeEntity(e.entity),e.entity.dispose(),e.entity=null,e.meshes=[],e.cdr.markForCheck()),o){const[a,l]=o,c=new SP,h=yield(new IG).loadAsync(l);h.preload(),c.setMaterials(h);const p=yield c.loadAsync(a);if(e.groupFunction){const b={};for(const v of p.children){const y=e.groupFunction(v.name);b[y]||(b[y]=[]),b[y].push(v)}for(const v of Object.keys(b)){const y=new Yo;y.add(...b[v]),y.name=v,p.remove(...b[v]),p.add(y)}}e.meshes=p.children,p.traverse(b=>{if(b instanceof qn){const v=b.material instanceof Array?b.material:[b.material];for(const y of v)y.transparent=!0,y.alphaTest=.5,y instanceof cs&&y.map&&(y.map.wrapS=$r,y.map.wrapT=$r,Fb(y.map),y.map.needsUpdate=!0)}}),e.entity=new lu(new ul(p),null),e.world.addEntity(e.entity);let m={min:{x:-5,y:-5,z:-5},max:{x:5,y:5,z:5}};const g=e.entity.object3D.getBoundings();!isNaN(g.min.x)&&!isNaN(g.max.x)&&(m=g),e.controller.target=pt.scalarMult(pt.add(m.min,m.max),.5),e.controller.radius=pt.dist(m.min,m.max),e.controller.theta=-1.32,e.controller.phi=1.22,e.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(ri))},i.\u0275cmp=it({type:i,selectors:[["app-obj-viewer"]],viewQuery:function(e,n){if(1&e&&(Xn(Ofe,5),Xn(Ffe,5)),2&e){let r;Dt(r=Tt())&&(n.previewCanvasContainer=r.first),Dt(r=Tt())&&(n.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction"},decls:7,vars:2,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"for"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(e,n){1&e&&(j(0,"div",0,1),ke(2,"canvas",2,3),j(4,"div",4),_e(5,Nfe,4,1,"ng-container",5),q(),_e(6,Bfe,1,0,"mat-spinner",6),q()),2&e&&($(5),z("ngIf",n.visibilityControls),$(1),z("ngIf",!n.entity))},dependencies:[_o,gi,$S],styles:[".previewCanvasContainer[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 14rem);position:relative;overflow:hidden;margin:0 0 16px;display:flex;align-items:center;justify-content:space-around}.previewCanvasContainer[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%]{position:absolute;right:0;top:0;padding:5px;display:flex;flex-direction:column;row-gap:10px;background-color:#333;color:#fff;max-height:calc(100% - 8px);overflow-y:auto}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%]:empty{display:none}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;display:flex}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),i})();function Ufe(i,t){if(1&i&&(Fr(),ke(0,"circle",3),Ht(1,"async"),Ht(2,"async")),2&i){const e=ye();let n,r;At("cx",(null==(n=Zt(1,3,e.mapPointer$))?null:n.x)||0)("cy",(null==(r=Zt(2,5,e.mapPointer$))?null:r.y)||0)("r",10)}}const Vfe=function(){return{"stroke-width":3}};let zfe=(()=>{class i{constructor(e){this.ref=e,this._roadSpline$=new Ct([]),this._pointer$=new Ct(null),this.splineClosed=!1,this.svgSize$=new Ct({x:100,y:100}),this.scalingSquare$=new Ct({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Ct(""),this.mapPointer$=new Ct(null),this.destroyed$=new Fe}set roadSpline(e){this._roadSpline$.next(e)}set pointer(e){this._pointer$.next(e)}ngAfterViewInit(){this._roadSpline$.pipe(Ze(this.destroyed$),Qe(n=>{let r={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},s={x:Number.MIN_SAFE_INTEGER,y:Number.MIN_SAFE_INTEGER};n.forEach(a=>{r={x:Math.min(r.x,a.x),y:Math.min(r.y,a.z)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.z)}});const o_x=s.x-r.x,o_y=s.y-r.y;return{x:r.x-.1*o_x,y:r.y-.1*o_y,width:1.2*o_x,height:1.2*o_y}})).subscribe(this.scalingSquare$),jd([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(Ze(this.destroyed$),Qe(([n,r,s])=>{const o=n.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.z)*s.y/r.height+s.y}));return this.splineClosed&&o.length&&o.push(o[0]),o.map(a=>Math.round(a.x)+","+Math.round(a.y)).join(" ")})).subscribe(this.mapPolyline$),jd([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(Ze(this.destroyed$),Qe(([n,r,s])=>n?{x:(n.x-r.x)*s.x/r.width,y:(r.y-n.y)*s.y/r.height+s.y}:null)).subscribe(this.mapPointer$);const e=()=>{this.svgSize$.next({x:this.ref.nativeElement.clientWidth,y:this.ref.nativeElement.clientHeight})};new ResizeObserver(e).observe(this.ref.nativeElement),e()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(lt))},i.\u0275cmp=it({type:i,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:8,vars:13,consts:[["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(e,n){if(1&e&&(Fr(),j(0,"svg",0),Ht(1,"async"),Ht(2,"async"),ke(3,"polyline",1),Ht(4,"async"),Ye(5," cars "),_e(6,Ufe,3,7,"circle",2),Ht(7,"async"),q()),2&e){let r;At("viewBox","0 0 "+(null==(r=Zt(1,4,n.svgSize$))?null:r.x)+" "+(null==(r=Zt(2,6,n.svgSize$))?null:r.y)),$(3),z("ngStyle",Zs(12,Vfe)),At("points",Zt(4,8,n.mapPolyline$)),$(3),z("ngIf",Zt(7,10,n.mapPointer$))}},dependencies:[gi,Kw,Hl],styles:["[_nghost-%COMP%]{overflow:auto}svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),i})();const Hfe=["previewCanvasContainer"],Gfe=["previewCanvas"];function $fe(i,t){if(1&i&&(j(0,"mat-option",19),Ye(1),q()),2&i){const e=t.$implicit;z("value",e),$(1),Zi(" ",e," ")}}function Wfe(i,t){if(1&i){const e=xi();fo(0),j(1,"mat-form-field",1)(2,"mat-label"),Ye(3,"Custom FAM path"),q(),ke(4,"input",20,21),Ht(6,"async"),q(),j(7,"button",22),ze("click",function(){bn(e);const r=cr(5);return xn(ye().onFamSelected(r.value))}),Ye(8,"LOAD"),q(),po()}if(2&i){const e=ye();$(4),z("value",Zt(6,1,e.previewFamLocation$))}}function jfe(i,t){1&i&&ke(0,"mat-spinner",23),2&i&&z("diameter",40)}function Yfe(i,t){1&i&&ke(0,"mat-spinner",24)}const qfe=function(){return["loop_chunk","num_chunks","unk0","unk1","position","unknowns0","chunks_size","rail_tex_id","num_prop_descr","num_props","unk2","unk3","prop_descr","props"]};var Df=(()=>{return(i=Df||(Df={})).ThreeModel="model",i.Bitmap="bitmap",i.TwoSidedBitmap="two_sided_bitmap",Df;var i})();class Xfe extends zre{constructor(t,e,n){super(t,{loadDepth:40,inertia:2}),this.mapGraph=t,this.famPath=e,this.hideUnknownEntities$=n,this.textureLoader=new OS,this.terrainMaterials={},this.objLoader=new SP,this.resource=null,this.isOpenedTrack=!1,this._placeholder=null,this._placeholderPromise=null,this.unknownEntities=new Set,this._placeholderTerrain=null,this._placeholderTerrainPromise=null}onSpawned(t){super.onSpawned(t),this.hideUnknownEntities$.pipe($c(),Ze(this._onRemoved$)).subscribe(e=>{for(const n of this.unknownEntities)n.visible=!e})}getPlaceholderTexture(){var t=this;return vt(function*(){return t._placeholder?t._placeholder:(t._placeholderPromise||(t._placeholderPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png")),t._placeholderPromise)})()}getPlaceholderTerrainTexture(){var t=this;return vt(function*(){return t._placeholderTerrain?t._placeholderTerrain:(t._placeholderTerrainPromise||(t._placeholderTerrainPromise=t.textureLoader.loadAsync("assets/placeholder_texture.png").then(e=>(e.wrapS=Ql,e.wrapT=$r,Fb(e),e.flipY=!0,e))),t._placeholderTerrainPromise)})()}loadChunk(t){var e=this;return vt(function*(){const n=yield e.objLoader.loadAsync(t.path+".obj");n.position.set(t.position.x,t.position.y,t.position.z),n.traverse(l=>{l instanceof qn&&(l.material=e.getTerrainMaterial((l.userData.name||l.name).substr((l.userData.name||l.name).lastIndexOf("_")+1).split(".")[0]))});let r=+t.path.split("_")[t.path.split("_").length-1],s=(e.resource.data.props||[]).filter(l=>l.road_point_idx>=4*r&&l.road_point_idx<4*(r+1)).map(l=>({...l,...e.resource.data.prop_descr[l.prop_descr_idx],position:pt.add({x:l.position.x,y:l.position.z,z:l.position.y},{x:e.resource.data.road_spline[l.road_point_idx].position.x,y:e.resource.data.road_spline[l.road_point_idx].position.z,z:e.resource.data.road_spline[l.road_point_idx].position.y}),rotation:Gr.fromAngle(pt.nZ,l.rotation+e.resource.data.road_spline[l.road_point_idx].orientation)}));const o=(yield Promise.all(s.map(l=>e.loadPropInternal(l)))).filter(l=>!!l),a=new lu(new ul(n));return e.addChildren(a,...o),e.loaded.set(t,[a,...o]),[[a,...o],null]})()}disposeChunk(t){for(const e of this.loaded.get(t)||[])this.unknownEntities.delete(e);super.disposeChunk(t)}getTerrainMaterial(t){return this.terrainMaterials[t]||(this.terrainMaterials[t]=new cs({side:Go,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${t}.png`).then(e=>{e.wrapS=Ql,e.wrapT=$r,Fb(e),e.flipY=!0,this.terrainMaterials[t].map=e,this.terrainMaterials[t].needsUpdate=!0,this.terrainMaterials[t].visible=!0}).catch(e=>{console.warn(`Problem with loading terrain material ${t}`),this.getPlaceholderTerrainTexture().then(n=>{this.terrainMaterials[t].map=n,this.terrainMaterials[t].needsUpdate=!0,this.terrainMaterials[t].visible=!0})}):this.getPlaceholderTerrainTexture().then(e=>{this.terrainMaterials[t].map=e,this.terrainMaterials[t].needsUpdate=!0,this.terrainMaterials[t].visible=!0})),this.terrainMaterials[t]}loadPropInternal(t){var e=this;return vt(function*(){let n=!1;if(t.type==Df.ThreeModel){let r;try{if(!e.famPath)throw new Error;const o=new IG,a=new SP,l=yield o.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new ul(yield a.loadAsync(`${e.famPath}/props/${t.data.data.resource_id}/0/geometry.obj`))}catch{n=!0,r=e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:5},{diffuse:yield e.getPlaceholderTexture()})}r.nativeMesh.traverse(o=>{if(o instanceof qn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof cs&&l.map&&(l.map.wrapS=$r,l.map.wrapT=$r,Fb(l.map),l.map.needsUpdate=!0)}});const s=new lu(r);return s.position=t.position,s.rotation=t.rotation,n&&(e.unknownEntities.add(s),s.visible=!e.hideUnknownEntities$.getValue()),e.world.addEntity(s),s}if(t.type==Df.Bitmap||t.type==Df.TwoSidedBitmap){const r=(c,u)=>new Array(u).fill(null).map((h,p)=>e.isOpenedTrack?`${Math.floor(c/4)+p}/0000`:`0/${(Math.floor(c/4)+p).toString().padStart(2,"0")}00`).join(";"),s=new Yo,[o,a]=yield e.loadTexturePlaneProp(r(t.data.data.resource_id,t.flags.is_animated?t.data.data.frame_count:1),{x:t.data.data.width,y:t.data.data.height},t.data.data.animation_interval);if(s.add(o),t.type==Df.TwoSidedBitmap){const[c,u]=yield e.loadTexturePlaneProp(r(t.data.data.resource_id_2,1),{x:t.data.data.width_2,y:t.data.data.height},t.data.data.animation_interval);c.rotateY(Math.PI/2),c.position.x=t.data.data.width/2,c.position.y=t.data.data.width_2/2,s.add(c)}const l=new lu(new ul(s),null);return l.position=t.position,l.rotation=t.rotation,a&&(e.unknownEntities.add(l),l.visible=!e.hideUnknownEntities$.getValue()),l}return null})()}loadTexturePlaneProp(t,e,n){var r=this;return vt(function*(){const s=t.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.famPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.famPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(Fb(h),new cs({map:h,alphaTest:.5,transparent:!0,side:Go}))),u=new qn(new af(e.x,e.y),c[0]);if(u.rotateX(Math.PI/2),u.position.set(0,0,e.y/2),c.length>1){let h=-1;yC(r.world).pipe(Xz(n&&!isNaN(+n)?1e3*+n:250)).subscribe(()=>{h=(h+1)%c.length,u.material=c[h]})}return[u,a]})()}}let Kfe=(()=>{class i{constructor(e,n,r){this.eelDelegate=e,this.cdr=n,this.mainService=r,this._resource$=new Ct(null),this.changed=new Ve,this.previewLoading$=new Ct(!0),this.previewFamLocation$=new Ct(null),this.previewFamLoading$=new Ct(!1),this.pointer$=new Ct(null),this.selectedSplineIndex$=new Ct(0),this.selectedSplineItem$=new Ct(null),this.selectedAiInfoItem$=new Ct(null),this.selectedTerrainItem$=new Ct(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Fe}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}get previewFamPossibleLocations(){const e=this.resource?.id;return e?[e.substring(0,e.indexOf("MISC"))+"ETRACKFM"+e.substr(e.indexOf("MISC")+4,4)+"_001.FAM",e.substring(0,e.indexOf("MISC"))+"GTRACKFM"+e.substr(e.indexOf("MISC")+4,4)+"_001.FAM",e.substring(0,e.indexOf("MISC"))+"NTRACKFM"+e.substr(e.indexOf("MISC")+4,4)+"_M01.FAM",e.substring(0,e.indexOf("MISC"))+"NTRACKFM"+e.substr(e.indexOf("MISC")+4,4)+"_R01.FAM",e.substring(0,e.indexOf("MISC"))+"NTRACKFM"+e.substr(e.indexOf("MISC")+4,4)+"_T01.FAM"]:[]}get roadSpline(){return(this.resource?.data.road_spline||[]).filter((e,n)=>n<(4*this.resource?.data.num_chunks||0)).map(e=>e.position)||[]}ngAfterViewInit(){var e=this;return vt(function*(){var s;e.world=new nH(new SG,{init:(s=vt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=vt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield e.world.init(),e.skySphere=new lu(e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})),e.skySphere.object3D.nativeMesh.material.side=Go,e.skySphere.rotation=Gr.fromEuler({x:Math.PI/2,y:0,z:0}),e.world.addEntity(e.skySphere),e.selectionSphere=new lu(e.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:.5},{color:16711680,shading:"unlit"})),e.selectionSphere.object3D.nativeMesh.material.opacity=.4,e.selectionSphere.object3D.nativeMesh.material.transparent=!0,e.world.addEntity(e.selectionSphere),e.world.visualScene.nativeScene.add(new uP(16777215,2));let n=new Ct({x:1,y:1});e.renderer=e.world.addRenderer(e.world.visualScene.factory.createPerspectiveCamera(),e.previewCanvas.nativeElement,{size:n.asObservable(),background:11184810}),e.renderer.camera.position={x:0,y:0,z:2.5},e.renderer.camera.rotation=Gr.lookAt(e.renderer.camera.position,pt.add(e.renderer.camera.position,pt.Y),pt.Z),yC(e.world).pipe(Ze(e.destroyed$)).subscribe(()=>{e.renderer&&(e.skySphere.position=e.renderer.camera.position,e.pointer$.next(e.renderer.camera.position))}),e.controller=new $re(e.world.keyboardInput,e.renderer,{mouseOptions:{canvas:e.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",movementOptions:{speed:1},ignoreMouseUnlessPointerLocked:!0,ignoreKeyboardUnlessPointerLocked:!0}),e.world.addEntity(e.controller);const r=()=>{n.next({x:e.previewCanvasContainer.nativeElement.clientWidth,y:e.previewCanvasContainer.nativeElement.clientHeight})};new ResizeObserver(r).observe(e.previewCanvasContainer.nativeElement),r(),e.world.start(),e._resource$.pipe(Ze(e.destroyed$)).subscribe(function(){var s=vt(function*(o){e.previewLoading$.next(!0),yield e.loadTerrainChunks(o?.id),yield e.loadPreview(),e.previewFamPossibleLocations[0]&&(e.previewFamLocation$.next(e.previewFamPossibleLocations[0]),yield e.onFamSelected(e.previewFamPossibleLocations[0])),e.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ze(e.destroyed$),Dn(([s,o])=>!!e.resource&&s.startsWith(e.resource.id)),Gc(3e3)).subscribe(vt(function*(){e.previewLoading$.next(!0),yield e.postTmpUpdates(e.resource?.id),yield e.loadPreview(),e.previewLoading$.next(!1)})),e.selectedSplineIndex$.pipe(Ze(e.destroyed$),Gc(250)).subscribe(s=>{if(e.resource){const o=e.resource.data.road_spline[s];if(!o)return;const a={x:o.position.x,y:o.position.z,z:o.position.y};e.selectionSphere.position=a,e.renderer&&(e.renderer.position=pt.add(a,pt.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-e.resource.data.road_spline[s].orientation)),e.renderer.rotation=Gr.lookAt(e.renderer.position,a,{x:0,y:0,z:1}))}e.selectedSplineItem$.next({id:Xl(e.resource.id,`road_spline/${s}`),data:e.resource.data.road_spline[s],schema:(e.resource.schema.fields||[]).find(o=>"road_spline"===o.name)?.schema.child_schema,name:""}),e.selectedAiInfoItem$.next({id:Xl(e.resource.id,`ai_info/${Math.floor(s/4)}`),data:e.resource.data.ai_info[Math.floor(s/4)],schema:(e.resource.schema.fields||[]).find(o=>"ai_info"===o.name)?.schema.child_schema,name:""}),e.selectedTerrainItem$.next({id:Xl(e.resource.id,`terrain/${Math.floor(s/4)}`),data:e.resource.data.terrain[Math.floor(s/4)],schema:(e.resource.schema.fields||[]).find(o=>"terrain"===o.name)?.schema.child_schema,name:""})})})()}onFamSelected(e){var n=this;return vt(function*(){if("custom"!=e&&n.famPath!=e){n.previewFamLoading$.next(!0);try{const r=yield n.eelDelegate.serializeResource(e,{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}),s=new OS,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.colorSpace="srgb",a.mapping=Zc,n.skySphere.object3D.nativeMesh.material.map=a}else n.skySphere.object3D.nativeMesh.material.map=null;n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.famPath=e}catch{n.skySphere.object3D.nativeMesh.material.map=null,n.skySphere.object3D.nativeMesh.material.needsUpdate=!0,n.famPath=null}finally{n.previewFamLoading$.next(!1)}yield n.loadPreview()}})()}loadTerrainChunks(e){var n=this;return vt(function*(){if(e){let s=(yield n.eelDelegate.serializeResource(e,{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,maps__save_as_chunked:!0,maps__save_invisible_wall_collisions:!1,maps__save_terrain_collisions:!1,maps__save_spherical_skybox_texture:!0,maps__add_props_to_obj:!1})).find(o=>o.endsWith(".obj"))||"";n.terrainChunksObjLocation=s.substring(0,s.indexOf("terrain_chunk_"))}else n.terrainChunksObjLocation=void 0})()}loadPreview(){var e=this;return vt(function*(){if(e.roadPath=e.resource?.data.road_spline.map(r=>({x:r.position.x,y:r.position.z,z:r.position.y})).filter((r,s)=>s%4==0).slice(0,e.resource.data.num_chunks)||null,e.isOpenedTrack=0===e.resource?.data.loop_chunk,!e.terrainChunksObjLocation||!e.roadPath)return;const n=eb.fromMapArray(e.roadPath.map((r,s)=>({path:`${e.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!e.isOpenedTrack);e.unloadPreview(),e.map=new Xfe(n,e.famPath&&"resources/"+e.famPath,e.mainService.hideHiddenFields$),e.map.resource=e.resource,e.map.isOpenedTrack=e.isOpenedTrack,e.map.loaderCursorEntity$.next(e.renderer),e.world.addEntity(e.map),e.cdr.markForCheck()})()}unloadPreview(){this.map&&(this.world.removeEntity(this.map),this.map.dispose(),this.map=null,this.cdr.markForCheck())}postTmpUpdates(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(e)).map(([s,o])=>({id:s,value:o})),{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,maps__save_as_chunked:!0,maps__save_invisible_wall_collisions:!1,maps__save_terrain_collisions:!1,maps__save_spherical_skybox_texture:!0,maps__add_props_to_obj:!1});n.terrainChunksObjLocation=r[0].substring(0,r[0].indexOf("terrain_chunk_"))}else n.terrainChunksObjLocation=void 0})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(Yc),A(ri),A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-tri-map-block-ui"]],viewQuery:function(e,n){if(1&e&&(Xn(Hfe,5),Xn(Gfe,5)),2&e){let r;Dt(r=Tt())&&(n.previewCanvasContainer=r.first),Dt(r=Tt())&&(n.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:43,consts:[[1,"famSelector"],["appearance","fill"],[3,"value","valueChange"],["famSelect",""],[3,"value",4,"ngFor","ngForOf"],["value","custom"],[4,"ngIf"],["mode","indeterminate",3,"diameter",4,"ngIf"],[1,"preview"],[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["mode","indeterminate",4,"ngIf"],[1,"previewNavigationContainer"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange"],[3,"roadSpline","pointer","splineClosed"],[3,"resource","hideBlockActions"],[3,"resource","hideBlockActions","fieldWhitelist"],[3,"value"],["matInput","","type","text",3,"value"],["customFamInput",""],["mat-button","",3,"click"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(e,n){if(1&e&&(j(0,"div",0)(1,"h4"),Ye(2,"Preview *.FAM file"),q(),j(3,"mat-form-field",1)(4,"mat-label"),Ye(5,"Current preview FAM"),q(),j(6,"mat-select",2,3),ze("valueChange",function(s){return n.onFamSelected(s)}),Ht(8,"async"),Ht(9,"async"),_e(10,$fe,2,2,"mat-option",4),j(11,"mat-option",5),Ye(12,"custom"),q()()(),_e(13,Wfe,9,3,"ng-container",6),_e(14,jfe,1,1,"mat-spinner",7),Ht(15,"async"),q(),j(16,"div",8)(17,"div",9,10),ke(19,"canvas",11,12),_e(21,Yfe,1,0,"mat-spinner",13),Ht(22,"async"),q(),j(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Ye(27,"Spline item"),q(),j(28,"input",15),ze("ngModelChange",function(s){return n.selectedSplineIndex$.next(s)}),Ht(29,"async"),Ht(30,"async"),q()(),ke(31,"app-tri-minimap",16),Ht(32,"async"),q()(),j(33,"h4"),Ye(34,"Road spline item"),q(),ke(35,"app-compound-block-ui",17),Ht(36,"async"),j(37,"h4"),Ye(38,"AI info (block for 4 spline items)"),q(),ke(39,"app-compound-block-ui",17),Ht(40,"async"),j(41,"h4"),Ye(42,"Terrain (block for 4 spline items)"),q(),ke(43,"app-compound-block-ui",17),Ht(44,"async"),j(45,"h4"),Ye(46,"Common"),q(),ke(47,"app-compound-block-ui",18),Ht(48,"async")),2&e){const r=cr(7);let s;$(6),z("value",n.previewFamPossibleLocations.includes(Zt(8,20,n.previewFamLocation$))?Zt(9,22,n.previewFamLocation$):"custom"),$(4),z("ngForOf",n.previewFamPossibleLocations),$(3),z("ngIf","custom"==r.value),$(1),z("ngIf",Zt(15,24,n.previewFamLoading$)),$(7),z("ngIf",Zt(22,26,n.previewLoading$)),$(7),z("min",0)("max",4*(null==(s=Zt(29,28,n._resource$))?null:s.data.num_chunks)-1)("ngModel",Zt(30,30,n.selectedSplineIndex$)),$(3),z("roadSpline",n.roadSpline)("pointer",Zt(32,32,n.pointer$))("splineClosed",!n.isOpenedTrack),$(4),z("resource",Zt(36,34,n.selectedSplineItem$))("hideBlockActions",!0),$(4),z("resource",Zt(40,36,n.selectedAiInfoItem$))("hideBlockActions",!0),$(4),z("resource",Zt(44,38,n.selectedTerrainItem$))("hideBlockActions",!0),$(4),z("resource",Zt(48,40,n._resource$))("hideBlockActions",!0)("fieldWhitelist",Zs(42,qfe))}},dependencies:[_o,gi,Wl,Bh,Xc,Hh,zh,su,ql,zo,ou,WM,Ky,Nm,$S,qc,zfe,Hl],styles:[".preview[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 14rem);display:flex;column-gap:1rem}.preview[_ngcontent-%COMP%] .previewCanvasContainer[_ngcontent-%COMP%]{flex-grow:1;position:relative;overflow:hidden;margin:0 0 16px;display:flex;align-items:center;justify-content:space-around}.preview[_ngcontent-%COMP%] .previewCanvasContainer[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute}.preview[_ngcontent-%COMP%] .previewNavigationContainer[_ngcontent-%COMP%]{width:20rem;flex-shrink:0;display:flex;flex-direction:column}.preview[_ngcontent-%COMP%] .previewNavigationContainer[_ngcontent-%COMP%] app-tri-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.famSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.famSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.famSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.famSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .famSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),i})(),Zfe=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.mainService=n,this._resource$=new Ct(null),this.changed=new Ve,this.previewPaths$=new Ct(null),this.destroyed$=new Fe,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,geometry__replace_car_wheel_with_dummies:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Ze(e.destroyed$)).subscribe(function(){var n=vt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ze(e.destroyed$),Dn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Gc(1500)).subscribe(vt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}postTmpUpdates(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(e)).map(([s,o])=>({id:s,value:o})),n.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}loadPreviewFilePaths(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResource(e,n.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(Yc),A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:6,consts:[[3,"paths"],[3,"resource"]],template:function(e,n){1&e&&(ke(0,"app-obj-viewer",0),Ht(1,"async"),ke(2,"app-compound-block-ui",1),Ht(3,"async")),2&e&&(z("paths",Zt(1,2,n.previewPaths$)),$(2),z("resource",Zt(3,4,n._resource$)))},dependencies:[qc,kG,Hl],changeDetection:0}),i})();const Qfe=["class","block-ui"];function Jfe(i,t){if(1&i&&(j(0,"mat-label",7),Ye(1),q()),2&i){const e=ye(2);z("matTooltip",e.resourceDescription),$(1),Zi("",null==e.resource?null:e.resource.name," ")}}function epe(i,t){if(1&i&&(j(0,"mat-option",8),Ye(1),q()),2&i){const e=t.$implicit,n=t.index,r=ye(2);z("value",n)("disabled",r.disabled),$(1),Zi(" ",e.block_class_mro.split("__")[0]," ")}}function tpe(i,t){1&i&&ke(0,"app-block-actions",9),2&i&&z("resource",ye(2).childResource)}function npe(i,t){if(1&i){const e=xi();fo(0),_e(1,Jfe,2,2,"mat-label",1),Ht(2,"async"),j(3,"div",2)(4,"mat-label"),Ye(5,"Resource type:"),q(),j(6,"mat-select",3),ze("selectionChange",function(r){return bn(e),xn(ye().setChoiceIndex(r.value))}),_e(7,epe,2,3,"mat-option",4),q(),_e(8,tpe,1,1,"app-block-actions",5),q(),ke(9,"app-editor",6),po()}if(2&i){const e=ye();let n;$(1),z("ngIf",(null==e.resource?null:e.resource.name)&&(null==e.resource?null:e.resource.name)!=(null==(n=Zt(2,8,e.main.resource$))?null:n.name)),$(5),z("value",e.resourceData.choice_index)("disabled",e.disabled),$(1),z("ngForOf",e.resource.schema.possible_resource_schemas),$(1),z("ngIf",!e.hideBlockActions),$(1),z("resource",e.childResource)("hideBlockActions",!0)("disabled",e.disabled)}}let PG=(()=>{class i{constructor(e){this.main=e,this._resource=null,this.resourceDescription="",this.hideBlockActions=!1,this.disabled=!1,this.childResource=null,this.choiceDataCaches=[],this.changed=new Ve}get resource(){return this._resource}set resource(e){const n=!this._resource||!e||this._resource.id!==e.id;this._resource=e,n&&(this.choiceDataCaches=new Array(this._resource?.schema.possible_resource_schemas||0).fill(null),this._resource&&(this.choiceDataCaches[this._resource.data.choice_index]=this._resource.data.data)),this.updateChild()}get resourceData(){return this._resource?.data||null}setChoiceIndex(e){this._resource&&(this.choiceDataCaches[this._resource.data.choice_index]=this.childResource.data,this._resource.data.choice_index=e,this._resource.data.data=this.choiceDataCaches[e],this.updateChild(),this.changed.emit())}updateChild(){this.childResource=this._resource?{...this._resource,id:Xl(this._resource.id,"data"),data:this.choiceDataCaches[this._resource.data.choice_index],name:"",schema:this._resource.schema.possible_resource_schemas[this._resource.data.choice_index]}:null}}return i.\u0275fac=function(e){return new(e||i)(A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Qfe,decls:1,vars:1,consts:[[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["id","resource-type-container"],[3,"value","disabled","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"resource",4,"ngIf"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"],[3,"resource"]],template:function(e,n){1&e&&_e(0,npe,10,10,"ng-container",0),2&e&&z("ngIf",n.resourceData)},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;row-gap:1rem}#resource-type-container[_ngcontent-%COMP%]{display:flex;column-gap:.5rem;align-items:center}#resource-type-container[_ngcontent-%COMP%] mat-label[_ngcontent-%COMP%]{flex-shrink:0}"],changeDetection:0}),i})();const ipe=["class","block-ui"];function rpe(i,t){if(1&i&&(j(0,"mat-label",7),Ye(1),q()),2&i){const e=ye(2);z("matTooltip",e.resourceDescription),$(1),Zi(" ",e.resource.name," ")}}function spe(i,t){if(1&i){const e=xi();fo(0),_e(1,rpe,2,2,"mat-label",1),j(2,"mat-selection-list",2),ze("selectionChange",function(r){return bn(e),xn(ye().onSelection(r))}),j(3,"mat-list-option",3),Ye(4," Left "),q(),j(5,"mat-list-option",4),Ye(6," Right "),q()(),j(7,"mat-form-field",5)(8,"mat-label"),Ye(9,"Texture ID"),q(),j(10,"input",6),ze("ngModelChange",function(r){return bn(e),xn(ye().resource.data.texture_id=r)})("change",function(){return bn(e),xn(ye().changed.emit())}),q()(),po()}if(2&i){const e=ye();$(1),z("ngIf",e.resource.name),$(2),z("selected",e.resource.data.has_left_fence),$(2),z("selected",e.resource.data.has_right_fence),$(5),z("max",63)("min",0)("step",1)("ngModel",e.resource.data.texture_id)}}let ope=(()=>{class i{constructor(){this.resource=null,this.resourceDescription="",this.changed=new Ve}onSelection(e){for(const n of e.options)this.resource.data[n.value]=n.selected;this.changed.emit()}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:ipe,decls:1,vars:1,consts:[[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],[3,"selectionChange"],["value","has_left_fence",3,"selected"],["value","has_right_fence",3,"selected"],["appearance","fill"],["matInput","","type","number",3,"max","min","step","ngModel","ngModelChange","change"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,n){1&e&&_e(0,spe,11,7,"ng-container",0),2&e&&z("ngIf",n.resource)},dependencies:[gi,Wl,Bh,Xc,Hh,zh,su,ql,zo,ou,xs,vC,_C],changeDetection:0}),i})(),ape=(()=>{class i{constructor(){this._resource=null,this.resourceMap={},this.changed=new Ve}get resource(){return this._resource}set resource(e){this._resource=e,this.resourceMap={};const n=(this._resource?.schema.fields||[]).find(s=>"children"===s.name)?.schema.child_schema;if(!n)return;let r=this.resourceData.items_descr.map((s,o)=>[s,o]).filter(([s,o])=>s>0).map(([s,o])=>o);for(let s=0;s{class i{constructor(e,n,r){this.dialogRef=e,this.fb=n,this.data=r;const s={};for(const o of r.args)s[o.id]=["",sl.required];this.argsForm=this.fb.group(s)}submit(){const e=this.argsForm.value;for(const n of this.data.args)"number"==n.type&&(e[n.id]=+e[n.id]);this.dialogRef.close(e)}}return i.\u0275fac=function(e){return new(e||i)(A(Vy),A(Fee),A(HI))},i.\u0275cmp=it({type:i,selectors:[["app-run-custom-action",8,"dialog"]],attrs:lpe,decls:12,vars:5,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[3,"formGroup"],["appearance","fill",4,"ngFor","ngForOf"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","",3,"disabled","click"],["appearance","fill"],["matInput","",3,"id","type","formControlName"]],template:function(e,n){1&e&&(j(0,"h1",0),Ye(1),q(),j(2,"div",1)(3,"p"),Ye(4),q()(),j(5,"form",2),_e(6,cpe,4,4,"mat-form-field",3),q(),j(7,"div",4)(8,"button",5),ze("click",function(){return n.dialogRef.close()}),Ye(9,"Cancel"),q(),j(10,"button",6),ze("click",function(){return n.submit()}),Ye(11,"Run"),q()()),2&e&&($(1),Zi('Run action "',n.data.title,'"'),$(3),$i(n.data.description),$(1),z("formGroup",n.argsForm),$(1),z("ngForOf",n.data.args),$(4),z("disabled",n.argsForm.invalid))},dependencies:[_o,hR,Wl,Xc,nR,ql,zo,ou,WM,mU,gU,_U,Uh,cC],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),i})();function OG(i,t){return t?e=>cy(t.pipe(Ai(1),function upe(){return Vn((i,t)=>{i.subscribe(Fn(t,ds))})}()),e.pipe(OG(i))):qi((e,n)=>rr(i(e,n)).pipe(Ai(1),qN(e)))}function FG(i,t=Dy){const e=DM(i,t);return OG(()=>e)}const hpe=["mat-menu-item",""];function fpe(i,t){1&i&&(Fr(),j(0,"svg",3),ke(1,"polygon",4),q())}const ppe=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],mpe=["mat-icon, [matMenuItemIcon]","*"];function gpe(i,t){if(1&i){const e=xi();j(0,"div",0),ze("keydown",function(r){return bn(e),xn(ye()._handleKeydown(r))})("click",function(){return bn(e),xn(ye().closed.emit("click"))})("@transformMenu.start",function(r){return bn(e),xn(ye()._onAnimationStart(r))})("@transformMenu.done",function(r){return bn(e),xn(ye()._onAnimationDone(r))}),j(1,"div",1),Bt(2),q()()}if(2&i){const e=ye();z("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),At("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}const _pe=["*"],EP=new fe("MAT_MENU_PANEL"),vpe=GM(HM(class{}));let WS=(()=>{class i extends vpe{constructor(e,n,r,s,o){super(),this._elementRef=e,this._document=n,this._focusMonitor=r,this._parentMenu=s,this._changeDetectorRef=o,this.role="menuitem",this._hovered=new Fe,this._focused=new Fe,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,n):this._getHostElement().focus(n),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),n=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",zr("120ms cubic-bezier(0, 0, 0.2, 1)",Yn({opacity:1,transform:"scale(1)"}))),Er("* => void",zr("100ms 25ms linear",Yn({opacity:0})))]),fadeInItems:Ca("fadeInItems",[bs("showing",Yn({opacity:1})),Er("void => *",[Yn({opacity:0}),zr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let bpe=0;const LG=new fe("mat-menu-default-options",{providedIn:"root",factory:function xpe(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let Lb=(()=>{class i{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=jt(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=jt(e)}set panelClass(e){const n=this._previousPanelClass;n&&n.length&&n.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,n,r,s){this._elementRef=e,this._ngZone=n,this._defaultOptions=r,this._changeDetectorRef=s,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new am,this._classList={},this._panelAnimationState="void",this._animationDone=new Fe,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new Ve,this.close=this.closed,this.panelId="mat-menu-panel-"+bpe++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new P3(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(No(this._directDescendantItems),vs(e=>Rr(...e.map(n=>n._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{const n=this._keyManager;if("enter"===this._panelAnimationState&&n.activeItem?._hasFocus()){const r=e.toArray(),s=Math.max(0,Math.min(r.length-1,n.activeItemIndex||0));r[s]&&!r[s].disabled?n.setActiveItem(s):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(No(this._directDescendantItems),vs(n=>Rr(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){const n=e.keyCode,r=this._keyManager;switch(n){case 27:Vo(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===n||40===n)&&r.setFocusOrigin("keyboard"),void r.onKeydown(e)}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(Ai(1)).subscribe(()=>{let n=null;if(this._directDescendantItems.length&&(n=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!n||!n.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&n&&n.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){const n=Math.min(this._baseElevation+e,24),r=`${this._elevationPrefix}${n}`,s=Object.keys(this._classList).find(o=>o.startsWith(this._elevationPrefix));(!s||s===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(e=this.xPosition,n=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===e,r["mat-menu-after"]="after"===e,r["mat-menu-above"]="above"===n,r["mat-menu-below"]="below"===n,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(No(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot),A(LG),A(ri))},i.\u0275dir=xe({type:i,contentQueries:function(e,n,r){if(1&e&&(Li(r,ype,5),Li(r,WS,5),Li(r,WS,4)),2&e){let s;Dt(s=Tt())&&(n.lazyContent=s.first),Dt(s=Tt())&&(n._allItems=s),Dt(s=Tt())&&(n.items=s)}},viewQuery:function(e,n){if(1&e&&Xn(mo,5),2&e){let r;Dt(r=Tt())&&(n.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"}}),i})(),wpe=(()=>{class i extends Lb{constructor(e,n,r,s){super(e,n,r,s),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return i.\u0275fac=function(e){return new(e||i)(A(lt),A(ot),A(LG),A(ri))},i.\u0275cmp=it({type:i,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,n){2&e&&At("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[An([{provide:EP,useExisting:i}]),rt],ngContentSelectors:_pe,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,n){1&e&&(Ki(),_e(0,gpe,3,6,"ng-template"))},dependencies:[fm],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:[jS.transformMenu,jS.fadeInItems]},changeDetection:0}),i})();const NG=new fe("mat-menu-scroll-strategy"),Cpe={provide:NG,deps:[os],useFactory:function Mpe(i){return()=>i.scrollStrategies.reposition()}},BG=Th({passive:!0});let Spe=(()=>{class i{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(n=>{this._destroyMenu(n),("click"===n||"tab"===n)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(e,n,r,s,o,a,l,c,u){this._overlay=e,this._element=n,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Yt.EMPTY,this._hoverSubscription=Yt.EMPTY,this._menuCloseSubscription=Yt.EMPTY,this._changeDetectorRef=Nt(ri),this._handleTouchStart=h=>{II(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Ve,this.onMenuOpen=this.menuOpened,this.menuClosed=new Ve,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof Lb?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,BG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,BG),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 n=this._createOverlay(e),r=n.getConfig(),s=r.positionStrategy;this._setPosition(e,s),r.hasBackdrop=null==e.hasBackdrop?!this.triggersSubmenu():e.hasBackdrop,n.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof Lb&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ze(e.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;const n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===e||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,n instanceof Lb?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(Dn(r=>"void"===r.toState),Ai(1),Ze(n.lazyContent._attached)).subscribe({next:()=>n.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n?.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 n=0,r=e.parentMenu;for(;r;)n++,r=r.parentMenu;e.setElevation(n)}}_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 n=this._getOverlayConfig(e);this._subscribeToPositions(e,n.positionStrategy),this._overlayRef=this._overlay.create(n),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new km({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,n){e.setPositionClasses&&n.positionChanges.subscribe(r=>{const s="start"===r.connectionPair.overlayX?"after":"before",o="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(s,o)):e.setPositionClasses(s,o)})}_setPosition(e,n){let[r,s]="before"===e.xPosition?["end","start"]:["start","end"],[o,a]="above"===e.yPosition?["bottom","top"]:["top","bottom"],[l,c]=[o,a],[u,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===e.xPosition?"start":"end",s=u="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const m=this._parentMaterialMenu.items.first;this._parentInnerPadding=m?m._getHostElement().offsetTop:0}p="bottom"===o?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(l="top"===o?"bottom":"top",c="top"===a?"bottom":"top");n.withPositions([{originX:r,originY:l,overlayX:u,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:u,overlayY:a,offsetY:-p},{originX:s,originY:c,overlayX:h,overlayY:a,offsetY:-p}])}_menuClosingActions(){const e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return Rr(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:dt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Dn(o=>o!==this._menuItemInstance),Dn(()=>this._menuOpen)):dt(),n)}_handleMousedown(e){TI(e)||(this._openedBy=0===e.button?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){const n=e.keyCode;(13===n||32===n)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===n&&"ltr"===this.dir||37===n&&"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(Dn(e=>e===this._menuItemInstance&&!e.disabled),FG(0,gI)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Lb&&this.menu._isAnimating?this.menu._animationDone.pipe(Ai(1),FG(0,gI),Ze(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Em(e.templateRef,this._viewContainerRef)),this._portal}}return i.\u0275fac=function(e){return new(e||i)(A(os),A(lt),A(Vr),A(NG),A(EP,8),A(WS,10),A(Ma,8),A(Wc),A(ot))},i.\u0275dir=xe({type:i,hostVars:3,hostBindings:function(e,n){1&e&&ze("click",function(s){return n._handleClick(s)})("mousedown",function(s){return n._handleMousedown(s)})("keydown",function(s){return n._handleKeydown(s)}),2&e&&At("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.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"}}),i})(),Epe=(()=>{class i extends Spe{}return i.\u0275fac=function(){let t;return function(n){return(t||(t=hi(i)))(n||i)}}(),i.\u0275dir=xe({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[rt]}),i})(),Ape=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[Cpe],imports:[vo,By,Gn,Pm,Py,Gn]}),i})();function Dpe(i,t){if(1&i){const e=xi();j(0,"button",7),ze("click",function(){return bn(e),xn(ye(2).deserialize())}),ke(1,"mat-icon",8),q()}}function Tpe(i,t){if(1&i){const e=xi();fo(0),_e(1,Dpe,2,0,"button",4),j(2,"button",5),ze("click",function(){return bn(e),xn(ye().serializeBlockReversible())}),ke(3,"mat-icon",6),q(),po()}if(2&i){const e=ye();$(1),z("ngIf",e.isInReversibleSerializationState),$(1),z("disabled",e.isInReversibleSerializationState)}}function Ipe(i,t){1&i&&(j(0,"button",9),ke(1,"mat-icon",10),q()),2&i&&(ye(),z("matMenuTriggerFor",cr(3)))}function Rpe(i,t){if(1&i){const e=xi();j(0,"button",11),ze("click",function(){const s=bn(e).$implicit;return xn(ye().runCustomAction(s))}),j(1,"span"),Ye(2),q()()}if(2&i){const e=t.$implicit;$(2),$i(e.title)}}const kpe=function(){return[]};let YS=(()=>{class i{constructor(e,n,r,s,o){this.mainService=e,this.eelDelegate=n,this.cdr=r,this.dialog=s,this.snackBar=o,this.resource=null,this.isInReversibleSerializationState=!1}serializeBlockReversible(){var e=this;return vt(function*(){if(!e.resource)return;const[n,r]=yield e.eelDelegate.serializeReversible(e.resource.id,[]),s=n.reduce((o,a)=>{let l=0;for(;ln.cdr.markForCheck()),n.snackBar.open("Error while performing action! Reverting file state.. "+o.errorText||0,"OK :(",{duration:5e3})}})()}}return i.\u0275fac=function(e){return new(e||i)(A(rl),A(Yc),A(ri),A(Bm),A(kU))},i.\u0275cmp=it({type:i,selectors:[["app-block-actions"]],inputs:{resource:"resource"},decls:5,vars:4,consts:[[4,"ngIf"],["mat-icon-button","","matTooltip","Run custom action",3,"matMenuTriggerFor",4,"ngIf"],["customActionsMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-icon-button","","matTooltip","Deserialize back from common format",3,"click",4,"ngIf"],["mat-icon-button","","matTooltip","Serialize to common format",3,"disabled","click"],["fontIcon","download"],["mat-icon-button","","matTooltip","Deserialize back from common format",3,"click"],["fontIcon","upload"],["mat-icon-button","","matTooltip","Run custom action",3,"matMenuTriggerFor"],["fontIcon","bolt"],["mat-menu-item","",3,"click"]],template:function(e,n){1&e&&(_e(0,Tpe,4,2,"ng-container",0),_e(1,Ipe,2,1,"button",1),j(2,"mat-menu",null,2),_e(4,Rpe,3,1,"button",3),q()),2&e&&(z("ngIf",null==n.resource||null==n.resource.schema?null:n.resource.schema.serializable_to_disc),$(1),z("ngIf",(null==n.resource||null==n.resource.schema.custom_actions?null:n.resource.schema.custom_actions.length)>0),$(3),z("ngForOf",(null==n.resource?null:n.resource.schema.custom_actions)||Zs(3,kpe)))},dependencies:[_o,gi,xs,$I,nV,wpe,WS,Epe],styles:["[_nghost-%COMP%]{display:flex}"]}),i})();const Ppe=["class","block-ui"];function Ope(i,t){if(1&i&&(j(0,"mat-label",7),Ye(1),q()),2&i){const e=ye();z("matTooltip",e.resourceDescription),$(1),Zi("",null==e.resource?null:e.resource.name," ")}}function Fpe(i,t){if(1&i&&(j(0,"audio",8),ke(1,"source",9),Ht(2,"async"),Ye(3," Your browser does not support the audio element. "),q()),2&i){const e=ye();$(1),z("src",Zt(2,1,e.audioUrl$),Pp)}}function Lpe(i,t){1&i&&ke(0,"mat-spinner",10)}function Npe(i,t){1&i&&ke(0,"app-block-actions",11),2&i&&z("resource",ye().resource)}const Bpe=function(){return["wave_data"]};let Upe=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.main=n,this._resource$=new Ct(null),this.audioUrl$=new Ct(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Fe,this.changed=new Ve}set resource(e){this._resource$.next(e)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Ze(e.destroyed$)).subscribe(function(){var n=vt(function*(r){if(e.audioUrl$.next(null),r){const s=yield e.eelDelegate.serializeResource(r.id,{audio__save_car_sfx_loops:!1});e.audioUrl$.next(s.find(o=>o.endsWith(".mp3"))||null)}});return function(r){return n.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(Yc),A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:Ppe,decls:11,vars:16,consts:[["id","header"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["controls","",4,"ngIf"],["mode","indeterminate",4,"ngIf"],[1,"flex-spacer"],[3,"resource",4,"ngIf"],[3,"resource","hideBlockActions","fieldBlacklist"],["matTooltipPosition","above",3,"matTooltip"],["controls",""],[3,"src"],["mode","indeterminate"],[3,"resource"]],template:function(e,n){if(1&e&&(j(0,"div",0),_e(1,Ope,2,2,"mat-label",1),Ht(2,"async"),_e(3,Fpe,4,3,"audio",2),Ht(4,"async"),_e(5,Lpe,1,0,"mat-spinner",3),Ht(6,"async"),ke(7,"div",4),_e(8,Npe,1,1,"app-block-actions",5),q(),ke(9,"app-compound-block-ui",6),Ht(10,"async")),2&e){let r;$(1),z("ngIf",(null==n.resource?null:n.resource.name)&&(null==n.resource?null:n.resource.name)!=(null==(r=Zt(2,7,n.main.resource$))?null:r.name)),$(2),z("ngIf",Zt(4,9,n.audioUrl$)),$(2),z("ngIf",n.resource&&!Zt(6,11,n.audioUrl$)),$(3),z("ngIf",!n.hideBlockActions),$(1),z("resource",Zt(10,13,n._resource$))("hideBlockActions",!0)("fieldBlacklist",Zs(15,Bpe))}},dependencies:[gi,zo,xs,$S,qc,YS,Hl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),i})();const Vpe=["class","block-ui"];let zpe=(()=>{class i{constructor(e,n){this.eelDelegate=e,this.mainService=n,this._resource$=new Ct(null),this.changed=new Ve,this.previewPaths$=new Ct(null),this.destroyed$=new Fe,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,geometry__replace_car_wheel_with_dummies:!1}}get resource(){return this._resource$.getValue()}set resource(e){this._resource$.next(e)}ngAfterViewInit(){var e=this;return vt(function*(){e._resource$.pipe(Ze(e.destroyed$)).subscribe(function(){var n=vt(function*(r){e.previewPaths$.next(yield e.loadPreviewFilePaths(r?.id))});return function(r){return n.apply(this,arguments)}}()),e.mainService.dataBlockChange$.pipe(Ze(e.destroyed$),Dn(([n,r])=>!!e.resource&&n.startsWith(e.resource.id)),Gc(1500)).subscribe(vt(function*(){e.previewPaths$.next(null),e.previewPaths$.next(yield e.postTmpUpdates(e.resource?.id))}))})()}postTmpUpdates(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResourceTmp(e,Object.entries(n.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(e)).map(([s,o])=>({id:s,value:o})),n.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}loadPreviewFilePaths(e){var n=this;return vt(function*(){if(e){const r=yield n.eelDelegate.serializeResource(e,n.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}previewObjectGroupFunc(e){return e.startsWith("part_hp")?"High-poly":e.startsWith("part_mp")?"Medium-poly":e.startsWith("part_lp")?"Low-poly":e.startsWith("part_res")?"Reserved":e}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return i.\u0275fac=function(e){return new(e||i)(A(Yc),A(rl))},i.\u0275cmp=it({type:i,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:Vpe,decls:4,vars:7,consts:[[3,"paths","groupFunction"],[3,"resource"]],template:function(e,n){1&e&&(ke(0,"app-obj-viewer",0),Ht(1,"async"),ke(2,"app-compound-block-ui",1),Ht(3,"async")),2&e&&(z("paths",Zt(1,3,n.previewPaths$))("groupFunction",n.previewObjectGroupFunc),$(2),z("resource",Zt(3,5,n._resource$)))},dependencies:[qc,kG,Hl],changeDetection:0}),i})();const Hpe=function(){return["children","items_descr"]};let Gpe=(()=>{class i{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new Ve}get resource(){return this._resource}set resource(e){this._resource=e,this.resourceMap={};const n=(this._resource?.schema.fields||[]).find(s=>"children"===s.name)?.schema.child_schema;if(!n)return;let r=0;for(const[s,o]of this.resourceData.children_aliases.entries()){let a=o||"__"+r++;this.resourceMap[a]={id:Xl(this._resource?.id||"",`children/${s}`),data:this.resourceData?.children[s],schema:n,name:""}}}get resourceData(){return this._resource?.data}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=it({type:i,selectors:[["app-base-archive-block-ui"]],inputs:{resource:"resource",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},decls:2,vars:5,consts:[[3,"resource","hideBlockActions","fieldBlacklist"],[3,"resources"]],template:function(e,n){1&e&&ke(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&e&&(z("resource",n.resource)("hideBlockActions",n.hideBlockActions)("fieldBlacklist",Zs(4,Hpe)),$(1),z("resources",n.resourceMap))},dependencies:[qc,gC],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] #top-bar[_ngcontent-%COMP%]{flex-grow:0;display:flex;flex-direction:row;align-items:center;column-gap:2rem}[_nghost-%COMP%] #top-bar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 0 16px}"],changeDetection:0}),i})();function $pe(i,t){if(1&i&&(j(0,"mat-error"),Ye(1),q()),2&i){const e=ye(2);$(1),nm(" ",e.resourceError.data.error_class,": ",e.resourceError.data.error_text," ")}}function Wpe(i,t){1&i&&ke(0,"mat-spinner",5)}function jpe(i,t){if(1&i&&(j(0,"div",2),_e(1,$pe,2,2,"mat-error",3),_e(2,Wpe,1,0,"mat-spinner",4),q()),2&i){const e=ye();$(1),z("ngIf",e.resourceError),$(1),z("ngIf",!e.resourceError)}}function Ype(i,t){}let Nb=(()=>{class i{constructor(e){this.mainService=e,this._component=null,this._componentChangedSub=null,this.destroyed$=new Fe,this.resourceSet$=new Fe,this._resource=null,this._resourceError=null,this._resourceDescription="",this._hideBlockActions=!1,this._disabled=!1}get resource(){return this._resource}get resourceError(){return this._resourceError}set resourceDescription(e){this._resourceDescription=e,this._component&&(this._component.instance.resourceDescription=e)}set hideBlockActions(e){this._hideBlockActions=e,this._component&&(this._component.instance.hideBlockActions=e)}set disabled(e){this._disabled=e,this._component&&(this._component.instance.disabled=e)}set resource(e){if(this.resourceSet$.next(),e?e.data?.error_class?(this._resourceError=e,this._resource=null):(this._resource=e,this._resourceError=null):(this._resource=null,this._resourceError=null),this.dataBlockUiHost.viewContainerRef.clear(),this._resource&&this._resource.schema.block_class_mro){{let r;for(const s of this._resource.schema.block_class_mro.split("__"))if(r=i.DATA_BLOCK_COMPONENTS_MAP[s],r)break;if(!r)throw new Error("Cannot find GUI component for block MRO "+this._resource.schema.block_class_mro);this._component&&this._componentChangedSub&&this._componentChangedSub.unsubscribe(),this._component=this.dataBlockUiHost.viewContainerRef.createComponent(r),this._componentChangedSub=this._component.instance.changed.pipe(Ze(this.destroyed$),Ze(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)for(let a=0;a*{flex-grow:1;max-width:100%}[_nghost-%COMP%] #error-spinner-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-around}"],changeDetection:0}),i})();function qpe(i,t){1&i&&ke(0,"mat-icon",17)}function Xpe(i,t){1&i&&ke(0,"mat-icon",18)}let Kpe=(()=>{class i{constructor(e,n,r,s,o){this.eelDelegate=e,this.mainService=n,this.dialog=r,this.snackBar=s,this.cdr=o}saveResource(){var e=this;return vt(function*(){try{yield e.mainService.saveResource(),e.snackBar.open("File Saved!","OK",{duration:1500})}catch(n){e.snackBar.open("Error while saving file! "+n.errorText,"OK :(",{duration:5e3})}})()}toggleUnknownsVisibility(){this.mainService.hideHiddenFields$.next(!this.mainService.hideHiddenFields$.getValue())}reloadResource(){var e=this;return vt(function*(){if(e.mainService.hasUnsavedChanges){let n=e.dialog.open(EU,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield WI(n.afterClosed())))return}yield e.mainService.reloadResource(),e.cdr.markForCheck()})()}}return i.\u0275fac=function(e){return new(e||i)(A(Yc),A(rl),A(Bm),A(kU),A(ri))},i.\u0275cmp=it({type:i,selectors:[["app-root"]],decls:32,vars:31,consts:[["color","primary"],[1,"flex-spacer"],["mat-icon-button","","matTooltip","Show/hide hidden fields",3,"click"],["fontIcon","visibility_off",4,"ngIf"],["fontIcon","visibility_on",4,"ngIf"],["vertical",""],[3,"resource"],["mat-icon-button","","matTooltip","Reload file from disk",3,"disabled","click"],["fontIcon","refresh"],["mat-icon-button","","matTooltip","Save changes to file",3,"disabled","click"],["fontIcon","save"],["id","content-wrapper"],[1,"scroll-bounds-snapper"],[3,"resource","hideBlockActions"],["id","bmac"],["href","https://www.buymeacoffee.com/andygura","target","_blank"],["src","https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt","Buy Me A Coffee",2,"height","60px !important","width","217px !important"],["fontIcon","visibility_off"],["fontIcon","visibility_on"]],template:function(e,n){if(1&e&&(j(0,"mat-toolbar",0)(1,"span"),Ye(2),Ht(3,"async"),Ht(4,"async"),q(),ke(5,"span",1),j(6,"button",2),ze("click",function(){return n.toggleUnknownsVisibility()}),_e(7,qpe,1,0,"mat-icon",3),Ht(8,"async"),_e(9,Xpe,1,0,"mat-icon",4),Ht(10,"async"),q(),ke(11,"mat-divider",5)(12,"app-block-actions",6),Ht(13,"async"),j(14,"button",7),ze("click",function(){return n.reloadResource()}),Ht(15,"async"),ke(16,"mat-icon",8),q(),ke(17,"mat-divider",5),j(18,"button",9),ze("click",function(){return n.saveResource()}),Ht(19,"async"),Ht(20,"async"),ke(21,"mat-icon",10),q()(),j(22,"div",11),ke(23,"div",12)(24,"app-editor",13),Ht(25,"async"),Ht(26,"async"),Ht(27,"async"),j(28,"div",14)(29,"a",15),ke(30,"img",16),q()(),ke(31,"div",12),q()),2&e){let r;$(2),nm("",(null==(r=Zt(3,9,n.mainService.resource$))?null:r.name)||"...","",Zt(4,11,n.mainService.hasUnsavedChanges$)?"*":"",""),$(5),z("ngIf",Zt(8,13,n.mainService.hideHiddenFields$)),$(2),z("ngIf",!Zt(10,15,n.mainService.hideHiddenFields$)),$(3),z("resource",Zt(13,17,n.mainService.resource$)),$(2),z("disabled",!Zt(15,19,n.mainService.eelDelegate.openedResourcePath$)),$(4),z("disabled",!Zt(19,21,n.mainService.resource$)||!Zt(20,23,n.mainService.hasUnsavedChanges$)),$(6),z("resource",Zt(25,25,n.mainService.customActionRunning$)?null:Zt(26,27,n.mainService.resource$)||Zt(27,29,n.mainService.error$))("hideBlockActions",!0)}},dependencies:[gi,UQ,zQ,xs,$I,nV,Nb,YS,Hl],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}#content-wrapper[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;padding:1rem;height:100%;scroll-snap-type:y proximity}#content-wrapper[_ngcontent-%COMP%] .scroll-bounds-snapper[_ngcontent-%COMP%]{height:0;width:100%;scroll-snap-align:start;scroll-margin:1rem}#bmac[_ngcontent-%COMP%]{text-align:end;margin-top:1rem}mat-divider[_ngcontent-%COMP%]{height:100%;margin:0 16px}"],changeDetection:0}),i})();function UG(i){return new he(3e3,!1)}function Rme(){return typeof window<"u"&&typeof window.document<"u"}function AP(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Eu(i){switch(i.length){case 0:return new Uy;case 1:return i[0];default:return new lU(i)}}function VG(i,t,e,n,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(n.forEach(u=>{const h=u.get("offset"),p=h==l,m=p&&c||new Map;u.forEach((g,b)=>{let v=b,y=g;if("offset"!==b)switch(v=t.normalizePropertyName(v,o),y){case VI:y=r.get(b);break;case jc:y=s.get(b);break;default:y=t.normalizeStyleValue(b,v,y,o)}m.set(v,y)}),p||a.push(m),c=m,l=h}),o.length)throw function yme(i){return new he(3502,!1)}();return a}function DP(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&TP(e,"start",i)));break;case"done":i.onDone(()=>n(e&&TP(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&TP(e,"destroy",i)))}}function TP(i,t,e){const s=IP(i.element,i.triggerName,i.fromState,i.toState,t||i.phaseName,e.totalTime??i.totalTime,!!e.disabled),o=i._data;return null!=o&&(s._data=o),s}function IP(i,t,e,n,r="",s=0,o){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function qo(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function zG(i){const t=i.indexOf(":");return[i.substring(1,t),i.slice(t+1)]}let RP=(i,t)=>!1,HG=(i,t,e)=>[],GG=null;function kP(i){const t=i.parentNode||i.host;return t===GG?null:t}(AP()||typeof Element<"u")&&(Rme()?(GG=(()=>document.documentElement)(),RP=(i,t)=>{for(;t;){if(t===i)return!0;t=kP(t)}return!1}):RP=(i,t)=>i.contains(t),HG=(i,t,e)=>{if(e)return Array.from(i.querySelectorAll(t));const n=i.querySelector(t);return n?[n]:[]});let Tf=null,$G=!1;const WG=RP,jG=HG;let YG=(()=>{class i{validateStyleProperty(e){return function Pme(i){Tf||(Tf=function Ome(){return typeof document<"u"?document.body:null}()||{},$G=!!Tf.style&&"WebkitAppearance"in Tf.style);let t=!0;return Tf.style&&!function kme(i){return"ebkit"==i.substring(1,6)}(i)&&(t=i in Tf.style,!t&&$G&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Tf.style)),t}(e)}matchesElement(e,n){return!1}containsElement(e,n){return WG(e,n)}getParentElement(e){return kP(e)}query(e,n,r){return jG(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,s,o,a=[],l){return new Uy(r,s)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})(),PP=(()=>{class i{}return i.NOOP=new YG,i})();const Fme=1e3,OP="ng-enter",qS="ng-leave",XS="ng-trigger",KS=".ng-trigger",XG="ng-animating",FP=".ng-animating";function cd(i){if("number"==typeof i)return i;const t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:LP(parseFloat(t[1]),t[2])}function LP(i,t){return"s"===t?i*Fme:i}function ZS(i,t,e){return i.hasOwnProperty("duration")?i:function Nme(i,t,e){let r,s=0,o="";if("string"==typeof i){const a=i.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(UG()),{duration:0,delay:0,easing:""};r=LP(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=LP(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=i;if(!e){let a=!1,l=t.length;r<0&&(t.push(function Zpe(){return new he(3100,!1)}()),a=!0),s<0&&(t.push(function Qpe(){return new he(3101,!1)}()),a=!0),a&&t.splice(l,0,UG())}return{duration:r,delay:s,easing:o}}(i,t,e)}function Bb(i,t={}){return Object.keys(i).forEach(e=>{t[e]=i[e]}),t}function KG(i){const t=new Map;return Object.keys(i).forEach(e=>{t.set(e,i[e])}),t}function Au(i,t=new Map,e){if(e)for(let[n,r]of e)t.set(n,r);for(let[n,r]of i)t.set(n,r);return t}function QG(i,t,e){return e?t+":"+e+";":""}function JG(i){let t="";for(let e=0;e{const s=BP(r);e&&!e.has(r)&&e.set(r,i.style[s]),i.style[s]=n}),AP()&&JG(i))}function If(i,t){i.style&&(t.forEach((e,n)=>{const r=BP(n);i.style[r]=""}),AP()&&JG(i))}function Ub(i){return Array.isArray(i)?1==i.length?i[0]:sU(i):i}const NP=new RegExp("{{\\s*(.+?)\\s*}}","g");function e8(i){let t=[];if("string"==typeof i){let e;for(;e=NP.exec(i);)t.push(e[1]);NP.lastIndex=0}return t}function Vb(i,t,e){const n=i.toString(),r=n.replace(NP,(s,o)=>{let a=t[o];return null==a&&(e.push(function eme(i){return new he(3003,!1)}()),a=""),a.toString()});return r==n?i:r}function QS(i){const t=[];let e=i.next();for(;!e.done;)t.push(e.value),e=i.next();return t}const Vme=/-+([a-z0-9])/g;function BP(i){return i.replace(Vme,(...t)=>t[1].toUpperCase())}function zme(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Xo(i,t,e){switch(t.type){case 7:return i.visitTrigger(t,e);case 0:return i.visitState(t,e);case 1:return i.visitTransition(t,e);case 2:return i.visitSequence(t,e);case 3:return i.visitGroup(t,e);case 4:return i.visitAnimate(t,e);case 5:return i.visitKeyframes(t,e);case 6:return i.visitStyle(t,e);case 8:return i.visitReference(t,e);case 9:return i.visitAnimateChild(t,e);case 10:return i.visitAnimateRef(t,e);case 11:return i.visitQuery(t,e);case 12:return i.visitStagger(t,e);default:throw function tme(i){return new he(3004,!1)}()}}function t8(i,t){return window.getComputedStyle(i)[t]}const tE="*";function Yme(i,t){const e=[];return"string"==typeof i?i.split(/\s*,\s*/).forEach(n=>function qme(i,t,e){if(":"==i[0]){const l=function Xme(i,t){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n) *"}}(i,e);if("function"==typeof l)return void t.push(l);i=l}const n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return e.push(function pme(i){return new he(3015,!1)}()),t;const r=n[1],s=n[2],o=n[3];t.push(n8(r,o));"<"==s[0]&&!(r==tE&&o==tE)&&t.push(n8(o,r))}(n,e,t)):e.push(i),e}const nE=new Set(["true","1"]),iE=new Set(["false","0"]);function n8(i,t){const e=nE.has(i)||iE.has(i),n=nE.has(t)||iE.has(t);return(r,s)=>{let o=i==tE||i==r,a=t==tE||t==s;return!o&&e&&"boolean"==typeof r&&(o=r?nE.has(i):iE.has(i)),!a&&n&&"boolean"==typeof s&&(a=s?nE.has(t):iE.has(t)),o&&a}}const Kme=new RegExp("s*:selfs*,?","g");function UP(i,t,e,n){return new Zme(i).build(t,e,n)}class Zme{constructor(t){this._driver=t}build(t,e,n){const r=new ege(e);return this._resetContextStyleTimingState(r),Xo(this,Ub(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,r=e.depCount=0;const s=[],o=[];return"@"==t.name.charAt(0)&&e.errors.push(function ime(){return new he(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,s.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);n+=l.queryCount,r+=l.depCount,o.push(l)}else e.errors.push(function rme(){return new he(3007,!1)}())}),{type:7,name:t.name,states:s,transitions:o,queryCount:n,depCount:r,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,o=r||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{e8(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(QS(s.values()),e.errors.push(function sme(i,t){return new he(3008,!1)}()))}return{type:0,name:t.name,style:n,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Xo(this,Ub(t.animation),e);return{type:1,matchers:Yme(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Rf(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(n=>Xo(this,n,e)),options:Rf(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(o=>{e.currentTime=n;const a=Xo(this,o,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:s,options:Rf(t.options)}}visitAnimate(t,e){const n=function nge(i,t){if(i.hasOwnProperty("duration"))return i;if("number"==typeof i)return VP(ZS(i,t).duration,0,"");const e=i;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=VP(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=ZS(e,t);return VP(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=n;let r,s=t.styles?t.styles:Yn({});if(5==s.type)r=this.visitKeyframes(s,e);else{let o=t.styles,a=!1;if(!o){a=!0;const c={};n.easing&&(c.easing=n.easing),o=Yn(c)}e.currentTime+=n.duration+n.delay;const l=this.visitStyle(o,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:n,style:r,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===jc?n.push(a):e.errors.push(new he(3002,!1)):n.push(KG(a));let s=!1,o=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s))for(let l of a.values())if(l.toString().indexOf("{{")>=0){s=!0;break}}),{type:6,styles:n,easing:o,offset:t.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let r=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let h=!0;u&&(s!=r&&s>=u.startTime&&r<=u.endTime&&(e.errors.push(function ame(i,t,e,n,r){return new he(3010,!1)}()),h=!1),s=u.startTime),h&&c.set(l,{startTime:s,endTime:r}),e.options&&function Ume(i,t,e){const n=t.params||{},r=e8(i);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||e.push(function Jpe(i){return new he(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function lme(){return new he(3011,!1)}()),n;let s=0;const o=[];let a=!1,l=!1,c=0;const u=t.steps.map(y=>{const M=this._makeStyleAst(y,e);let x=null!=M.offset?M.offset:function tge(i){if("string"==typeof i)return null;let t=null;if(Array.isArray(i))i.forEach(e=>{if(e instanceof Map&&e.has("offset")){const n=e;t=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){const e=i;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(M.styles),C=0;return null!=x&&(s++,C=M.offset=x),l=l||C<0||C>1,a=a||C0&&s{const x=p>0?M==m?1:p*M:o[M],C=x*v;e.currentTime=g+b.delay+C,b.duration=C,this._validateStyleAst(y,e),y.offset=x,n.styles.push(y)}),n}visitReference(t,e){return{type:8,animation:Xo(this,Ub(t.animation),e),options:Rf(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Rf(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Rf(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function Qme(i){const t=!!i.split(/\s*,\s*/).find(e=>":self"==e);return t&&(i=i.replace(Kme,"")),i=i.replace(/@\*/g,KS).replace(/@\w+/g,e=>KS+"-"+e.slice(1)).replace(/:animating/g,FP),[i,t]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,qo(e.collectedStyles,e.currentQuerySelector,new Map);const a=Xo(this,Ub(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:t.selector,options:Rf(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function hme(){return new he(3013,!1)}());const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:ZS(t.timings,e.errors,!0);return{type:12,animation:Xo(this,Ub(t.animation),e),timings:n,options:null}}}class ege{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 Rf(i){return i?(i=Bb(i)).params&&(i.params=function Jme(i){return i?Bb(i):null}(i.params)):i={},i}function VP(i,t,e){return{duration:i,delay:t,easing:e}}function zP(i,t,e,n,r,s,o=null,a=!1){return{type:1,element:i,keyframes:t,preStyleProps:e,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class rE{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const sge=new RegExp(":enter","g"),age=new RegExp(":leave","g");function HP(i,t,e,n,r,s=new Map,o=new Map,a,l,c=[]){return(new lge).buildKeyframes(i,t,e,n,r,s,o,a,l,c)}class lge{buildKeyframes(t,e,n,r,s,o,a,l,c,u=[]){c=c||new rE;const h=new GP(t,e,c,r,s,u,[]);h.options=l;const p=l.delay?cd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),Xo(this,n,h);const m=h.timelines.filter(g=>g.containsAnimation());if(m.length&&a.size){let g;for(let b=m.length-1;b>=0;b--){const v=m[b];if(v.element===e){g=v;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([a],null,h.errors,l)}return m.length?m.map(g=>g.buildKeyframes()):[zP(e,[],[],[],0,p,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.get(e.element);if(n){const r=e.createSubContext(t.options),s=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);s!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,n),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,n){for(const r of t){const s=r?.delay;if(s){const o="number"==typeof s?s:cd(Vb(s,r?.params??{},e.errors));n.delayNextStep(o)}}}_visitSubInstructions(t,e,n){let s=e.currentTimeline.currentTime;const o=null!=n.duration?cd(n.duration):null,a=null!=n.delay?cd(n.delay):null;return 0!==o&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(t,e){e.updateOptions(t.options,!0),Xo(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let r=e;const s=t.options;if(s&&(s.params||s.delay)&&(r=e.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=sE);const o=cd(s.delay);r.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>Xo(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let r=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?cd(t.options.delay):0;t.steps.forEach(o=>{const a=e.createSubContext(t.options);s&&a.delayNextStep(s),Xo(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(o=>e.currentTimeline.mergeTimelineCollectedStyles(o)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return ZS(e.params?Vb(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();const s=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,r=e.currentTimeline.duration,s=n.duration,a=e.createSubContext().currentTimeline;a.easing=n.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,r=t.options||{},s=r.delay?cd(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=sE);let o=n;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const h=e.createSubContext(t.options,c);s&&h.delayNextStep(s),c===e.element&&(l=h.currentTimeline),Xo(this,t.animation,h),h.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,h.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,r=e.currentTimeline,s=t.timings,o=Math.abs(s.duration),a=o*(e.currentQueryTotal-1);let l=o*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const h=u.currentTime;Xo(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-h+(r.startTime-n.currentTimeline.startTime)}}const sE={};class GP{constructor(t,e,n,r,s,o,a,l){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=sE,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new oE(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let r=this.options;null!=n.duration&&(r.duration=cd(n.duration)),null!=n.delay&&(r.delay=cd(n.delay));const s=n.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!e||!o.hasOwnProperty(a))&&(o[a]=Vb(s[a],o,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(r=>{n[r]=e[r]})}}return t}createSubContext(t=null,e,n){const r=e||this.element,s=new GP(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=sE,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(n??0)+t.delay,easing:""},s=new cge(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,r,s,o){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(sge,"."+this._enterClassName)).replace(age,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=n);0!==n&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!s&&0==a.length&&o.push(function fme(i){return new he(3014,!1)}()),a}}class oE{constructor(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,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 oE(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,n]of this._globalTimelineStyles)this._backFill.set(e,n||jc),this._currentKeyframe.set(e,jc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},o=function dge(i,t){const e=new Map;let n;return i.forEach(r=>{if("*"===r){n=n||t.keys();for(let s of n)e.set(s,jc)}else Au(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of o){const c=Vb(l,s,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??jc),this._updateStyle(a,c)}}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,n)=>{const r=this._styleSummary.get(n);(!r||e.time>r.time)&&this._updateStyle(n,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Au(a,new Map,this._backFill);c.forEach((u,h)=>{u===VI?t.add(h):u===jc&&e.add(h)}),n||c.set("offset",l/this.duration),r.push(c)});const s=t.size?QS(t.values()):[],o=e.size?QS(e.values()):[];if(n){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return zP(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class cge extends oE{constructor(t,e,n,r,s,o,a=!1){super(t,e,o.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],o=n+e,a=e/o,l=Au(t[0]);l.set("offset",0),s.push(l);const c=Au(t[0]);c.set("offset",s8(a)),s.push(c);const u=t.length-1;for(let h=1;h<=u;h++){let p=Au(t[h]);const m=p.get("offset");p.set("offset",s8((e+m*n)/o)),s.push(p)}n=o,e=0,r="",t=s}return zP(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function s8(i,t=3){const e=Math.pow(10,t-1);return Math.round(i*e)/e}class $P{}const uge=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 hge extends $P{normalizePropertyName(t,e){return BP(t)}normalizeStyleValue(t,e,n,r){let s="";const o=n.toString().trim();if(uge.has(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function nme(i,t){return new he(3005,!1)}())}return o+s}}function o8(i,t,e,n,r,s,o,a,l,c,u,h,p){return{type:0,element:i,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:s,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:p}}const WP={};class a8{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function fge(i,t,e,n,r){return i.some(s=>s(t,e,n,r))}(this.ast.matchers,t,e,n,r)}buildStyles(t,e,n){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,n):new Map}build(t,e,n,r,s,o,a,l,c,u){const h=[],p=this.ast.options&&this.ast.options.params||WP,g=this.buildStyles(n,a&&a.params||WP,h),b=l&&l.params||WP,v=this.buildStyles(r,b,h),y=new Set,M=new Map,x=new Map,C="void"===r,O={params:pge(b,p),delay:this.ast.options?.delay},T=u?[]:HP(t,e,this.ast.animation,s,o,g,v,O,c,h);let P=0;if(T.forEach(I=>{P=Math.max(I.duration+I.delay,P)}),h.length)return o8(e,this._triggerName,n,r,C,g,v,[],[],M,x,P,h);T.forEach(I=>{const E=I.element,X=qo(M,E,new Set);I.preStyleProps.forEach(W=>X.add(W));const re=qo(x,E,new Set);I.postStyleProps.forEach(W=>re.add(W)),E!==e&&y.add(E)});const B=QS(y.values());return o8(e,this._triggerName,n,r,C,g,v,T,B,M,x,P)}}function pge(i,t){const e=Bb(t);for(const n in i)i.hasOwnProperty(n)&&null!=i[n]&&(e[n]=i[n]);return e}class mge{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){const n=new Map,r=Bb(this.defaultParams);return Object.keys(t).forEach(s=>{const o=t[s];null!==o&&(r[s]=o)}),this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,a)=>{o&&(o=Vb(o,r,e));const l=this.normalizer.normalizePropertyName(a,e);o=this.normalizer.normalizeStyleValue(a,l,o,e),n.set(a,o)})}),n}}class _ge{constructor(t,e,n){this.name=t,this.ast=e,this._normalizer=n,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new mge(r.style,r.options&&r.options.params||{},n))}),l8(this.states,"true","1"),l8(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new a8(t,r,this.states))}),this.fallbackTransition=function vge(i,t,e){return new a8(i,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,r){return this.transitionFactories.find(o=>o.match(t,e,n,r))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function l8(i,t,e){i.has(t)?i.has(e)||i.set(e,i.get(t)):i.has(e)&&i.set(t,i.get(e))}const yge=new rE;class bge{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const n=[],r=[],s=UP(this._driver,e,n,r);if(n.length)throw function bme(i){return new he(3503,!1)}();this._animations.set(t,s)}_buildPlayer(t,e,n){const r=t.element,s=VG(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const r=[],s=this._animations.get(t);let o;const a=new Map;if(s?(o=HP(this._driver,e,s,OP,qS,new Map,new Map,n,yge,r),o.forEach(u=>{const h=qo(a,u.element,new Map);u.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function xme(){return new he(3300,!1)}()),o=[]),r.length)throw function wme(i){return new he(3504,!1)}();a.forEach((u,h)=>{u.forEach((p,m)=>{u.set(m,this._driver.computeStyle(h,m,jc))})});const c=Eu(o.map(u=>{const h=a.get(u.element);return this._buildPlayer(u,new Map,h)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function Mme(i){return new he(3301,!1)}();return e}listen(t,e,n,r){const s=IP(e,"","","");return DP(this._getPlayer(t),n,s,r),()=>{}}command(t,e,n,r){if("register"==n)return void this.register(t,r[0]);if("create"==n)return void this.create(t,e,r[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const c8="ng-animate-queued",jP="ng-animate-disabled",Sge=[],d8={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ege={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ka="__ng_removed";class YP{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function Ige(i){return i??null}(n?t.value:t),n){const s=Bb(t);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const n=this.options.params;Object.keys(e).forEach(r=>{null==n[r]&&(n[r]=e[r])})}}}const zb="void",qP=new YP(zb);class Age{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Pa(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw function Cme(i,t){return new he(3302,!1)}();if(null==n||0==n.length)throw function Sme(i){return new he(3303,!1)}();if(!function Rge(i){return"start"==i||"done"==i}(n))throw function Eme(i,t){return new he(3400,!1)}();const s=qo(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};s.push(o);const a=qo(this._engine.statesByElement,t,new Map);return a.has(e)||(Pa(t,XS),Pa(t,XS+"-"+e),a.set(e,qP)),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,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 Ame(i){return new he(3401,!1)}();return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),o=new XP(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Pa(t,XS),Pa(t,XS+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new YP(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=qP),c.value!==zb&&l.value===c.value){if(!function Oge(i,t){const e=Object.keys(i),n=Object.keys(t);if(e.length!=n.length)return!1;for(let r=0;r{If(t,v),ic(t,y)})}return}const p=qo(this._engine.playersByElement,t,[]);p.forEach(b=>{b.namespaceId==this.id&&b.triggerName==e&&b.queued&&b.destroy()});let m=s.matchTransition(l.value,c.value,t,c.params),g=!1;if(!m){if(!r)return;m=s.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:m,fromState:l,toState:c,player:o,isFallbackTransition:g}),g||(Pa(t,c8),o.onStart(()=>{Hg(t,c8)})),o.onDone(()=>{let b=this.players.indexOf(o);b>=0&&this.players.splice(b,1);const v=this._engine.playersByElement.get(t);if(v){let y=v.indexOf(o);y>=0&&v.splice(y,1)}}),this.players.push(o),p.push(o),o}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,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(n=>n.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,KS,!0);n.forEach(r=>{if(r[ka])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,n,r){const s=this._engine.statesByElement.get(t),o=new Map;if(s){const a=[];if(s.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){const u=this.trigger(t,c,zb,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,o),n&&Eu(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),n=this._engine.statesByElement.get(t);if(e&&n){const r=new Set;e.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers.get(o).fallbackTransition,c=n.get(o)||qP,u=new YP(zb),h=new XP(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:c,toState:u,player:h,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(n.totalAnimations){const s=n.players.length?n.playersByQueriedElement.get(t):[];if(s&&s.length)r=!0;else{let o=t;for(;o=o.parentNode;)if(n.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)n.markElementAsRemoved(this.id,t,!1,e);else{const s=t[ka];(!s||s===d8)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Pa(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==n.triggerName){const l=IP(s,n.triggerName,n.fromState.value,n.toState.value);l._data=t,DP(n.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(n)}),this._queue=[],e.sort((n,r)=>{const s=n.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(n.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(n=>n.element===t)||e,e}}class Dge{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,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,s)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&t.push(n)})}),t}createNamespace(t,e){const n=new Age(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=n.indexOf(l);n.splice(c+1,0,t),o=!0;break}a=this.driver.getParentElement(a)}o||n.unshift(t)}else n.push(t);return r.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n)for(let r of n.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&e.add(s)}return e}trigger(t,e,n,r){if(aE(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!aE(e))return;const s=e[ka];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(e);o>=0&&this.collectedLeaveElements.splice(o,1)}if(t){const o=this._fetchNamespace(t);o&&o.insertNode(e,n)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Pa(t,jP)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Hg(t,jP))}removeNode(t,e,n,r){if(aE(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),n){const o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,n,r,s){this.collectedLeaveElements.push(e),e[ka]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(t,e,n,r,s){return aE(e)?this._fetchNamespace(t).listen(e,n,r,s):()=>{}}_buildInstruction(t,e,n,r,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,KS,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,FP,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Eu(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[ka];if(e&&e.setForRemoval){if(t[ka]=d8,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(jP)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){const n=this._whenQuietFns;this._whenQuietFns=[],e.length?Eu(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw function Dme(i){return new he(3402,!1)}()}_flushAnimations(t,e){const n=new rE,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Q=>{u.add(Q);const ue=this.driver.query(Q,".ng-animate-queued",!0);for(let K=0;K{const K=OP+b++;g.set(ue,K),Q.forEach(ge=>Pa(ge,K))});const v=[],y=new Set,M=new Set;for(let Q=0;Qy.add(ge)):M.add(ue))}const x=new Map,C=f8(p,Array.from(y));C.forEach((Q,ue)=>{const K=qS+b++;x.set(ue,K),Q.forEach(ge=>Pa(ge,K))}),t.push(()=>{m.forEach((Q,ue)=>{const K=g.get(ue);Q.forEach(ge=>Hg(ge,K))}),C.forEach((Q,ue)=>{const K=x.get(ue);Q.forEach(ge=>Hg(ge,K))}),v.forEach(Q=>{this.processLeaveNode(Q)})});const O=[],T=[];for(let Q=this._namespaceList.length-1;Q>=0;Q--)this._namespaceList[Q].drainQueuedTransitions(e).forEach(K=>{const ge=K.player,Ce=K.element;if(O.push(ge),this.collectedEnterElements.length){const Re=Ce[ka];if(Re&&Re.setForMove){if(Re.previousTriggersValues&&Re.previousTriggersValues.has(K.triggerName)){const ht=Re.previousTriggersValues.get(K.triggerName),yt=this.statesByElement.get(K.element);if(yt&&yt.has(K.triggerName)){const mt=yt.get(K.triggerName);mt.value=ht,yt.set(K.triggerName,mt)}}return void ge.destroy()}}const Ge=!h||!this.driver.containsElement(h,Ce),_t=x.get(Ce),Qt=g.get(Ce),se=this._buildInstruction(K,n,Qt,_t,Ge);if(se.errors&&se.errors.length)return void T.push(se);if(Ge)return ge.onStart(()=>If(Ce,se.fromStyles)),ge.onDestroy(()=>ic(Ce,se.toStyles)),void r.push(ge);if(K.isFallbackTransition)return ge.onStart(()=>If(Ce,se.fromStyles)),ge.onDestroy(()=>ic(Ce,se.toStyles)),void r.push(ge);const Oe=[];se.timelines.forEach(Re=>{Re.stretchStartingKeyframe=!0,this.disabledNodes.has(Re.element)||Oe.push(Re)}),se.timelines=Oe,n.append(Ce,se.timelines),o.push({instruction:se,player:ge,element:Ce}),se.queriedElements.forEach(Re=>qo(a,Re,[]).push(ge)),se.preStyleProps.forEach((Re,ht)=>{if(Re.size){let yt=l.get(ht);yt||l.set(ht,yt=new Set),Re.forEach((mt,ee)=>yt.add(ee))}}),se.postStyleProps.forEach((Re,ht)=>{let yt=c.get(ht);yt||c.set(ht,yt=new Set),Re.forEach((mt,ee)=>yt.add(ee))})});if(T.length){const Q=[];T.forEach(ue=>{Q.push(function Tme(i,t){return new he(3505,!1)}())}),O.forEach(ue=>ue.destroy()),this.reportError(Q)}const P=new Map,B=new Map;o.forEach(Q=>{const ue=Q.element;n.has(ue)&&(B.set(ue,ue),this._beforeAnimationBuild(Q.player.namespaceId,Q.instruction,P))}),r.forEach(Q=>{const ue=Q.element;this._getPreviousPlayers(ue,!1,Q.namespaceId,Q.triggerName,null).forEach(ge=>{qo(P,ue,[]).push(ge),ge.destroy()})});const I=v.filter(Q=>m8(Q,l,c)),E=new Map;h8(E,this.driver,M,c,jc).forEach(Q=>{m8(Q,l,c)&&I.push(Q)});const re=new Map;m.forEach((Q,ue)=>{h8(re,this.driver,new Set(Q),l,VI)}),I.forEach(Q=>{const ue=E.get(Q),K=re.get(Q);E.set(Q,new Map([...Array.from(ue?.entries()??[]),...Array.from(K?.entries()??[])]))});const W=[],ie=[],pe={};o.forEach(Q=>{const{element:ue,player:K,instruction:ge}=Q;if(n.has(ue)){if(u.has(ue))return K.onDestroy(()=>ic(ue,ge.toStyles)),K.disabled=!0,K.overrideTotalTime(ge.totalTime),void r.push(K);let Ce=pe;if(B.size>1){let _t=ue;const Qt=[];for(;_t=_t.parentNode;){const se=B.get(_t);if(se){Ce=se;break}Qt.push(_t)}Qt.forEach(se=>B.set(se,Ce))}const Ge=this._buildAnimation(K.namespaceId,ge,P,s,re,E);if(K.setRealPlayer(Ge),Ce===pe)W.push(K);else{const _t=this.playersByElement.get(Ce);_t&&_t.length&&(K.parentPlayer=Eu(_t)),r.push(K)}}else If(ue,ge.fromStyles),K.onDestroy(()=>ic(ue,ge.toStyles)),ie.push(K),u.has(ue)&&r.push(K)}),ie.forEach(Q=>{const ue=s.get(Q.element);if(ue&&ue.length){const K=Eu(ue);Q.setRealPlayer(K)}}),r.forEach(Q=>{Q.parentPlayer?Q.syncPlayerEvents(Q.parentPlayer):Q.destroy()});for(let Q=0;Q!Ge.destroyed);Ce.length?kge(this,ue,Ce):this.processLeaveNode(ue)}return v.length=0,W.forEach(Q=>{this.players.push(Q),Q.onDone(()=>{Q.destroy();const ue=this.players.indexOf(Q);this.players.splice(ue,1)}),Q.play()}),W}elementContainsData(t,e){let n=!1;const r=e[ka];return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,r,s){let o=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(o=a)}else{const a=this.playersByElement.get(t);if(a){const l=!s||s==zb;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(n||r)&&(o=o.filter(a=>!(n&&n!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(t,e,n){const s=e.element,o=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==s,h=qo(n,c,[]);this._getPreviousPlayers(c,u,o,a,e.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}If(s,e.fromStyles)}_buildAnimation(t,e,n,r,s,o){const a=e.triggerName,l=e.element,c=[],u=new Set,h=new Set,p=e.timelines.map(g=>{const b=g.element;u.add(b);const v=b[ka];if(v&&v.removedBeforeQueried)return new Uy(g.duration,g.delay);const y=b!==l,M=function Pge(i){const t=[];return p8(i,t),t}((n.get(b)||Sge).map(P=>P.getRealPlayer())).filter(P=>!!P.element&&P.element===b),x=s.get(b),C=o.get(b),O=VG(0,this._normalizer,0,g.keyframes,x,C),T=this._buildPlayer(g,O,M);if(g.subTimeline&&r&&h.add(b),y){const P=new XP(t,a,b);P.setRealPlayer(T),c.push(P)}return T});c.forEach(g=>{qo(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function Tge(i,t,e){let n=i.get(t);if(n){if(n.length){const r=n.indexOf(e);n.splice(r,1)}0==n.length&&i.delete(t)}return n}(this.playersByQueriedElement,g.element,g))}),u.forEach(g=>Pa(g,XG));const m=Eu(p);return m.onDestroy(()=>{u.forEach(g=>Hg(g,XG)),ic(l,e.toStyles)}),h.forEach(g=>{qo(r,g,[]).push(m)}),m}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new Uy(t.duration,t.delay)}}class XP{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new Uy,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,n)=>{e.forEach(r=>DP(t,n,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){qo(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 aE(i){return i&&1===i.nodeType}function u8(i,t){const e=i.style.display;return i.style.display=t??"none",e}function h8(i,t,e,n,r){const s=[];e.forEach(l=>s.push(u8(l)));const o=[];n.forEach((l,c)=>{const u=new Map;l.forEach(h=>{const p=t.computeStyle(c,h,r);u.set(h,p),(!p||0==p.length)&&(c[ka]=Ege,o.push(c))}),i.set(c,u)});let a=0;return e.forEach(l=>u8(l,s[a++])),o}function f8(i,t){const e=new Map;if(i.forEach(a=>e.set(a,[])),0==t.length)return e;const n=1,r=new Set(t),s=new Map;function o(a){if(!a)return n;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?n:o(c),s.set(a,l),l}return t.forEach(a=>{const l=o(a);l!==n&&e.get(l).push(a)}),e}function Pa(i,t){i.classList?.add(t)}function Hg(i,t){i.classList?.remove(t)}function kge(i,t,e){Eu(e).onDone(()=>i.processLeaveNode(t))}function p8(i,t){for(let e=0;er.add(s)):t.set(i,n),e.delete(i),!0}class lE{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new Dge(t,e,n),this._timelineEngine=new bge(t,e,n),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(t,e,n,r,s){const o=t+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],c=[],u=UP(this._driver,s,l,c);if(l.length)throw function vme(i,t){return new he(3404,!1)}();a=function gge(i,t,e){return new _ge(i,t,e)}(r,u,this._normalizer),this._triggerCache[o]=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,n,r){this._transitionEngine.insertNode(t,e,n,r)}onRemove(t,e,n,r){this._transitionEngine.removeNode(t,e,r||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,r){if("@"==n.charAt(0)){const[s,o]=zG(n);this._timelineEngine.command(s,e,o,r)}else this._transitionEngine.trigger(t,e,n,r)}listen(t,e,n,r,s){if("@"==n.charAt(0)){const[o,a]=zG(n);return this._timelineEngine.listen(o,e,a,s)}return this._transitionEngine.listen(t,e,n,r,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let Lge=(()=>{class i{constructor(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r,this._state=0;let s=i.initialStylesByElement.get(e);s||i.initialStylesByElement.set(e,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&ic(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ic(this._element,this._initialStyles),this._endStyles&&(ic(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(If(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(If(this._element,this._endStyles),this._endStyles=null),ic(this._element,this._initialStyles),this._state=3)}}return i.initialStylesByElement=new WeakMap,i})();function KP(i){let t=null;return i.forEach((e,n)=>{(function Nge(i){return"display"===i||"position"===i})(n)&&(t=t||new Map,t.set(n,e))}),t}class g8{constructor(t,e,n,r){this.element=t,this.keyframes=e,this.options=n,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=n.duration,this._delay=n.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(n=>{e.push(Object.fromEntries(n))}),e}_triggerWebAnimation(t,e,n){return t.animate(this._convertKeyframesToObject(e),n)}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((n,r)=>{"offset"!==r&&t.set(r,this._finished?n:t8(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class Bge{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return WG(t,e)}getParentElement(t){return kP(t)}query(t,e,n){return jG(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}animate(t,e,n,r,s,o=[]){const l={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(l.easing=s);const c=new Map,u=o.filter(m=>m instanceof g8);(function Hme(i,t){return 0===i||0===t})(n,r)&&u.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function Bme(i){return i.length?i[0]instanceof Map?i:i.map(t=>KG(t)):[]}(e).map(m=>Au(m));h=function Gme(i,t,e){if(e.size&&t.length){let n=t[0],r=[];if(e.forEach((s,o)=>{n.has(o)||r.push(o),n.set(o,s)}),r.length)for(let s=1;so.set(a,t8(i,a)))}}return t}(t,h,c);const p=function Fge(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=KP(t[0]),t.length>1&&(n=KP(t[t.length-1]))):t instanceof Map&&(e=KP(t)),e||n?new Lge(i,e,n):null}(t,h);return new g8(t,h,l,p)}}let Uge=(()=>{class i extends iU{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:Io.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?sU(e):e;return _8(this._renderer,null,n,"register",[r]),new Vge(n,this._renderer)}}return i.\u0275fac=function(e){return new(e||i)(J(vh),J(Ut))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class Vge extends ZZ{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new zge(this._id,t,e||{},this._renderer)}}class zge{constructor(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return _8(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 _8(i,t,e,n,r){return i.setProperty(t,`@@${e}:${n}`,r)}const v8="@.disabled";let Hge=(()=>{class i{constructor(e,n,r){this.delegate=e,this.engine=n,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=(s,o)=>{const a=o?.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(e,n){const s=this.delegate.createRenderer(e,n);if(!(e&&n&&n.data&&n.data.animation)){let u=this._rendererCache.get(s);return u||(u=new y8("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,u)),u}const o=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(o,a,e,u.name,u)};return n.data.animation.forEach(l),new Gge(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,n,r){e>=0&&en(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([n,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 i.\u0275fac=function(e){return new(e||i)(J(vh),J(lE),J(ot))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})();class y8{constructor(t,e,n,r){this.namespaceId=t,this.delegate=e,this.engine=n,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?s=>e.destroyNode(s):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,n,r=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}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,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){"@"==e.charAt(0)&&e==v8?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class Gge extends y8{constructor(t,e,n,r,s){super(e,n,r,s),this.factory=t,this.namespaceId=e}setProperty(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&e==v8?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.slice(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if("@"==e.charAt(0)){const r=function $ge(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}(t);let s=e.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function Wge(i){const t=i.indexOf(".");return[i.substring(0,t),i.slice(t+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,n,a)})}return this.delegate.listen(t,e,n)}}const b8=[{provide:iU,useClass:Uge},{provide:$P,useFactory:function Yge(){return new hge}},{provide:lE,useClass:(()=>{class i extends lE{constructor(e,n,r,s){super(e.body,n,r)}ngOnDestroy(){this.flush()}}return i.\u0275fac=function(e){return new(e||i)(J(Ut),J(PP),J($P),J(um))},i.\u0275prov=Ie({token:i,factory:i.\u0275fac}),i})()},{provide:vh,useFactory:function qge(i,t,e){return new Hge(i,t,e)},deps:[nM,lE,ot]}],ZP=[{provide:PP,useFactory:()=>new Bge},{provide:Cr,useValue:"BrowserAnimations"},...b8],x8=[{provide:PP,useClass:YG},{provide:Cr,useValue:"NoopAnimations"},...b8];let Xge=(()=>{class i{static withConfig(e){return{ngModule:i,providers:e.disableAnimations?x8:ZP}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:ZP,imports:[FN]}),i})();const w8=new fe("CdkAccordion");let Kge=0,Zge=(()=>{class i{get expanded(){return this._expanded}set expanded(e){e=jt(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=jt(e)}constructor(e,n,r){this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Yt.EMPTY,this.closed=new Ve,this.opened=new Ve,this.destroyed=new Ve,this.expandedChange=new Ve,this.id="cdk-accordion-child-"+Kge++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(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 i.\u0275fac=function(e){return new(e||i)(A(w8,12),A(ri),A(SR))},i.\u0275dir=xe({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[An([{provide:w8,useValue:void 0}])]}),i})(),Qge=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({}),i})();const Jge=["body"];function e_e(i,t){}const t_e=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],n_e=["mat-expansion-panel-header","*","mat-action-row"];function i_e(i,t){1&i&&ke(0,"span",2),2&i&&z("@indicatorRotate",ye()._getExpandedState())}const r_e=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],s_e=["mat-panel-title","mat-panel-description","*"],M8=new fe("MAT_ACCORDION"),C8="225ms cubic-bezier(0.4,0.0,0.2,1)",S8={indicatorRotate:Ca("indicatorRotate",[bs("collapsed, void",Yn({transform:"rotate(0deg)"})),bs("expanded",Yn({transform:"rotate(180deg)"})),Er("expanded <=> collapsed, void => collapsed",zr(C8))]),bodyExpansion:Ca("bodyExpansion",[bs("collapsed, void",Yn({height:"0px",visibility:"hidden"})),bs("expanded",Yn({height:"*",visibility:"visible"})),Er("expanded <=> collapsed, void => collapsed",zr(C8))])},E8=new fe("MAT_EXPANSION_PANEL");let o_e=(()=>{class i{constructor(e,n){this._template=e,this._expansionPanel=n}}return i.\u0275fac=function(e){return new(e||i)(A(mo),A(E8,8))},i.\u0275dir=xe({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]}),i})(),a_e=0;const A8=new fe("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let D8=(()=>{class i extends Zge{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=jt(e)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}constructor(e,n,r,s,o,a,l){super(e,n,r),this._viewContainerRef=s,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new Ve,this.afterCollapse=new Ve,this._inputChanges=new Fe,this._headerId="mat-expansion-panel-header-"+a_e++,this._bodyAnimationDone=new Fe,this.accordion=e,this._document=o,this._bodyAnimationDone.pipe($c((c,u)=>c.fromState===u.fromState&&c.toState===u.toState)).subscribe(c=>{"void"!==c.fromState&&("expanded"===c.toState?this.afterExpand.emit():"collapsed"===c.toState&&this.afterCollapse.emit())}),l&&(this.hideToggle=l.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(No(null),Dn(()=>this.expanded&&!this._portal),Ai(1)).subscribe(()=>{this._portal=new Em(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,n=this._body.nativeElement;return e===n||n.contains(e)}return!1}}return i.\u0275fac=function(e){return new(e||i)(A(M8,12),A(ri),A(SR),A(Vr),A(Ut),A(Cr,8),A(A8,8))},i.\u0275cmp=it({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(e,n,r){if(1&e&&Li(r,o_e,5),2&e){let s;Dt(s=Tt())&&(n._lazyContent=s.first)}},viewQuery:function(e,n){if(1&e&&Xn(Jge,5),2&e){let r;Dt(r=Tt())&&(n._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(e,n){2&e&&an("mat-expanded",n.expanded)("_mat-animation-noopable","NoopAnimations"===n._animationMode)("mat-expansion-panel-spacing",n._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[An([{provide:M8,useValue:void 0},{provide:E8,useExisting:i}]),rt,Si],ngContentSelectors:n_e,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,n){1&e&&(Ki(t_e),Bt(0),j(1,"div",0,1),ze("@bodyExpansion.done",function(s){return n._bodyAnimationDone.next(s)}),j(3,"div",2),Bt(4,1),_e(5,e_e,0,0,"ng-template",3),q(),Bt(6,2),q()),2&e&&($(1),z("@bodyExpansion",n._getExpandedState())("id",n.id),At("aria-labelledby",n._headerId),$(4),z("cdkPortalOutlet",n._portal))},dependencies:[Am],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:[S8.bodyExpansion]},changeDetection:0}),i})();class l_e{}const c_e=FI(l_e);let d_e=(()=>{class i extends c_e{constructor(e,n,r,s,o,a,l){super(),this.panel=e,this._element=n,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=a,this._parentChangeSubscription=Yt.EMPTY;const c=e.accordion?e.accordion._stateChanges.pipe(Dn(u=>!(!u.hideToggle&&!u.togglePosition))):Os;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=Rr(e.opened,e.closed,c,e._inputChanges.pipe(Dn(u=>!!(u.hideToggle||u.disabled||u.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(Dn(()=>e._containsFocus())).subscribe(()=>r.focusVia(n,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.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:Vo(e)||(e.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e))}}focus(e,n){e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}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 i.\u0275fac=function(e){return new(e||i)(A(D8,1),A(lt),A(Wc),A(ri),A(A8,8),A(Cr,8),ua("tabindex"))},i.\u0275cmp=it({type:i,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(e,n){1&e&&ze("click",function(){return n._toggle()})("keydown",function(s){return n._keydown(s)}),2&e&&(At("id",n.panel._headerId)("tabindex",n.tabIndex)("aria-controls",n._getPanelId())("aria-expanded",n._isExpanded())("aria-disabled",n.panel.disabled),va("height",n._getHeaderHeight()),an("mat-expanded",n._isExpanded())("mat-expansion-toggle-indicator-after","after"===n._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===n._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===n._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[rt],ngContentSelectors:s_e,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(e,n){1&e&&(Ki(r_e),j(0,"span",0),Bt(1),Bt(2,1),Bt(3,2),q(),_e(4,i_e,1,1,"span",1)),2&e&&(an("mat-content-hide-toggle",!n._showToggle()),$(4),z("ngIf",n._showToggle()))},dependencies:[gi],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:[S8.indicatorRotate]},changeDetection:0}),i})(),u_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),i})(),h_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=xe({type:i,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),i})(),f_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({imports:[vo,Gn,Qge,kh]}),i})();function p_e(i,t){if(1&i&&(j(0,"mat-option",19),Ye(1),q()),2&i){const e=t.$implicit;z("value",e),$(1),Zi(" ",e," ")}}function m_e(i,t){if(1&i){const e=xi();j(0,"mat-form-field",16)(1,"mat-select",17),ze("selectionChange",function(r){return bn(e),xn(ye(2)._changePageSize(r.value))}),_e(2,p_e,2,2,"mat-option",18),q()()}if(2&i){const e=ye(2);z("appearance",e._formFieldAppearance)("color",e.color),$(1),z("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),$(1),z("ngForOf",e._displayedPageSizeOptions)}}function g_e(i,t){if(1&i&&(j(0,"div",20),Ye(1),q()),2&i){const e=ye(2);$(1),$i(e.pageSize)}}function __e(i,t){if(1&i&&(j(0,"div",12)(1,"div",13),Ye(2),q(),_e(3,m_e,3,8,"mat-form-field",14),_e(4,g_e,2,1,"div",15),q()),2&i){const e=ye();$(1),w1("id",e._pageSizeLabelId),$(1),Zi(" ",e._intl.itemsPerPageLabel," "),$(1),z("ngIf",e._displayedPageSizeOptions.length>1),$(1),z("ngIf",e._displayedPageSizeOptions.length<=1)}}function v_e(i,t){if(1&i){const e=xi();j(0,"button",21),ze("click",function(){return bn(e),xn(ye().firstPage())}),Fr(),j(1,"svg",7),ke(2,"path",22),q()()}if(2&i){const e=ye();z("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),At("aria-label",e._intl.firstPageLabel)}}function y_e(i,t){if(1&i){const e=xi();Fr(),ns(),j(0,"button",23),ze("click",function(){return bn(e),xn(ye().lastPage())}),Fr(),j(1,"svg",7),ke(2,"path",24),q()()}if(2&i){const e=ye();z("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),At("aria-label",e._intl.lastPageLabel)}}let dE=(()=>{class i{constructor(){this.changes=new Fe,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,n,r)=>{if(0==r||0==n)return`0 of ${r}`;const s=e*n;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+n,r):s+n} of ${r}`}}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=Ie({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const x_e={provide:dE,deps:[[new ms,new Po,dE]],useFactory:function b_e(i){return i||new dE}},M_e=new fe("MAT_PAGINATOR_DEFAULT_OPTIONS"),C_e=HM(UZ(class{}));let S_e=(()=>{class i extends C_e{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(ys(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=ys(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(ys(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(n=>ys(n)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=jt(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=jt(e)}constructor(e,n,r){if(super(),this._intl=e,this._changeDetectorRef=n,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new Ve,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:o,hidePageSize:a,showFirstLastButtons:l}=r;null!=s&&(this._pageSize=s),null!=o&&(this._pageSizeOptions=o),null!=a&&(this._hidePageSize=a),null!=l&&(this._showFirstLastButtons=l)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const e=this.getNumberOfPages()-1;return this.pageIndexe-n),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return i.\u0275fac=function(e){ho()},i.\u0275dir=xe({type:i,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[rt]}),i})(),E_e=0,A_e=(()=>{class i extends S_e{constructor(e,n,r){super(e,n,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+E_e++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return i.\u0275fac=function(e){return new(e||i)(A(dE),A(ri),A(M_e,8))},i.\u0275cmp=it({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[rt],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(e,n){1&e&&(j(0,"div",0)(1,"div",1),_e(2,__e,5,4,"div",2),j(3,"div",3)(4,"div",4),Ye(5),q(),_e(6,v_e,3,5,"button",5),j(7,"button",6),ze("click",function(){return n.previousPage()}),Fr(),j(8,"svg",7),ke(9,"path",8),q()(),ns(),j(10,"button",9),ze("click",function(){return n.nextPage()}),Fr(),j(11,"svg",7),ke(12,"path",10),q()(),_e(13,y_e,3,5,"button",11),q()()()),2&e&&($(2),z("ngIf",!n.hidePageSize),$(3),Zi(" ",n._intl.getRangeLabel(n.pageIndex,n.pageSize,n.length)," "),$(1),z("ngIf",n.showFirstLastButtons),$(1),z("matTooltip",n._intl.previousPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),At("aria-label",n._intl.previousPageLabel),$(3),z("matTooltip",n._intl.nextPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),At("aria-label",n._intl.nextPageLabel),$(3),z("ngIf",n.showFirstLastButtons))},dependencies:[_o,gi,$I,ql,Ky,Nm,xs],styles:[".mat-mdc-paginator{display:block}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),i})(),D_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i}),i.\u0275inj=Wt({providers:[x_e],imports:[vo,jM,Vz,NU]}),i})(),T_e=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=qt({type:i,bootstrap:[Kpe]}),i.\u0275inj=Wt({providers:[Yc,Nz,{provide:Oz,useValue:tie}],imports:[FN,BX,Xge,iz,VQ,hC,gz,f_e,IU,PU,NU,jM,iV,D_e,bre,vz,Vz,yU,Pfe,Ape,rz,NI,lie]}),i})();Bu(qc,[_o,gi,xs,Nb,YS],[Hl]),Bu(MR,[fm,_o,gi,ry,Xc,su,ql,D8,d_e,h_e,u_e,xs,A_e,Ky,Nm,Nb],[]),Bu(gC,[_o,gi,vC,_C,_z,Nb],[]),Bu(PG,[_o,gi,zo,xs,Ky,Nm,Nb,YS],[Hl]),QY().bootstrapModule(T_e).catch(i=>console.error(i))},489:function(Mo,Is,Kr){var en;Mo=Kr.nmd(Mo),function(){var U,Zr=200,kn="Expected a function",Fa="__lodash_hash_undefined__",ci="__lodash_placeholder__",di=1,ds=2,ks=4,Ps=1,Co=2,Tn=1,ir=2,oc=4,Zo=8,fl=16,Qo=32,pl=64,La=128,Jo=256,ud=512,pE=800,$g=16,En=1/0,Ba=9007199254740991,gE=17976931348623157e292,Of=NaN,ea=4294967295,Fe=ea-1,$b=ea>>>1,Wb=[["ary",La],["bind",Tn],["bindKey",ir],["curry",Zo],["curryRight",fl],["flip",ud],["partial",Qo],["partialRight",pl],["rearg",Jo]],Vn="[object Arguments]",Fn="[object Array]",_E="[object AsyncFunction]",Qe="[object Boolean]",ac="[object Date]",vE="[object DOMException]",hd="[object Error]",Ff="[object Function]",jb="[object GeneratorFunction]",So="[object Map]",Lf="[object Number]",nO="[object Null]",ml="[object Object]",yE="[object Promise]",bE="[object Proxy]",fd="[object RegExp]",Eo="[object Set]",lc="[object String]",Nf="[object Symbol]",Wg="[object Undefined]",pd="[object WeakMap]",Tu="[object ArrayBuffer]",md="[object DataView]",ta="[object Float32Array]",Bf="[object Float64Array]",jg="[object Int8Array]",Uf="[object Int16Array]",Yg="[object Int32Array]",qg="[object Uint8Array]",Xg="[object Uint8ClampedArray]",Kg="[object Uint16Array]",Zg="[object Uint32Array]",wE=/\b__p \+= '';/g,ME=/\b(__p \+=) '' \+/g,CE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Yb=/&(?:amp|lt|gt|quot|#39);/g,qb=/[&<>"']/g,iO=RegExp(Yb.source),Qg=RegExp(qb.source),Xb=/<%-([\s\S]+?)%>/g,Kb=/<%([\s\S]+?)%>/g,Jg=/<%=([\s\S]+?)%>/g,Zb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,SE=/^\w*$/,Qb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vf=/[\\^$.*+?()[\]{}|]/g,Jb=RegExp(Vf.source),zf=/^\s+/,rr=/\s/,EE=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,AE=/\{\n\/\* \[wrapped with (.+)\] \*/,DE=/,? & /,TE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,e0=/[()=,{}\[\]\/\s]/,IE=/\\(\\)?/g,RE=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,na=/\w*$/,kE=/^[-+]0x[0-9a-f]+$/i,qi=/^0b[01]+$/i,gd=/^\[object .+?Constructor\]$/,Os=/^0o[0-7]+$/i,rO=/^(?:0|[1-9]\d*)$/,PE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Iu=/($^)/,e_=/['\n\r\u2028\u2029\\]/g,Ru="\\ud800-\\udfff",t_="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",n0="\\u2700-\\u27bf",r0="a-z\\xdf-\\xf6\\xf8-\\xff",o0="A-Z\\xc0-\\xd6\\xd8-\\xde",Pi="\\ufe0e\\ufe0f",Rr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",n_="["+Ru+"]",Kn="["+Rr+"]",_d="["+t_+"]",ii="\\d+",i_="["+n0+"]",a0="["+r0+"]",Ln="[^"+Ru+Rr+ii+n0+r0+o0+"]",wt="\\ud83c[\\udffb-\\udfff]",Hf="[^"+Ru+"]",l0="(?:\\ud83c[\\udde6-\\uddff]){2}",vd="[\\ud800-\\udbff][\\udc00-\\udfff]",he="["+o0+"]",$t="(?:"+a0+"|"+Ln+")",Wn="(?:"+he+"|"+Ln+")",c0="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",BE="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",d0="(?:"+_d+"|"+wt+")?",Fu="["+Pi+"]?",VE=Fu+d0+"(?:\\u200d(?:"+[Hf,l0,vd].join("|")+")"+Fu+d0+")*",gl="(?:"+[i_,l0,vd].join("|")+")"+VE,oO="(?:"+[Hf+_d+"?",_d,l0,vd,n_].join("|")+")",aO=RegExp("['\u2019]","g"),lO=RegExp(_d,"g"),u0=RegExp(wt+"(?="+wt+")|"+oO+VE,"g"),zE=RegExp([he+"?"+a0+"+"+c0+"(?="+[Kn,he,"$"].join("|")+")",Wn+"+"+BE+"(?="+[Kn,he+$t,"$"].join("|")+")",he+"?"+$t+"+"+c0,he+"+"+BE,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ii,gl].join("|"),"g"),cO=RegExp("[\\u200d"+Ru+t_+Pi+"]"),HE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dO=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ro=-1,gt={};gt[ta]=gt[Bf]=gt[jg]=gt[Uf]=gt[Yg]=gt[qg]=gt[Xg]=gt[Kg]=gt[Zg]=!0,gt[Vn]=gt[Fn]=gt[Tu]=gt[Qe]=gt[md]=gt[ac]=gt[hd]=gt[Ff]=gt[So]=gt[Lf]=gt[ml]=gt[fd]=gt[Eo]=gt[lc]=gt[pd]=!1;var ai={};ai[Vn]=ai[Fn]=ai[Tu]=ai[md]=ai[Qe]=ai[ac]=ai[ta]=ai[Bf]=ai[jg]=ai[Uf]=ai[Yg]=ai[So]=ai[Lf]=ai[ml]=ai[fd]=ai[Eo]=ai[lc]=ai[Nf]=ai[qg]=ai[Xg]=ai[Kg]=ai[Zg]=!0,ai[hd]=ai[Ff]=ai[pd]=!1;var fO={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Wt=parseFloat,Gf=parseInt,h0="object"==typeof global&&global&&global.Object===Object&&global,f0="object"==typeof self&&self&&self.Object===Object&&self,gr=h0||f0||Function("return this")(),s_=Is&&!Is.nodeType&&Is,_l=s_&&Mo&&!Mo.nodeType&&Mo,$f=_l&&_l.exports===s_,Wf=$f&&h0.process,so=function(){try{return _l&&_l.require&&_l.require("util").types||Wf&&Wf.binding&&Wf.binding("util")}catch{}}(),Et=so&&so.isArrayBuffer,jf=so&&so.isDate,p0=so&&so.isMap,Ls=so&&so.isRegExp,o_=so&&so.isSet,GE=so&&so.isTypedArray;function Cn(Y,oe,ae){switch(ae.length){case 0:return Y.call(oe);case 1:return Y.call(oe,ae[0]);case 2:return Y.call(oe,ae[0],ae[1]);case 3:return Y.call(oe,ae[0],ae[1],ae[2])}return Y.apply(oe,ae)}function pO(Y,oe,ae,Je){for(var Ne=-1,Bn=null==Y?0:Y.length;++Ne-1}function a_(Y,oe,ae){for(var Je=-1,Ne=null==Y?0:Y.length;++Je-1;);return ae}function v0(Y,oe){for(var ae=Y.length;ae--&&bl(oe,Y[ae],0)>-1;);return ae}var Bu=Do({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),WE=Do({"&":"&","<":"<",">":">",'"':""","'":"'"});function jE(Y){return"\\"+fO[Y]}function xd(Y){return cO.test(Y)}function kr(Y){var oe=-1,ae=Array(Y.size);return Y.forEach(function(Je,Ne){ae[++oe]=[Ne,Je]}),ae}function zn(Y,oe){return function(ae){return Y(oe(ae))}}function yi(Y,oe){for(var ae=-1,Je=Y.length,Ne=0,Bn=[];++ae",""":'"',"'":"'"}),Xi=function Y(oe){var d,ae=(oe=null==oe?gr:Xi.defaults(gr.Object(),oe,Xi.pick(gr,dO))).Array,Je=oe.Date,Ne=oe.Error,Bn=oe.Function,bi=oe.Math,Zn=oe.Object,xl=oe.RegExp,Pr=oe.String,Or=oe.TypeError,Ua=ae.prototype,oa=Zn.prototype,Uu=oe["__core-js_shared__"],Qn=Bn.prototype.toString,Jn=oa.hasOwnProperty,c_=0,d_=(d=/[^.]+$/.exec(Uu&&Uu.keys&&Uu.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",fc=oa.toString,Zf=Qn.call(Zn),Md=gr._,Jr=xl("^"+Qn.call(Jn).replace(Vf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),u_=$f?oe.Buffer:U,zi=oe.Symbol,hs=oe.Uint8Array,Qf=u_?u_.allocUnsafe:U,wl=zn(Zn.getPrototypeOf,Zn),Vu=Zn.create,oo=oa.propertyIsEnumerable,Jf=Ua.splice,YE=zi?zi.isConcatSpreadable:U,zu=zi?zi.iterator:U,pc=zi?zi.toStringTag:U,h_=function(){try{var d=Ec(Zn,"defineProperty");return d({},"",{}),d}catch{}}(),gO=oe.clearTimeout!==gr.clearTimeout&&oe.clearTimeout,_O=Je&&Je.now!==gr.Date.now&&Je.now,vO=oe.setTimeout!==gr.setTimeout&&oe.setTimeout,f_=bi.ceil,p_=bi.floor,x0=Zn.getOwnPropertySymbols,yO=u_?u_.isBuffer:U,qE=oe.isFinite,bO=Ua.join,xO=zn(Zn.keys,Zn),sr=bi.max,vr=bi.min,w0=Je.now,wO=oe.parseInt,XE=bi.random,MO=Ua.reverse,Va=Ec(oe,"DataView"),Hu=Ec(oe,"Map"),Si=Ec(oe,"Promise"),mc=Ec(oe,"Set"),Gu=Ec(oe,"WeakMap"),$u=Ec(Zn,"create"),Wu=Gu&&new Gu,gc={},KE=Gi(Va),m_=Gi(Hu),ZE=Gi(Si),ao=Gi(mc),M0=Gi(Gu),ju=zi?zi.prototype:U,Oi=ju?ju.valueOf:U,C0=ju?ju.toString:U;function R(d){if(ei(d)&&!tn(d)&&!(d instanceof sn)){if(d instanceof Us)return d;if(Jn.call(d,"__wrapped__"))return Y_(d)}return new Us(d)}var or=function(){function d(){}return function(f){if(!fi(f))return{};if(Vu)return Vu(f);d.prototype=f;var _=new d;return d.prototype=U,_}}();function ep(){}function Us(d,f){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=U}function sn(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ea,this.__views__=[]}function _c(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function Cl(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function za(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function Sl(d){var f=-1,_=null==d?0:d.length;for(this.__data__=new za;++f<_;)this.add(d[f])}function Vs(d){var f=this.__data__=new Cl(d);this.size=f.size}function la(d,f){var _=tn(d),w=!_&&Bd(d),S=!_&&!w&&Ya(d),k=!_&&!w&&!S&&Ud(d),V=_||w||S||k,G=V?Nn(d.length,Pr):[],Z=G.length;for(var me in d)(f||Jn.call(d,me))&&(!V||!("length"==me||S&&("offset"==me||"parent"==me)||k&&("buffer"==me||"byteLength"==me||"byteOffset"==me)||Pl(me,Z)))&&G.push(me);return G}function v_(d){var f=d.length;return f?d[ih(0,f-1)]:U}function Cd(d,f){return dh(Lr(d),vc(f,0,d.length))}function Ha(d){return dh(Lr(d))}function y_(d,f,_){(_!==U&&!Oo(d[f],_)||_===U&&!(f in d))&&ca(d,f,_)}function Sd(d,f,_){var w=d[f];(!Jn.call(d,f)||!Oo(w,_)||_===U&&!(f in d))&&ca(d,f,_)}function np(d,f){for(var _=d.length;_--;)if(Oo(d[_][0],f))return _;return-1}function rA(d,f,_,w){return Ga(d,function(S,k,V){f(w,S,_(S),V)}),w}function ip(d,f){return d&&ps(f,wr(f),d)}function ca(d,f,_){"__proto__"==f&&h_?h_(d,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):d[f]=_}function qu(d,f){for(var _=-1,w=f.length,S=ae(w),k=null==d;++_=f?d:f)),d}function zs(d,f,_,w,S,k){var V,G=f&di,Z=f&ds,me=f&ks;if(_&&(V=S?_(d,w,S,k):_(d)),V!==U)return V;if(!fi(d))return d;var be=tn(d);if(be){if(V=function X0(d){var f=d.length,_=new d.constructor(f);return f&&"string"==typeof d[0]&&Jn.call(d,"index")&&(_.index=d.index,_.input=d.input),_}(d),!G)return Lr(d,V)}else{var De=br(d),je=De==Ff||De==jb;if(Ya(d))return uA(d,G);if(De==ml||De==Vn||je&&!S){if(V=Z||je?{}:xA(d),!G)return Z?function co(d,f){return ps(d,lh(d),f)}(d,function b_(d,f){return d&&ps(f,Ys(f),d)}(V,d)):function pA(d,f){return ps(d,U_(d),f)}(d,ip(V,d))}else{if(!ai[De])return S?d:{};V=function wA(d,f,_){var w=d.constructor;switch(f){case Tu:return H0(d);case Qe:case ac:return new w(+d);case md:return function AO(d,f){var _=f?H0(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}(d,_);case ta:case Bf:case jg:case Uf:case Yg:case qg:case Xg:case Kg:case Zg:return hA(d,_);case So:return new w;case Lf:case lc:return new w(d);case fd:return function DO(d){var f=new d.constructor(d.source,na.exec(d));return f.lastIndex=d.lastIndex,f}(d);case Eo:return new w;case Nf:return function TO(d){return Oi?Zn(Oi.call(d)):{}}(d)}}(d,De,G)}}k||(k=new Vs);var ct=k.get(d);if(ct)return ct;k.set(d,V),Mv(d)?d.forEach(function(Pt){V.add(zs(Pt,f,_,Pt,d,k))}):Gx(d)&&d.forEach(function(Pt,mn){V.set(mn,zs(Pt,f,_,mn,d,k))});var dn=be?U:(me?Z?kl:B_:Z?Ys:wr)(d);return Ao(dn||d,function(Pt,mn){dn&&(Pt=d[mn=Pt]),Sd(V,mn,zs(Pt,f,_,mn,d,k))}),V}function w_(d,f,_){var w=_.length;if(null==d)return!w;for(d=Zn(d);w--;){var S=_[w],V=d[S];if(V===U&&!(S in d)||!(0,f[S])(V))return!1}return!0}function M_(d,f,_){if("function"!=typeof d)throw new Or(kn);return Ac(function(){d.apply(U,_)},f)}function Ed(d,f,_,w){var S=-1,k=cc,V=!0,G=d.length,Z=[],me=f.length;if(!G)return Z;_&&(f=ui(f,Qr(_))),w?(k=a_,V=!1):f.length>=Zr&&(k=Ns,V=!1,f=new Sl(f));e:for(;++S-1},Cl.prototype.set=function nA(d,f){var _=this.__data__,w=np(_,d);return w<0?(++this.size,_.push([d,f])):_[w][1]=f,this},za.prototype.clear=function Ee(){this.size=0,this.__data__={hash:new _c,map:new(Hu||Cl),string:new _c}},za.prototype.delete=function Pn(d){var f=Mp(this,d).delete(d);return this.size-=f?1:0,f},za.prototype.get=function bn(d){return Mp(this,d).get(d)},za.prototype.has=function xn(d){return Mp(this,d).has(d)},za.prototype.set=function yr(d,f){var _=Mp(this,d),w=_.size;return _.set(d,f),this.size+=_.size==w?0:1,this},Sl.prototype.add=Sl.prototype.push=function Yu(d){return this.__data__.set(d,Fa),this},Sl.prototype.has=function aa(d){return this.__data__.has(d)},Vs.prototype.clear=function __(){this.__data__=new Cl,this.size=0},Vs.prototype.delete=function iA(d){var f=this.__data__,_=f.delete(d);return this.size=f.size,_},Vs.prototype.get=function CO(d){return this.__data__.get(d)},Vs.prototype.has=function D0(d){return this.__data__.has(d)},Vs.prototype.set=function es(d,f){var _=this.__data__;if(_ instanceof Cl){var w=_.__data__;if(!Hu||w.length0&&_(G)?f>1?pn(G,f-1,_,w,S):vl(S,G):w||(S[S.length]=G)}return S}var Fr=Id(),T0=Id(!0);function ns(d,f){return d&&Fr(d,f,wr)}function C_(d,f){return d&&T0(d,f,wr)}function op(d,f){return ia(f,function(_){return qa(d[_])})}function yc(d,f){for(var _=0,w=(f=wc(f,d)).length;null!=d&&_f}function S_(d,f){return null!=d&&Jn.call(d,f)}function I0(d,f){return null!=d&&f in Zn(d)}function Al(d,f,_){for(var w=_?a_:cc,S=d[0].length,k=d.length,V=k,G=ae(k),Z=1/0,me=[];V--;){var be=d[V];V&&f&&(be=ui(be,Qr(f))),Z=vr(be.length,Z),G[V]=!_&&(f||S>=120&&be.length>=120)?new Sl(V&&be):U}be=d[0];var De=-1,je=G[0];e:for(;++De=G?Z:Z*("desc"==_[w]?-1:1)}return d.index-f.index}(k,V,_)})}function L0(d,f,_){for(var w=-1,S=f.length,k={};++w-1;)G!==d&&Jf.call(G,Z,1),Jf.call(d,Z,1);return d}function R_(d,f){for(var _=d?f.length:0,w=_-1;_--;){var S=f[_];if(_==w||S!==k){var k=S;Pl(S)?Jf.call(d,S,1):fp(d,S)}}return d}function ih(d,f){return d+p_(XE()*(f-d+1))}function P_(d,f){var _="";if(!d||f<1||f>Ba)return _;do{f%2&&(_+=d),(f=p_(f/2))&&(d+=d)}while(f);return _}function cn(d,f){return W_(rs(d,f,Br),d+"")}function N0(d){return v_(Vd(d))}function B0(d,f){var _=Vd(d);return dh(_,vc(f,0,_.length))}function Dd(d,f,_,w){if(!fi(d))return d;for(var S=-1,k=(f=wc(f,d)).length,V=k-1,G=d;null!=G&&++SS?0:S+f),(_=_>S?S:_)<0&&(_+=S),S=f>_?0:_-f>>>0,f>>>=0;for(var k=ae(S);++w>>1,V=d[k];null!==V&&!js(V)&&(_?V<=f:V=Zr){var me=f?null:bp(d);if(me)return _r(me);V=!1,S=Ns,Z=new Sl}else Z=f?[]:G;e:for(;++w=w?d:lo(d,f,_)}var dA=gO||function(d){return gr.clearTimeout(d)};function uA(d,f){if(f)return d.slice();var _=d.length,w=Qf?Qf(_):new d.constructor(_);return d.copy(w),w}function H0(d){var f=new d.constructor(d.byteLength);return new hs(f).set(new hs(d)),f}function hA(d,f){var _=f?H0(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function Td(d,f){if(d!==f){var _=d!==U,w=null===d,S=d==d,k=js(d),V=f!==U,G=null===f,Z=f==f,me=js(f);if(!G&&!me&&!k&&d>f||k&&V&&Z&&!G&&!me||w&&V&&Z||!_&&Z||!S)return 1;if(!w&&!k&&!me&&d1?_[S-1]:U,V=S>2?_[2]:U;for(k=d.length>3&&"function"==typeof k?(S--,k):U,V&&gs(_[0],_[1],V)&&(k=S<3?U:k,S=1),f=Zn(f);++w-1?S[k?f[V]:V]:U}}function Cc(d){return Wa(function(f){var _=f.length,w=_,S=Us.prototype.thru;for(d&&f.reverse();w--;){var k=f[w];if("function"!=typeof k)throw new Or(kn);if(S&&!V&&"wrapper"==wp(k))var V=new Us([],!0)}for(w=V?w:_;++w<_;){var G=wp(k=f[w]),Z="wrapper"==G?Sc(k):U;V=Z&&K0(Z[0])&&Z[1]==(La|Zo|Qo|Jo)&&!Z[4].length&&1==Z[9]?V[wp(Z[0])].apply(V,Z[3]):1==k.length&&K0(k)?V[G]():V.thru(k)}return function(){var me=arguments,be=me[0];if(V&&1==me.length&&tn(be))return V.plant(be).value();for(var De=0,je=_?f[De].apply(this,me):be;++De<_;)je=f[De].call(this,je);return je}})}function F_(d,f,_,w,S,k,V,G,Z,me){var be=f&La,De=f&Tn,je=f&ir,ct=f&(Zo|fl),kt=f&ud,dn=je?U:pp(d);return function Pt(){for(var mn=arguments.length,In=ae(mn),Xs=mn;Xs--;)In[Xs]=arguments[Xs];if(ct)var lr=ah(Pt),Ur=function it(Y,oe){for(var ae=Y.length,Je=0;ae--;)Y[ae]===oe&&++Je;return Je}(In,lr);if(w&&(In=fA(In,w,S,ct)),k&&(In=Hi(In,k,V,ct)),mn-=Ur,ct&&mn1&&In.reverse(),be&&ZG))return!1;var me=k.get(d),be=k.get(f);if(me&&be)return me==f&&be==d;var De=-1,je=!0,ct=_&Co?new Sl:U;for(k.set(d,f),k.set(f,d);++De-1&&d%1==0&&d1?"& ":"")+f[w],f=f.join(_>2?", ":" "),d.replace(EE,"{\n/* [wrapped with "+f+"] */\n")}(w,function j_(d,f){return Ao(Wb,function(_){var w="_."+_[0];f&_[1]&&!cc(d,w)&&d.push(w)}),d.sort()}(function q0(d){var f=d.match(AE);return f?f[1].split(DE):[]}(w),_)))}function ix(d){var f=0,_=0;return function(){var w=w0(),S=$g-(w-_);if(_=w,S>0){if(++f>=pE)return arguments[0]}else f=0;return d.apply(U,arguments)}}function dh(d,f){var _=-1,w=d.length,S=w-1;for(f=f===U?w:f;++_1?d[f-1]:U;return _="function"==typeof _?(d.pop(),_):U,iv(d,_)});function Sx(d){var f=R(d);return f.__chain__=!0,f}function ph(d,f){return f(d)}var Tp=Wa(function(d){var f=d.length,_=f?d[0]:0,w=this.__wrapped__,S=function(k){return qu(k,d)};return!(f>1||this.__actions__.length)&&w instanceof sn&&Pl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:ph,args:[S],thisArg:U}),new Us(w,this.__chain__).thru(function(k){return f&&!k.length&&k.push(U),k})):this.thru(S)}),jA=ha(function(d,f,_){Jn.call(d,_)?++d[_]:ca(d,_,1)}),cv=mp(dx),Dx=mp(ux);function Rx(d,f){return(tn(d)?Ao:Ga)(d,Mt(f,3))}function kx(d,f){return(tn(d)?mO:rp)(d,Mt(f,3))}var YA=ha(function(d,f,_){Jn.call(d,_)?d[_].push(f):ca(d,_,[f])}),XA=cn(function(d,f,_){var w=-1,S="function"==typeof f,k=xr(d)?ae(d.length):[];return Ga(d,function(V){k[++w]=S?Cn(f,V,_):Zu(V,f,_)}),k}),$s=ha(function(d,f,_){ca(d,_,f)});function Ws(d,f){return(tn(d)?ui:eh)(d,Mt(f,3))}var ZA=ha(function(d,f,_){d[_?0:1].push(f)},function(){return[[],[]]}),sD=cn(function(d,f){if(null==d)return[];var _=f.length;return _>1&&gs(d,f[0],f[1])?f=[]:_>2&&gs(f[0],f[1],f[2])&&(f=[f[0]]),F0(d,pn(f,1),[])}),Ic=_O||function(){return gr.Date.now()};function Nd(d,f,_){return f=_?U:f,fa(d,La,U,U,U,U,f=d&&null==f?d.length:f)}function dv(d,f){var _;if("function"!=typeof f)throw new Or(kn);return d=on(d),function(){return--d>0&&(_=f.apply(this,arguments)),d<=1&&(f=U),_}}var Rp=cn(function(d,f,_){var w=Tn;if(_.length){var S=yi(_,ah(Rp));w|=Qo}return fa(d,w,f,_,S)}),uv=cn(function(d,f,_){var w=Tn|ir;if(_.length){var S=yi(_,ah(uv));w|=Qo}return fa(f,w,d,_,S)});function lD(d,f,_){var w,S,k,V,G,Z,me=0,be=!1,De=!1,je=!0;if("function"!=typeof d)throw new Or(kn);function ct(pi){var ga=w,Lo=S;return w=S=U,me=pi,V=d.apply(Lo,ga)}function Pt(pi){var ga=pi-Z;return Z===U||ga>=f||ga<0||De&&pi-me>=k}function mn(){var pi=Ic();if(Pt(pi))return In(pi);G=Ac(mn,function dn(pi){var m1=f-(pi-Z);return De?vr(m1,k-(pi-me)):m1}(pi))}function In(pi){return G=U,je&&w?ct(pi):(w=S=U,V)}function Ur(){var pi=Ic(),ga=Pt(pi);if(w=arguments,S=this,Z=pi,ga){if(G===U)return function kt(pi){return me=pi,G=Ac(mn,f),be?ct(pi):V}(Z);if(De)return dA(G),G=Ac(mn,f),ct(Z)}return G===U&&(G=Ac(mn,f)),V}return f=uo(f)||0,fi(_)&&(be=!!_.leading,k=(De="maxWait"in _)?sr(uo(_.maxWait)||0,f):k,je="trailing"in _?!!_.trailing:je),Ur.cancel=function Xs(){G!==U&&dA(G),me=0,w=Z=S=G=U},Ur.flush=function lr(){return G===U?V:In(Ic())},Ur}var hv=cn(function(d,f){return M_(d,1,f)}),fv=cn(function(d,f,_){return M_(d,uo(f)||0,_)});function pv(d,f){if("function"!=typeof d||null!=f&&"function"!=typeof f)throw new Or(kn);var _=function(){var w=arguments,S=f?f.apply(this,w):w[0],k=_.cache;if(k.has(S))return k.get(S);var V=d.apply(this,w);return _.cache=k.set(S,V)||k,V};return _.cache=new(pv.Cache||za),_}function mh(d){if("function"!=typeof d)throw new Or(kn);return function(){var f=arguments;switch(f.length){case 0:return!d.call(this);case 1:return!d.call(this,f[0]);case 2:return!d.call(this,f[0],f[1]);case 3:return!d.call(this,f[0],f[1],f[2])}return!d.apply(this,f)}}pv.Cache=za;var dD=cA(function(d,f){var _=(f=1==f.length&&tn(f[0])?ui(f[0],Qr(Mt())):ui(pn(f,1),Qr(Mt()))).length;return cn(function(w){for(var S=-1,k=vr(w.length,_);++S=f}),Bd=aA(function(){return arguments}())?aA:function(d){return ei(d)&&Jn.call(d,"callee")&&!oo.call(d,"callee")},tn=ae.isArray,gh=Et?Qr(Et):function E_(d){return ei(d)&&ar(d)==Tu};function xr(d){return null!=d&&_h(d.length)&&!qa(d)}function Ei(d){return ei(d)&&xr(d)}var Ya=yO||bh,NO=jf?Qr(jf):function SO(d){return ei(d)&&ar(d)==ac};function Hx(d){if(!ei(d))return!1;var f=ar(d);return f==hd||f==vE||"string"==typeof d.message&&"string"==typeof d.name&&!Rc(d)}function qa(d){if(!fi(d))return!1;var f=ar(d);return f==Ff||f==jb||f==_E||f==bE}function Op(d){return"number"==typeof d&&d==on(d)}function _h(d){return"number"==typeof d&&d>-1&&d%1==0&&d<=Ba}function fi(d){var f=typeof d;return null!=d&&("object"==f||"function"==f)}function ei(d){return null!=d&&"object"==typeof d}var Gx=p0?Qr(p0):function EO(d){return ei(d)&&br(d)==So};function xv(d){return"number"==typeof d||ei(d)&&ar(d)==Lf}function Rc(d){if(!ei(d)||ar(d)!=ml)return!1;var f=wl(d);if(null===f)return!0;var _=Jn.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&Qn.call(_)==Zf}var wv=Ls?Qr(Ls):function k0(d){return ei(d)&&ar(d)==fd},Mv=o_?Qr(o_):function P0(d){return ei(d)&&br(d)==Eo};function Ka(d){return"string"==typeof d||!tn(d)&&ei(d)&&ar(d)==lc}function js(d){return"symbol"==typeof d||ei(d)&&ar(d)==Nf}var Ud=GE?Qr(GE):function Ju(d){return ei(d)&&_h(d.length)&&!!gt[ar(d)]},$x=vp(D_),wD=vp(function(d,f){return d<=f});function Sv(d){if(!d)return[];if(xr(d))return Ka(d)?us(d):Lr(d);if(zu&&d[zu])return function xe(Y){for(var oe,ae=[];!(oe=Y.next()).done;)ae.push(oe.value);return ae}(d[zu]());var f=br(d);return(f==So?kr:f==Eo?_r:Vd)(d)}function Ol(d){return d?(d=uo(d))===En||d===-En?(d<0?-1:1)*gE:d==d?d:0:0===d?d:0}function on(d){var f=Ol(d),_=f%1;return f==f?_?f-_:f:0}function Fl(d){return d?vc(on(d),0,ea):0}function uo(d){if("number"==typeof d)return d;if(js(d))return Of;if(fi(d)){var f="function"==typeof d.valueOf?d.valueOf():d;d=fi(f)?f+"":f}if("string"!=typeof d)return 0===d?d:+d;d=Xf(d);var _=qi.test(d);return _||Os.test(d)?Gf(d.slice(2),_?2:8):kE.test(d)?Of:+d}function kc(d){return ps(d,Ys(d))}function jn(d){return null==d?"":is(d)}var vh=Mc(function(d,f){if(Cp(f)||xr(f))ps(f,wr(f),d);else for(var _ in f)Jn.call(f,_)&&Sd(d,_,f[_])}),ma=Mc(function(d,f){ps(f,Ys(f),d)}),Np=Mc(function(d,f,_,w){ps(f,Ys(f),d,w)}),MD=Mc(function(d,f,_,w){ps(f,wr(f),d,w)}),Pc=Wa(qu),Ev=cn(function(d,f){d=Zn(d);var _=-1,w=f.length,S=w>2?f[2]:U;for(S&&gs(f[0],f[1],S)&&(w=1);++_1),k}),ps(d,kl(d),_),w&&(_=zs(_,di|ds|ks,W0));for(var S=f.length;S--;)fp(_,f[S]);return _}),FD=Wa(function(d,f){return null==d?{}:function da(d,f){return L0(d,f,function(_,w){return Ll(d,w)})}(d,f)});function qx(d,f){if(null==d)return{};var _=ui(kl(d),function(w){return[w]});return f=Mt(f),L0(d,_,function(w,S){return f(w,S[0])})}var Kx=ms(wr),Zx=ms(Ys);function Vd(d){return null==d?[]:Kf(d,wr(d))}var ew=Rd(function(d,f,_){return f=f.toLowerCase(),d+(_?tw(f):f)});function tw(d){return Up(jn(d).toLowerCase())}function nw(d){return(d=jn(d))&&d.replace(PE,Bu).replace(lO,"")}var HD=Rd(function(d,f,_){return d+(_?"-":"")+f.toLowerCase()}),GD=Rd(function(d,f,_){return d+(_?" ":"")+f.toLowerCase()}),UO=gA("toLowerCase"),WD=Rd(function(d,f,_){return d+(_?"_":"")+f.toLowerCase()}),zO=Rd(function(d,f,_){return d+(_?" ":"")+Up(f)}),XD=Rd(function(d,f,_){return d+(_?" ":"")+f.toUpperCase()}),Up=gA("toUpperCase");function cw(d,f,_){return d=jn(d),(f=_?U:f)===U?function y0(Y){return HE.test(Y)}(d)?function ko(Y){return Y.match(zE)||[]}(d):function m0(Y){return Y.match(TE)||[]}(d):d.match(f)||[]}var dw=cn(function(d,f){try{return Cn(d,U,f)}catch(_){return Hx(_)?_:new Ne(_)}}),KD=Wa(function(d,f){return Ao(f,function(_){_=pa(_),ca(d,_,Rp(d[_],d))}),d});function Vp(d){return function(){return d}}var uw=Cc(),hw=Cc(!0);function Br(d){return d}function fw(d){return A_("function"==typeof d?d:zs(d,di))}var $O=cn(function(d,f){return function(_){return Zu(_,d,f)}}),A=cn(function(d,f){return function(_){return Zu(d,_,f)}});function ho(d,f,_){var w=wr(f),S=op(f,w);null==_&&(!fi(f)||!S.length&&w.length)&&(_=f,f=d,d=this,S=op(f,wr(f)));var k=!(fi(_)&&"chain"in _&&!_.chain),V=qa(d);return Ao(S,function(G){var Z=f[G];d[G]=Z,V&&(d.prototype[G]=function(){var me=this.__chain__;if(k||me){var be=d(this.__wrapped__);return(be.__actions__=Lr(this.__actions__)).push({func:Z,args:arguments,thisArg:d}),be.__chain__=me,be}return Z.apply(d,vl([this.value()],arguments))})}),d}function zp(){}var r1=N_(ui),Hp=N_(yd),Hd=N_(yl);function Gp(d){return ch(d)?l_(pa(d)):function up(d){return function(f){return yc(f,d)}}(d)}var Ov=G0(),$p=G0(!0);function Wp(){return[]}function bh(){return!1}var mw=gp(function(d,f){return d+f},0),a1=kd("ceil"),gw=gp(function(d,f){return d/f},1),_w=kd("floor"),Bv=gp(function(d,f){return d*f},1),vw=kd("round"),h1=gp(function(d,f){return d-f},0);return R.after=function ja(d,f){if("function"!=typeof f)throw new Or(kn);return d=on(d),function(){if(--d<1)return f.apply(this,arguments)}},R.ary=Nd,R.assign=vh,R.assignIn=ma,R.assignInWith=Np,R.assignWith=MD,R.at=Pc,R.before=dv,R.bind=Rp,R.bindAll=KD,R.bindKey=uv,R.castArray=function hD(){if(!arguments.length)return[];var d=arguments[0];return tn(d)?d:[d]},R.chain=Sx,R.chunk=function q_(d,f,_){f=(_?gs(d,f,_):f===U)?1:sr(on(f),0);var w=null==d?0:d.length;if(!w||f<1)return[];for(var S=0,k=0,V=ae(f_(w/f));SS?0:S+_),(w=w===U||w>S?S:on(w))<0&&(w+=S),w=_>w?0:Fl(w);_>>0)?(d=jn(d))&&("string"==typeof f||null!=f&&!wv(f))&&!(f=is(f))&&xd(d)?fe(us(d),0,_):d.split(f,_):[]},R.spread=function Lx(d,f){if("function"!=typeof d)throw new Or(kn);return f=null==f?0:sr(on(f),0),cn(function(_){var w=_[f],S=fe(_,0,f);return w&&vl(S,w),Cn(d,this,S)})},R.tail=function yx(d){var f=null==d?0:d.length;return f?lo(d,1,f):[]},R.take=function BA(d,f,_){return d&&d.length?lo(d,0,(f=_||f===U?1:on(f))<0?0:f):[]},R.takeRight=function OO(d,f,_){var w=null==d?0:d.length;return w?lo(d,(f=w-(f=_||f===U?1:on(f)))<0?0:f,w):[]},R.takeRightWhile=function Ap(d,f){return d&&d.length?$a(d,Mt(f,3),!1,!0):[]},R.takeWhile=function UA(d,f){return d&&d.length?$a(d,Mt(f,3)):[]},R.tap=function Ex(d,f){return f(d),d},R.throttle=function gv(d,f,_){var w=!0,S=!0;if("function"!=typeof d)throw new Or(kn);return fi(_)&&(w="leading"in _?!!_.leading:w,S="trailing"in _?!!_.trailing:S),lD(d,f,{leading:w,maxWait:f,trailing:S})},R.thru=ph,R.toArray=Sv,R.toPairs=Kx,R.toPairsIn=Zx,R.toPath=function s1(d){return tn(d)?ui(d,pa):js(d)?[d]:Lr(rx(jn(d)))},R.toPlainObject=kc,R.transform=function ND(d,f,_){var w=tn(d),S=w||Ya(d)||Ud(d);if(f=Mt(f,4),null==_){var k=d&&d.constructor;_=S?w?new k:[]:fi(d)&&qa(k)?or(wl(d)):{}}return(S?Ao:ns)(d,function(V,G,Z){return f(_,V,G,Z)}),_},R.unary=function uD(d){return Nd(d,1)},R.union=bx,R.unionBy=xx,R.unionWith=wx,R.uniq=function nv(d){return d&&d.length?Tl(d):[]},R.uniqBy=function Mx(d,f){return d&&d.length?Tl(d,Mt(f,2)):[]},R.uniqWith=function Dp(d,f){return f="function"==typeof f?f:U,d&&d.length?Tl(d,U,f):[]},R.unset=function BD(d,f){return null==d||fp(d,f)},R.unzip=Fd,R.unzipWith=iv,R.update=function Qx(d,f,_){return null==d?d:ua(d,f,Rl(_))},R.updateWith=function UD(d,f,_,w){return w="function"==typeof w?w:U,null==d?d:ua(d,f,Rl(_),w)},R.values=Vd,R.valuesIn=function VD(d){return null==d?[]:Kf(d,Ys(d))},R.without=rv,R.words=cw,R.wrap=function Hn(d,f){return mv(Rl(f),d)},R.xor=sv,R.xorBy=ov,R.xorWith=fh,R.zip=VA,R.zipObject=function Cx(d,f){return O_(d||[],f||[],Sd)},R.zipObjectDeep=function zA(d,f){return O_(d||[],f||[],Dd)},R.zipWith=HA,R.entries=Kx,R.entriesIn=Zx,R.extend=ma,R.extendWith=Np,ho(R,R),R.add=mw,R.attempt=dw,R.camelCase=ew,R.capitalize=tw,R.ceil=a1,R.clamp=function Kt(d,f,_){return _===U&&(_=f,f=U),_!==U&&(_=(_=uo(_))==_?_:0),f!==U&&(f=(f=uo(f))==f?f:0),vc(uo(d),f,_)},R.clone=function fD(d){return zs(d,ks)},R.cloneDeep=function Nx(d){return zs(d,di|ks)},R.cloneDeepWith=function pD(d,f){return zs(d,di|ks,f="function"==typeof f?f:U)},R.cloneWith=function Pp(d,f){return zs(d,ks,f="function"==typeof f?f:U)},R.conformsTo=function mD(d,f){return null==f||w_(d,f,wr(f))},R.deburr=nw,R.defaultTo=function JD(d,f){return null==d||d!=d?f:d},R.divide=gw,R.endsWith=function iw(d,f,_){d=jn(d),f=is(f);var w=d.length,S=_=_===U?w:vc(on(_),0,w);return(_-=f.length)>=0&&d.slice(_,S)==f},R.eq=Oo,R.escape=function zD(d){return(d=jn(d))&&Qg.test(d)?d.replace(qb,WE):d},R.escapeRegExp=function rw(d){return(d=jn(d))&&Jb.test(d)?d.replace(Vf,"\\$&"):d},R.every=function Ax(d,f,_){var w=tn(d)?yd:sA;return _&&gs(d,f,_)&&(f=U),w(d,Mt(f,3))},R.find=cv,R.findIndex=dx,R.findKey=function SD(d,f){return Nt(d,Mt(f,3),ns)},R.findLast=Dx,R.findLastIndex=ux,R.findLastKey=function Dv(d,f){return Nt(d,Mt(f,3),C_)},R.floor=_w,R.forEach=Rx,R.forEachRight=kx,R.forIn=function Za(d,f){return null==d?d:Fr(d,Mt(f,3),Ys)},R.forInRight=function ED(d,f){return null==d?d:T0(d,Mt(f,3),Ys)},R.forOwn=function AD(d,f){return d&&ns(d,Mt(f,3))},R.forOwnRight=function DD(d,f){return d&&C_(d,Mt(f,3))},R.get=Tv,R.gt=gD,R.gte=Bx,R.has=function RD(d,f){return null!=d&&bA(d,f,S_)},R.hasIn=Ll,R.head=hx,R.identity=Br,R.includes=function qA(d,f,_,w){d=xr(d)?d:Vd(d),_=_&&!w?on(_):0;var S=d.length;return _<0&&(_=sr(S+_,0)),Ka(d)?_<=S&&d.indexOf(f,_)>-1:!!S&&bl(d,f,_)>-1},R.indexOf=function TA(d,f,_){var w=null==d?0:d.length;if(!w)return-1;var S=null==_?0:on(_);return S<0&&(S=sr(w+S,0)),bl(d,f,S)},R.inRange=function $(d,f,_){return f=Ol(f),_===U?(_=f,f=0):_=Ol(_),function oA(d,f,_){return d>=vr(f,_)&&d=-Ba&&d<=Ba},R.isSet=Mv,R.isString=Ka,R.isSymbol=js,R.isTypedArray=Ud,R.isUndefined=function bD(d){return d===U},R.isWeakMap=function Cv(d){return ei(d)&&br(d)==pd},R.isWeakSet=function xD(d){return ei(d)&&"[object WeakSet]"==ar(d)},R.join=function Q_(d,f){return null==d?"":bO.call(d,f)},R.kebabCase=HD,R.last=Gs,R.lastIndexOf=function IA(d,f,_){var w=null==d?0:d.length;if(!w)return-1;var S=w;return _!==U&&(S=(S=on(_))<0?sr(w+S,0):vr(S,w-1)),f==f?function b0(Y,oe,ae){for(var Je=ae+1;Je--;)if(Y[Je]===oe)return Je;return Je}(d,f,S):dc(d,g0,S,!0)},R.lowerCase=GD,R.lowerFirst=UO,R.lt=$x,R.lte=wD,R.max=function l1(d){return d&&d.length?sp(d,Br,Ad):U},R.maxBy=function c1(d,f){return d&&d.length?sp(d,Mt(f,2),Ad):U},R.mean=function qs(d){return _0(d,Br)},R.meanBy=function d1(d,f){return _0(d,Mt(f,2))},R.min=function u1(d){return d&&d.length?sp(d,Br,D_):U},R.minBy=function WO(d,f){return d&&d.length?sp(d,Mt(f,2),D_):U},R.stubArray=Wp,R.stubFalse=bh,R.stubObject=function Fv(){return{}},R.stubString=function Lv(){return""},R.stubTrue=function pw(){return!0},R.multiply=Bv,R.nth=function J_(d,f){return d&&d.length?I_(d,on(f)):U},R.noConflict=function t1(){return gr._===this&&(gr._=Md),this},R.noop=zp,R.now=Ic,R.pad=function sw(d,f,_){d=jn(d);var w=(f=on(f))?uc(d):0;if(!f||w>=f)return d;var S=(f-w)/2;return _p(p_(S),_)+d+_p(f_(S),_)},R.padEnd=function ow(d,f,_){d=jn(d);var w=(f=on(f))?uc(d):0;return f&&wf){var w=d;d=f,f=w}if(_||d%1||f%1){var S=XE();return vr(d+S*(f-d+Wt("1e-"+((S+"").length-1))),f)}return ih(d,f)},R.reduce=function QA(d,f,_){var w=tn(d)?Yf:To,S=arguments.length<3;return w(d,Mt(f,4),_,S,Ga)},R.reduceRight=function JA(d,f,_){var w=tn(d)?Lu:To,S=arguments.length<3;return w(d,Mt(f,4),_,S,rp)},R.repeat=function Rv(d,f,_){return f=(_?gs(d,f,_):f===U)?1:on(f),P_(jn(d),f)},R.replace=function kv(){var d=arguments,f=jn(d[0]);return d.length<3?f:f.replace(d[1],d[2])},R.result=function Fo(d,f,_){var w=-1,S=(f=wc(f,d)).length;for(S||(S=1,d=U);++wBa)return[];var _=ea,w=vr(d,ea);f=Mt(f),d-=ea;for(var S=Nn(w,f);++_=k)return d;var G=_-uc(w);if(G<1)return w;var Z=V?fe(V,0,G).join(""):d.slice(0,G);if(S===U)return Z+w;if(V&&(G+=Z.length-G),wv(S)){if(d.slice(G).search(S)){var me,be=Z;for(S.global||(S=xl(S.source,jn(na.exec(S))+"g")),S.lastIndex=0;me=S.exec(be);)var De=me.index;Z=Z.slice(0,De===U?G:De)}}else if(d.indexOf(is(S),G)!=G){var je=Z.lastIndexOf(S);je>-1&&(Z=Z.slice(0,je))}return Z+w},R.unescape=function Bp(d){return(d=jn(d))&&iO.test(d)?d.replace(Yb,nt):d},R.uniqueId=function o1(d){var f=++c_;return jn(d)+f},R.upperCase=XD,R.upperFirst=Up,R.each=Rx,R.eachRight=kx,R.first=hx,ho(R,function(){var d={};return ns(R,function(f,_){Jn.call(R.prototype,_)||(d[_]=f)}),d}(),{chain:!1}),R.VERSION="4.17.21",Ao(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){R[d].placeholder=R}),Ao(["drop","take"],function(d,f){sn.prototype[d]=function(_){_=_===U?1:sr(on(_),0);var w=this.__filtered__&&!f?new sn(this):this.clone();return w.__filtered__?w.__takeCount__=vr(_,w.__takeCount__):w.__views__.push({size:vr(_,ea),type:d+(w.__dir__<0?"Right":"")}),w},sn.prototype[d+"Right"]=function(_){return this.reverse()[d](_).reverse()}}),Ao(["filter","map","takeWhile"],function(d,f){var _=f+1,w=1==_||3==_;sn.prototype[d]=function(S){var k=this.clone();return k.__iteratees__.push({iteratee:Mt(S,3),type:_}),k.__filtered__=k.__filtered__||w,k}}),Ao(["head","last"],function(d,f){var _="take"+(f?"Right":"");sn.prototype[d]=function(){return this[_](1).value()[0]}}),Ao(["initial","tail"],function(d,f){var _="drop"+(f?"":"Right");sn.prototype[d]=function(){return this.__filtered__?new sn(this):this[_](1)}}),sn.prototype.compact=function(){return this.filter(Br)},sn.prototype.find=function(d){return this.filter(d).head()},sn.prototype.findLast=function(d){return this.reverse().find(d)},sn.prototype.invokeMap=cn(function(d,f){return"function"==typeof d?new sn(this):this.map(function(_){return Zu(_,d,f)})}),sn.prototype.reject=function(d){return this.filter(mh(Mt(d)))},sn.prototype.slice=function(d,f){d=on(d);var _=this;return _.__filtered__&&(d>0||f<0)?new sn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),f!==U&&(_=(f=on(f))<0?_.dropRight(-f):_.take(f-d)),_)},sn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},sn.prototype.toArray=function(){return this.take(ea)},ns(sn.prototype,function(d,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=R[w?"take"+("last"==f?"Right":""):f],k=w||/^find/.test(f);S&&(R.prototype[f]=function(){var V=this.__wrapped__,G=w?[1]:arguments,Z=V instanceof sn,me=G[0],be=Z||tn(V),De=function(mn){var In=S.apply(R,vl([mn],G));return w&&je?In[0]:In};be&&_&&"function"==typeof me&&1!=me.length&&(Z=be=!1);var je=this.__chain__,kt=k&&!je,dn=Z&&!this.__actions__.length;if(!k&&be){V=dn?V:new sn(this);var Pt=d.apply(V,G);return Pt.__actions__.push({func:ph,args:[De],thisArg:U}),new Us(Pt,je)}return kt&&dn?d.apply(this,G):(Pt=this.thru(De),kt?w?Pt.value()[0]:Pt.value():Pt)})}),Ao(["pop","push","shift","sort","splice","unshift"],function(d){var f=Ua[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",w=/^(?:pop|shift)$/.test(d);R.prototype[d]=function(){var S=arguments;if(w&&!this.__chain__){var k=this.value();return f.apply(tn(k)?k:[],S)}return this[_](function(V){return f.apply(tn(V)?V:[],S)})}}),ns(sn.prototype,function(d,f){var _=R[f];if(_){var w=_.name+"";Jn.call(gc,w)||(gc[w]=[]),gc[w].push({name:f,func:_})}}),gc[F_(U,ir).name]=[{name:"wrapper",func:U}],sn.prototype.clone=function fs(){var d=new sn(this.__wrapped__);return d.__actions__=Lr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=Lr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=Lr(this.__views__),d},sn.prototype.reverse=function QE(){if(this.__filtered__){var d=new sn(this);d.__dir__=-1,d.__filtered__=!0}else(d=this.clone()).__dir__*=-1;return d},sn.prototype.value=function tp(){var d=this.__wrapped__.value(),f=this.__dir__,_=tn(d),w=f<0,S=_?d.length:0,k=function yA(d,f,_){for(var w=-1,S=_.length;++w=this.__values__.length;return{done:d,value:d?U:this.__values__[this.__index__++]}},R.prototype.plant=function FO(d){for(var f,_=this;_ instanceof ep;){var w=Y_(_);w.__index__=0,w.__values__=U,f?S.__wrapped__=w:f=w;var S=w;_=_.__wrapped__}return S.__wrapped__=d,f},R.prototype.reverse=function WA(){var d=this.__wrapped__;if(d instanceof sn){var f=d;return this.__actions__.length&&(f=new sn(this)),(f=f.reverse()).__actions__.push({func:ph,args:[Ep],thisArg:U}),new Us(f,this.__chain__)}return this.thru(Ep)},R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=function lv(){return xc(this.__wrapped__,this.__actions__)},R.prototype.first=R.prototype.head,zu&&(R.prototype[zu]=function $A(){return this}),R}();gr._=Xi,(en=function(){return Xi}.call(Is,Kr,Is,Mo))!==U&&(Mo.exports=en)}.call(this)},738:function(Mo){var Is;Mo.exports=((Is=function(){function Kr(ci){return Ir.appendChild(ci.dom),ci}function en(ci){for(var di=0;diYt+1e3&&(hl.update(1e3*kn/(ci-Yt),100),Yt=ci,kn=0,Rs)){var di=performance.memory;Rs.update(di.usedJSHeapSize/1048576,di.jsHeapSizeLimit/1048576)}return ci},update:function(){Zr=this.end()},domElement:Ir,setMode:en}}).Panel=function(Kr,en,U){var Ir=1/0,Zr=0,Yt=Math.round,kn=Yt(window.devicePixelRatio||1),hl=80*kn,Fa=48*kn,Rs=3*kn,ci=2*kn,di=3*kn,ds=15*kn,ks=74*kn,Ps=30*kn,Co=document.createElement("canvas");Co.width=hl,Co.height=Fa,Co.style.cssText="width:80px;height:48px";var Tn=Co.getContext("2d");return Tn.font="bold "+9*kn+"px Helvetica,Arial,sans-serif",Tn.textBaseline="top",Tn.fillStyle=U,Tn.fillRect(0,0,hl,Fa),Tn.fillStyle=en,Tn.fillText(Kr,Rs,ci),Tn.fillRect(di,ds,ks,Ps),Tn.fillStyle=U,Tn.globalAlpha=.9,Tn.fillRect(di,ds,ks,Ps),{dom:Co,update:function(ir,oc){Ir=Math.min(Ir,ir),Zr=Math.max(Zr,ir),Tn.fillStyle=U,Tn.globalAlpha=1,Tn.fillRect(0,0,hl,ds),Tn.fillStyle=en,Tn.fillText(Yt(ir)+" "+Kr+" ("+Yt(Ir)+"-"+Yt(Zr)+")",Rs,ci),Tn.drawImage(Co,di+kn,ds,ks-kn,Ps,di,ds,ks-kn,Ps),Tn.fillRect(di+ks-kn,ds,kn,Ps),Tn.fillStyle=U,Tn.globalAlpha=.9,Tn.fillRect(di+ks-kn,ds,kn,Yt((1-ir/oc)*Ps))}}},Is)}},Mo=>{Mo(Mo.s=745)}]); \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f59836c..2e0a9e4 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,6 +8,7 @@ "name": "gui", "version": "0.0.0", "dependencies": { + "@angular-material-components/color-picker": "^15.0.0", "@angular/animations": "^15.0.0", "@angular/cdk": "^15.0.0", "@angular/common": "^15.0.0", @@ -394,6 +395,22 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/@angular-material-components/color-picker": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@angular-material-components/color-picker/-/color-picker-15.0.0.tgz", + "integrity": "sha512-3yaFR/BsZkZ5mVymfmowZXVOjDlBNsfkEPWa7Mbq/obc3DiRvlGjmBSTOiPAaz1pzza8M9o4Tr+kEXCY9QCb3A==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/cdk": "^15.0.1", + "@angular/common": "^15.0.1", + "@angular/core": "^15.0.1", + "@angular/forms": "^15.0.1", + "@angular/material": "^15.0.1", + "@angular/platform-browser": "^15.0.1" + } + }, "node_modules/@angular/animations": { "version": "15.2.10", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-15.2.10.tgz", diff --git a/frontend/package.json b/frontend/package.json index 61ede54..47c93b1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,6 +11,7 @@ }, "private": true, "dependencies": { + "@angular-material-components/color-picker": "^15.0.0", "@angular/animations": "^15.0.0", "@angular/cdk": "^15.0.0", "@angular/common": "^15.0.0", diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 755ac59..f2a646c 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -51,6 +51,11 @@ import { EacsAudioBlockUiComponent } from './components/editor/eac/eacs-audio.bl import { GeoGeometryBlockUiComponent } from './components/editor/eac/geo-geometry.block-ui/geo-geometry.block-ui.component'; import { ObjViewerComponent } from './components/editor/common/obj-viewer/obj-viewer.component'; import { BaseArchiveBlockUiComponent } from './components/editor/eac/base-archive.block-ui/base-archive.block-ui.component'; +import { + MAT_COLOR_FORMATS, + NGX_MAT_COLOR_FORMATS, + NgxMatColorPickerModule, +} from '@angular-material-components/color-picker'; @NgModule({ declarations: [ @@ -107,8 +112,13 @@ import { BaseArchiveBlockUiComponent } from './components/editor/eac/base-archiv MatMenuModule, ReactiveFormsModule, MatOptionModule, + NgxMatColorPickerModule, + ], + providers: [ + EelDelegateService, + NgxDeepEqualsPureService, + { provide: MAT_COLOR_FORMATS, useValue: NGX_MAT_COLOR_FORMATS }, ], - providers: [EelDelegateService, NgxDeepEqualsPureService], bootstrap: [AppComponent], }) export class AppModule {} diff --git a/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.html b/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.html index d59f5cf..33ddd27 100644 --- a/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.html +++ b/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.html @@ -3,5 +3,8 @@
+ [matTooltip]="i + ': #' + color.toString(16)" + (click)="onColorClicked($any($event.currentTarget!), i)">
+ + diff --git a/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.ts b/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.ts index 7837ca6..45fc338 100644 --- a/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/palette.block-ui/palette.block-ui.component.ts @@ -1,5 +1,8 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { GuiComponentInterface } from '../../gui-component.interface'; +import { NgxMatColorPickerComponent } from '@angular-material-components/color-picker/lib/components/color-picker/color-picker.component'; +import { Color } from '@angular-material-components/color-picker'; +import { GlobalPositionStrategy } from '@angular/cdk/overlay'; @Component({ selector: 'app-palette-block-ui', @@ -17,10 +20,43 @@ export class PaletteBlockUiComponent implements GuiComponentInterface { @Output('changed') changed: EventEmitter = new EventEmitter(); + @ViewChild('picker') picker!: NgxMatColorPickerComponent; + constructor() {} lpad(str: string, padString: string, length: number) { while (str.length < length) str = padString + str; return str; } + + private selectedIndex: number | null = null; + + onColorClicked(em: HTMLDivElement, index: number) { + if (!this.resourceData) { + this.selectedIndex = null; + return; + } + this.selectedIndex = index; + const color = this.resourceData.colors[index] || 0; + this.picker.select( + new Color((color & 0xff000000) >>> 24, (color & 0xff0000) >>> 16, (color & 0xff00) >>> 8, color & 0xff), + ); + this.picker.open(); + const ps = new GlobalPositionStrategy(); + ps.top(Math.min(em.offsetTop, window.innerHeight - 450) + 'px'); + ps.left(Math.min(em.offsetLeft, window.innerWidth - 380) + 'px'); + this.picker._popupRef.updatePositionStrategy(ps); + ps.apply(); + } + + onColorChange(color: Color | null) { + if (!this.resourceData) { + this.selectedIndex = null; + return; + } + if (this.selectedIndex !== null) { + this.resourceData.colors[this.selectedIndex] = color ? parseInt(color.toHex8String().substring(1), 16) : 0; + this.changed.emit(); + } + } } diff --git a/library/loader.py b/library/loader.py index fc94373..4ec0334 100644 --- a/library/loader.py +++ b/library/loader.py @@ -131,9 +131,17 @@ def probe_block_class(binary_file: [BufferedReader, BytesIO], file_path: str = N raise NotImplementedError('Don`t have parser for such resource') +def path_to_name(path: str) -> str: + return path.replace('\\', '/').replace(':', '---DRIVE') + + +def id_to_path(id: str) -> str: + return id.split('__')[0].replace('---DRIVE', ':') + + # id example: /media/data/nfs/SIMDATA/CARFAMS/LDIABL.CFM__1/frnt def require_resource(id: str) -> Tuple[Tuple[str, "DataBlock", dict], Tuple[str, "DataBlock", dict]]: - file_path = id.split('__')[0].replace('---DRIVE', ':') + file_path = id_to_path(id) (file_id, block, data) = require_file(file_path) if not data: return (id, None, None), (file_id, None, None) @@ -154,13 +162,16 @@ def require_resource(id: str) -> Tuple[Tuple[str, "DataBlock", dict], Tuple[str, def clear_file_cache(path: str): try: - del files_cache[path.replace('\\', '/')] + name = path_to_name(path) + del files_cache[name] + from library.read_blocks import DataBlock + DataBlock.root_read_ctx.children = [c for c in DataBlock.root_read_ctx.children if c.name != name] except KeyError: pass def require_file(path: str) -> Tuple[str, "DataBlock", dict]: - name = path.replace('\\', '/').replace(':', '---DRIVE') + name = path_to_name(path) (block, data) = files_cache.get(name, (None, None)) if block is None or data is None: with open(path, 'rb', buffering=100 * 1024 * 1024) as bdata: diff --git a/resources/eac/fields/colors.py b/resources/eac/fields/colors.py index 878bd30..51894b5 100644 --- a/resources/eac/fields/colors.py +++ b/resources/eac/fields/colors.py @@ -3,7 +3,7 @@ from library.context import ReadContext, WriteContext from library.read_blocks import IntegerBlock, DataBlock -from library.utils import transform_bitness, transform_color_bitness +from library.utils import transform_color_bitness class Color24BitDosBlock(IntegerBlock): @@ -20,17 +20,11 @@ def __init__(self, **kwargs): def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', read_bytes_amount=None): number = super().read(buffer, ctx, name) - red = transform_bitness((number & 0xFF0000) >> 16, 6) - green = transform_bitness((number & 0xFF00) >> 8, 6) - blue = transform_bitness(number & 0xFF, 6) - return red << 24 | green << 16 | blue << 8 | 255 + return (number & 0x3F3F3F) << 10 | 255 def write(self, data, ctx: WriteContext = None, name: str = '') -> bytes: - red = (data & 0xff000000) >> 26 - green = (data & 0xff0000) >> 18 - blue = (data & 0xff00) >> 10 - value = red << 16 | green << 8 | blue - return super().write(value, ctx, name) + number = (data & 0xFCFCFC00) >> 10 + return super().write(number, ctx, name) class Color24BitBlock(IntegerBlock): diff --git a/resources/eac/palettes.py b/resources/eac/palettes.py index ed25cc4..4414f71 100644 --- a/resources/eac/palettes.py +++ b/resources/eac/palettes.py @@ -1,6 +1,6 @@ from abc import ABC from io import BufferedReader, BytesIO -from typing import Dict +from typing import Dict, Tuple, Any from library.context import ReadContext from library.read_blocks import DeclarativeCompoundBlock, BytesBlock, ArrayBlock, IntegerBlock, DataBlock @@ -11,38 +11,6 @@ Color16Bit0565Block, Color16BitDosBlock, ) -transparency_colors = [ - # default - 0xFF_00_FF_FF, - 0x00_FF_00_FF, - 0x00_00_FF_FF, - # green-ish - 0x00_EA_1C_FF, # TNFS lost vegas map props - 0x00_EB_1C_FF, # TNFS lost vegas map props - # 0x00_FB_00_FF, # NFS2 GAMEDATA/TRACKS/SE/TR050M, not working, there is Bitmap 0565 without alpha - 0x04_FF_00_FF, - 0x0C_FF_00_FF, - 0x24_ff_10_FF, # TNFS TRAFFC.CFM - 0x28_FF_28_FF, - 0x28_FF_2C_FF, - # blue - 0x00_00_FC_FF, # TNFS Porsche 911 CFM - # light blue - 0x00_FF_FF_FF, - 0x1a_ff_ff_ff, # NFS2SE TRACKS/PC/TR000M.QFS - 0x48_ff_ff_FF, # NFS2SE TRACKS/PC/TR020M.QFS - # purple - 0xCE_1C_C6_FF, # some TNFS map props - 0xF2_00_FF_FF, - 0xFF_00_F7_FF, # TNFS AL2 map props - 0xFF_00_F6_FF, # TNFS NTRACKFM/AL3_T01.FAM map props - 0xFF_31_59_FF, # TNFS ETRACKFM/CL3_001.FAM road sign - # gray - 0x28_28_28_FF, # car wheels - 0xFF_FF_FF_FF, # map props - 0x00_00_00_FF, # some menu items: SHOW/DIABLO.QFS -] - class BasePalette(DeclarativeCompoundBlock, ABC): can_use_last_color_as_transparent = True @@ -61,6 +29,11 @@ def new_data(self): return {**super().new_data(), 'last_color_transparent': False} + def get_child_block_with_data(self, unpacked_data: dict, name: str) -> Tuple['DataBlock', Any]: + if name == 'last_color_transparent': + return None, unpacked_data['last_color_transparent'] + return super().get_child_block_with_data(unpacked_data, name) + def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.root_read_ctx, name: str = '', read_bytes_amount=None): res = super().read(buffer, ctx, name) @@ -68,7 +41,9 @@ def read(self, buffer: [BufferedReader, BytesIO], ctx: ReadContext = DataBlock.r assert res['num_colors'] == res['num_colors1'] res['last_color_transparent'] = False try: - if self.can_use_last_color_as_transparent and res['colors'][255] in transparency_colors: + # I'm not sure how game decides whether it should draw 255th color transparent or not. + # It appears that only qfs files in SLIDES/GSLIDES get broken if apply transparency to all bitmaps + if self.can_use_last_color_as_transparent and len(res['colors']) >= 256 and 'SLIDES/' not in ctx.ctx_path: res['last_color_transparent'] = True except IndexError: pass diff --git a/test/resources/eac/test_fields.py b/test/resources/eac/test_fields.py index cb9964e..4553061 100644 --- a/test/resources/eac/test_fields.py +++ b/test/resources/eac/test_fields.py @@ -1,6 +1,7 @@ import unittest from io import BytesIO +from resources.eac.fields.colors import Color24BitDosBlock from resources.eac.fields.numbers import Nfs1Angle14, Nfs1Angle8 @@ -17,3 +18,14 @@ def test_angle_8_should_have_correct_rounding(self): raw = field.unpack(BytesIO(bytes([11]))) serialized = field.pack(raw) self.assertListEqual(list(serialized), [11]) + + def test_color_24bit_dos_should_be_translated_correctly(self): + field = Color24BitDosBlock() + color = field.unpack(BytesIO(bytes([0b0010_1010, 0b0001_0100, 0b0011_1011]))) + self.assertEqual(color, 0b10101000_01010000_11101100_11111111) + + def test_color_24bit_dos_should_be_saved_correctly(self): + field = Color24BitDosBlock() + color = 0b11101010_01010000_10101101_11111111 + serialized = field.pack(color) + self.assertListEqual(list(serialized), [0b0011_1010, 0b0001_0100, 0b0010_1011])